Python Client for Google Cloud KMS
Project description
This is a shared codebase for gcloud-rest-kms and 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
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12cca9b81b784c5992a5a35041424e1675a1e58d4f5397b3a1e7388a092a4f4f
|
|
| MD5 |
e6413f53c96b4288b62b9ff55c17dbd0
|
|
| BLAKE2b-256 |
756841d8bbe6aed1ffebe23647260b1078e8bcae09b6f65d514a095adf8a0610
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
499f09a4d9c0c452d6d19ea68f5530fb501e6fd4e757d59931a2ef63ce1c0c47
|
|
| MD5 |
a0806909c33c70749328b42d985c53cd
|
|
| BLAKE2b-256 |
8626fe68794ff6f8923b314817b731356f97638d8a801fe743e704b20e1f9703
|