Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

secret-kernel-provider-in-memory

In-memory provider for Secret Kernel local development and tests.

uv add secret-kernel-contracts secret-kernel-provider-in-memory

Usage

In the process environment — exported by the shell, or loaded from a .env file by whatever starts the process:

SECRET_KERNEL_DEV_APP_DATABASE="user=app;password=secret"
from secret_kernel.contracts import (
    GetSecretOptions,
    SecretClientOptions,
    SecretParseMode,
)
from secret_kernel.provider_in_memory import (
    InMemoryProviderOptions,
    create_in_memory_client,
)

client = create_in_memory_client(
    SecretClientOptions(env="dev", prefix="app"),
    InMemoryProviderOptions(env_secrets=True),
)

secret = await client.get_secret(
    "database", GetSecretOptions(parse=SecretParseMode.KEY_VALUE)
)

With env_secrets=True, the provider maps the resolved full name to an environment variable key. Example: /dev/app/database becomes SECRET_KERNEL_DEV_APP_DATABASE.

Explicit values can also be preloaded by resolved full secret name, such as /dev/app/database/password. Explicit secrets values take precedence over environment variables.

The provider delegates name resolution, parsing and cache behavior to secret-kernel-core.

Options

  • secrets: mapping of resolved full secret names to string values or SecretProviderValue objects.
  • env_secrets: enables environment-variable-backed local secrets.

env_secrets can be True or an InMemoryEnvSecretsOptions:

  • prefix: environment variable prefix. Default: SECRET_KERNEL.
  • source: a mapping to read instead of the environment, for tests. Default: os.environ.

Documentation

The normative public surface is in docs/secret-kernel-api-reference.md.

License

MIT

Metadata

Release files for secret-kernel-provider-in-memory 0.1.0a10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for secret-kernel-provider-in-memory 0.1.0a10
File Size Uploaded Provenance Actions
secret_kernel_provider_in_memory-0.1.0a10.tar.gz 3.6 kB Without provenance Details for secret_kernel_provider_in_memory-0.1.0a10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for secret-kernel-provider-in-memory 0.1.0a10
File Interpreter ABI Platform Actions
secret_kernel_provider_in_memory-0.1.0a10-py3-none-any.whl Python 3 none any Details for secret_kernel_provider_in_memory-0.1.0a10-py3-none-any.whl

Total release size: 8.4 kB

Release files / secret_kernel_provider_in_memory-0.1.0a10.tar.gz

Download URL secret_kernel_provider_in_memory-0.1.0a10.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c8eb773401f698f2b905b1dcb92aaead2f0c6e84ca9b3fd8f7decea0f32cf73c
BLAKE2b-256 checksum
How to use checksums
299823bad75bd24fdec08fb7e4918f2e56ad929f3577f9336656cf0e9fa33a6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / secret_kernel_provider_in_memory-0.1.0a10-py3-none-any.whl

Download URL secret_kernel_provider_in_memory-0.1.0a10-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2cdc598b47beedd22a42c1a08f9bb90f591b3dfb59ddb12845a03f086b23af4e
BLAKE2b-256 checksum
How to use checksums
d3a416436db9ddb1ddbbce9d8ab7581138b22997be8312cb650b0e40af75cfac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for secret-kernel-provider-in-memory 0.1.0a10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page