Skip to main content

In-memory key provider for development and testing

Project description

Swamauri Logo

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


Download files

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

Source Distribution

swarmauri_keyprovider_local-0.2.0.dev4.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file swarmauri_keyprovider_local-0.2.0.dev4.tar.gz.

File metadata

File hashes

Hashes for swarmauri_keyprovider_local-0.2.0.dev4.tar.gz
Algorithm Hash digest
SHA256 1d3bba0365e34dfe8ca8e3b1f585eaa432115596fd330a8c5a0297897d913e0c
MD5 a7249f77c04b33cf44e341140a098561
BLAKE2b-256 13f61bc3b7ce24e996e2a5d997de9dc77de898a58ed156f38dd95028d3543708

See more details on using hashes here.

File details

Details for the file swarmauri_keyprovider_local-0.2.0.dev4-py3-none-any.whl.

File metadata

File hashes

Hashes for swarmauri_keyprovider_local-0.2.0.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 6f2941ac2976019b9c181a90a83d430b20d6526d0b3d1a959507a655935c001d
MD5 c31e207c3ac78afea3aa74da223c4298
BLAKE2b-256 84118150501e89ebac3fb93e44388a0e5219b86620c804c3c136c142c292a564

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