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

Uploaded Python 3

File details

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

File metadata

  • Download URL: without_configmap-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 15c2bcec17139528f3a29cc12bbb69ac476de95039164124df94b5b56887c75b
MD5 61c204f09814616f7ec42ea9bf2a39c9
BLAKE2b-256 af3155626206d7e6a0b1c181d01b705770c4ae1b607ace7666516226ef305866

See more details on using hashes here.

File details

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

File metadata

  • Download URL: without_configmap-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a9a7c4d2bf8a35a702604c30531db46ccb7c2d028d54024c0258264fd0bb8ff9
MD5 b640788d988120312934e842fa36370e
BLAKE2b-256 4478820921e7df7c191a1b4762195a332f8d081a055ffaf82e5f97e2af6ef4a3

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