Skip to main content

without-configmap

A without behavior source backed by a Kubernetes ConfigMap mount: the first context that actually changes, proving the context-updated-by-a-stream half of the model end to end. Where without-env loads a static value once, this one re-parses on every mount change.

watch_config(mount, parse) is a Stream that yields the parsed config now and a freshly parsed value every time the mount changes. It watches the mount directory, not the file, so it catches the atomic ..data symlink swap that projected ConfigMaps use. Feed the stream through without.sample to read the latest value as a Context:

from pathlib import Path

from pydantic import BaseModel
from without import sample
from without_configmap import read_yaml_file, watch_config


class MyConfig(BaseModel):
    model_config = {"frozen": True}
    default_mode: str
    max_bytes: int


source = watch_config(Path("/etc/config"), read_yaml_file(MyConfig, "config.yaml"))
async with sample(source) as config:
    config.current()  # always the latest reloaded value, never blocks
    await config.updated()  # block until the next reload lands, then return it

See the without-configmap guide (with the API reference) for the full surface.

Download files

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

Source Distribution

without_configmap-0.0.3.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

without_configmap-0.0.3-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file without_configmap-0.0.3.tar.gz.

File metadata

  • Download URL: without_configmap-0.0.3.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for without_configmap-0.0.3.tar.gz
Algorithm Hash digest
SHA256 13a26f220e6ec08cd389cad61ed6988feac618e560c6c45c4c183e3372e3fb7b
MD5 15a76f69dd793d5813be62d5fe0185cb
BLAKE2b-256 36ae2fce97103a3f49231b918af8f405c09c39c34a318a4a6b2fe886ef236e88

See more details on using hashes here.

File details

Details for the file without_configmap-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: without_configmap-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for without_configmap-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7979b901425c82e9c58924d917ffbe333bfc579712c2c8d0f0bc9dea26760564
MD5 3556a21718a962f668c34e0b69750953
BLAKE2b-256 5ce40e296448db4a27ce74bc9acab471ccf91bf2bc6feb918e8c2e955aa0d4a9

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 Sentry Error logging StatusPage Status page