Metadata-Version: 2.1
Name: scaleway-tink
Version: 0.2.1
Summary: Extension to Tink Python that provides Scaleway's Key Manager integration
License: Apache-2.0
Author: Scaleway
Author-email: opensource@scaleway.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: scaleway (>=2.3.1,<3.0.0)
Requires-Dist: setuptools (>=70.0.0,<71.0.0)
Requires-Dist: tink (>=1.10.0,<2.0.0)
Description-Content-Type: text/markdown

# Tink Python Scaleway's Key Manager extension

This is an extension to the [Tink
Python](https://github.com/tink-crypto/tink-py) library that provides support
for Scaleway's Key Manager.

The official documentation is available at https://developers.google.com/tink.

## Installation

Install [poetry](https://python-poetry.org/docs/#installation):
```sh
curl -sSL https://install.python-poetry.org | python3 -
```

Clone the repository, then install the package:
```sh
poetry shell
poetry install
```

You can now import the package in your Python scripts:
```python
from scaleway_tink.integration.scwkms import client
...
```

Check [Scaleway's configuration
documentation](https://www.scaleway.com/en/docs/developer-tools/scaleway-cli/reference-content/scaleway-configuration-file/)
to configure the provider.

## Examples

Examples are present in [./examples](./examples).

To run them, you need to create a Key in Scaleway's Key Manager and retrieve its
ID. Export that ID as an environment variable:
```
export SCW_KMS_KEY_ID="<key-id>"
```

Make sure you have a [configuration file or environment
variables](https://www.scaleway.com/en/docs/developer-tools/scaleway-cli/reference-content/scaleway-configuration-file/)
set. You can now run the examples:
```sh
python3 ./examples/encrypt_decrypt.py
```

