In-memory key provider for development and testing
Project description
Swarmauri Local Key Provider
Provides a simple in-memory key provider for development and testing.
Installation
pip install swarmauri_keyprovider_local
Usage
import asyncio
from swarmauri_keyprovider_local import LocalKeyProvider
from swarmauri_core.keys.types import (
ExportPolicy,
KeyAlg,
KeyClass,
KeySpec,
)
from swarmauri_core.crypto.types import KeyUse
async def run_example() -> str:
provider = LocalKeyProvider()
spec = KeySpec(
klass=KeyClass.symmetric,
alg=KeyAlg.AES256_GCM,
uses=(KeyUse.ENCRYPT,),
export_policy=ExportPolicy.SECRET_WHEN_ALLOWED,
)
created = await provider.create_key(spec)
fetched = await provider.get_key(created.kid, include_secret=True)
print(f"Retrieved key: {fetched.kid}")
asyncio.run(run_example())
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
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 swarmauri_keyprovider_local-0.2.0.dev3.tar.gz.
File metadata
- Download URL: swarmauri_keyprovider_local-0.2.0.dev3.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e809fcc201ecfd5a4827781fec7047ee9ad8f4dbfa942820ad9bbd609b8c70b
|
|
| MD5 |
804b34dcb227bc3bace07804651303cd
|
|
| BLAKE2b-256 |
11e6b99ac718e0d1d3d423efda65f78bb8cf6e5f82c77a24a48adbd49247113a
|
File details
Details for the file swarmauri_keyprovider_local-0.2.0.dev3-py3-none-any.whl.
File metadata
- Download URL: swarmauri_keyprovider_local-0.2.0.dev3-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4a94b7157aa5054630f2f4e06f36e569e296dc5da0e78ce49a5d557c4c53ce4
|
|
| MD5 |
7c9acf439e703d30d2c767bb7806c1fd
|
|
| BLAKE2b-256 |
98dee457c24fb801bd5c255bf1a622b98f8f77259de26865a8b38faaafd78b1f
|