A without context backed by environment variables, parsed with pydantic-settings.
Project description
without-env
A without Context backed by environment variables: the simplest possible
context, a static one loaded at startup and never changed.
EnvContext.load(MySettings) reads the environment once, at the boundary, into a
validated pydantic-settings
model (parse, don't validate), then hands that immutable value to processors via
current(). Because it never changes, a reloading source (a watched file, a
ConfigMap mount) is a separate plugin; see
without-configmap for the context-updated-by-a-stream
case.
from pydantic_settings import BaseSettings
from without_env import EnvContext
class Settings(BaseSettings):
default_mode: str = "upper"
max_bytes: int = 1_048_576
config = EnvContext.load(Settings) # reads os.environ once, validates
config.current().default_mode # the parsed value, same every call
See the
without-env guide
(with the API reference)
for the full surface.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file without_env-0.0.1.tar.gz.
File metadata
- Download URL: without_env-0.0.1.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e34a98726f590b9ad49523a5a2a146630408b8fabb6b023e0088faebde45d936
|
|
| MD5 |
66c72a7803f304fd3a7e4357d847ae94
|
|
| BLAKE2b-256 |
dbc2853d1c4f9b6c2e58a0d25b64f3ef5dcd610311fc7e6ca8f25d2c4d845f41
|
File details
Details for the file without_env-0.0.1-py3-none-any.whl.
File metadata
- Download URL: without_env-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df4303285ccf37008640033f36e0330382ac3a5dc64f00a8ace099c0bbb92415
|
|
| MD5 |
45fd1d1441836f9327c186993eb8615e
|
|
| BLAKE2b-256 |
d3f18e34ccdaca0ad23d163b5b0bc71cdddbd3b7e19a899736bad1a43ff308c7
|