Skip to content

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.

Pick your package manager:

Terminal window
uv add probatio

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.

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:

FormatReadWrite
JSONstandard librarystandard library
TOMLstandard library (tomllib)needs the toml extra
YAMLneeds the yaml or fast extraneeds the yaml or fast extra

When a faster backend is installed, Probatio reaches for it first. Three extras are available:

  • fast: orjson for JSON and yamlrocks for YAML (speed, and YAML support).
  • yaml: PyYAML, the portable YAML backend for environments without yamlrocks. Install this (or fast) if you load or dump YAML.
  • toml: tomli-w for writing TOML. Reading TOML uses the standard library’s tomllib, 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:

Terminal window
uv add "probatio[fast]"
uv add "probatio[yaml,toml]"

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.