Cistell Documentation

Cistell is a configuration resolution library with a Rust core (cistell-core, cistell-macros) and Python bindings via PyO3. It was built to serve pynenc and rustvello, and later generalised for standalone use.


Rust Core

Configuration resolution engine. Use cistell-core and cistell-macros as native Rust crates.

Overview
Python Bindings

Python integration via PyO3 and maturin. Drop-in replacement for the pure-Python API.

Getting Started
Ecosystem

Designed to work with rustvello (Rust task engine) and pynenc (Python distributed task framework).

Overview

Features

  • Multi-source resolution — environment variables, config files (JSON, YAML, TOML), direct assignment, and Redis

  • Provenance tracking — see where each configuration value came from

  • Hierarchical configs — layered resolution with multi-inheritance support

  • Secret fields — mark sensitive values to prevent accidental logging

  • Rust and Python — use from either language with the same semantics

Installation

pip install cistell
[dependencies]
cistell-core = "0.1"
cistell-macros = "0.1"

Quick Start

from cistell import ConfigBase, ConfigField

class AppConfig(ConfigBase):
    log_level = ConfigField("INFO")
    port = ConfigField(8080)

config = AppConfig()
print(config.log_level)  # "INFO" (or overridden by env/file)
print(config.port)       # 8080

Override via environment variables:

export CONFIG__APPCONFIG___LOG_LEVEL="DEBUG"
export CONFIG__APPCONFIG___PORT=9090

See the Getting Started for more examples.

Support

License

Cistell is released under the MIT License. See MIT License.