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.2.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.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: without_configmap-0.0.2.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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.2.tar.gz
Algorithm Hash digest
SHA256 6ff8e0f8be713a19cef96a9926bfa88bb6a7c7906c067b2d4735178f3234ac12
MD5 0af9f16c4fb44781d38eee9dba0a3bf2
BLAKE2b-256 6c0014dd04a74919b76352d0d2b59a337de2a87e4d7b170f0694a4e5f3782ca0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: without_configmap-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0cf548ae04f89dce4f9ddf1e06de4f5524897153e2d167f68a6faeb866cc7048
MD5 c54c82c48b9c4056cc18c4af22b42ab0
BLAKE2b-256 1b6d61e9c7837cdc010f39478e73d648ec1a358f67325924aefcb155c12ea711

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