Skip to main content

Python Client for Google Cloud KMS

Project description

This is a shared codebase for gcloud-rest-kms and gcloud-rest-kms

Latest PyPI Version (gcloud-rest-kms) Python Version Support (gcloud-rest-kms) Python Version Support (gcloud-rest-kms)

Installation

$ pip install --upgrade gcloud-{aio,rest}-kms

Usage

We’re still working on more complete documentation, but roughly you can do:

from gcloud.rest.kms import KMS
from gcloud.rest.kms import decode
from gcloud.rest.kms import encode

kms = KMS('my-kms-project', 'my-keyring', 'my-key-name')

# encrypt
plaintext = 'the-best-animal-is-the-aardvark'
ciphertext = await kms.encrypt(encode(plaintext))

# decrypt
assert decode(await kms.decrypt(ciphertext)) == plaintext

# close the HTTP session
# Note that other options include:
# * providing your own session: `KMS(.., session=session)`
# * using a context manager: `async with KMS(..) as kms:`
await kms.close()

Contributing

Please see our contributing guide.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gcloud-rest-kms-3.2.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gcloud_rest_kms-3.2.0-py2.py3-none-any.whl (6.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file gcloud-rest-kms-3.2.0.tar.gz.

File metadata

  • Download URL: gcloud-rest-kms-3.2.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for gcloud-rest-kms-3.2.0.tar.gz
Algorithm Hash digest
SHA256 12cca9b81b784c5992a5a35041424e1675a1e58d4f5397b3a1e7388a092a4f4f
MD5 e6413f53c96b4288b62b9ff55c17dbd0
BLAKE2b-256 756841d8bbe6aed1ffebe23647260b1078e8bcae09b6f65d514a095adf8a0610

See more details on using hashes here.

File details

Details for the file gcloud_rest_kms-3.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: gcloud_rest_kms-3.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for gcloud_rest_kms-3.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 499f09a4d9c0c452d6d19ea68f5530fb501e6fd4e757d59931a2ef63ce1c0c47
MD5 a0806909c33c70749328b42d985c53cd
BLAKE2b-256 8626fe68794ff6f8923b314817b731356f97638d8a801fe743e704b20e1f9703

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page