Installation
Probatio is pure Python. There is nothing to compile, no build step, and no native extension to match against your platform. Install it and import it.
Install
Section titled “Install”Pick your package manager:
uv add probatiopip install probatiopoetry add probatioSupported Python versions
Section titled “Supported Python versions”Probatio needs Python 3.12 or newer. It is tested on CPython 3.12, 3.13, 3.14, and 3.15. If you can run those, you can run Probatio.
Optional backends
Section titled “Optional backends”The core has no runtime dependencies. What works on a bare install depends on the format, because the standard library does not ship a YAML parser or a TOML writer:
| Format | Read | Write |
|---|---|---|
| JSON | standard library | standard library |
| TOML | standard library (tomllib) | needs the toml extra |
| YAML | needs the yaml or fast extra | needs the yaml or fast extra |
When a faster backend is installed, Probatio reaches for it first. Three extras are available:
fast:orjsonfor JSON andyamlrocksfor YAML (speed, and YAML support).yaml:PyYAML, the portable YAML backend for environments withoutyamlrocks. Install this (orfast) if you load or dump YAML.toml:tomli-wfor writing TOML. Reading TOML uses the standard library’stomllib, so reading needs no extra.
Without a YAML backend, load_yaml/dump_yaml raise a clear RuntimeError
telling you which extra to install; the same goes for dump_toml without the
toml extra. JSON and TOML reading always work.
Install one or more extras:
uv add "probatio[fast]"uv add "probatio[yaml,toml]"pip install "probatio[fast]"pip install "probatio[yaml,toml]"poetry add "probatio[fast]"poetry add "probatio[yaml,toml]"Confirm it works
Section titled “Confirm it works”A tiny schema, validated:
from probatio import Schema, Required, Optional
schema = Schema( { Required("name"): str, Optional("port", default=8080): int, })
schema({"name": "app"}) # {'name': 'app', 'port': 8080}If that returns the dict with port filled in, you are set. Read the
quick start next.