Schema-driven configuration wizard for CLI and web
Project description
prettyconfi
Schema-driven configuration wizard for CLI and web.
Define your configuration flow once as TOML schemas, run it as interactive CLI prompts or export as JSON Schema for web forms.
Install
pip install prettyconfi # core (web-only)
pip install prettyconfi[cli] # with interactive CLI prompts
Quick Start
import prettyconfi
from pathlib import Path
# Load and merge schemas
schemas = prettyconfi.load_schemas([Path("base.toml"), Path("app.toml")])
composed = prettyconfi.compose(schemas)
# Interactive CLI
runner = prettyconfi.CLIRunner(composed)
answers = runner.run()
# Save results
prettyconfi.to_env(answers, Path("output.env"))
Schema Format
schema_version = 1
schema_name = "my-app"
[[fields]]
key = "APP_PORT"
type = "port"
default = 8080
label = "Application Port"
required = true
[[fields]]
key = "DB_HOST"
type = "str"
default = "localhost"
label = "Database Host"
when = { key = "USE_DB", truthy = true }
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
prettyconfi-0.1.2.tar.gz
(20.4 kB
view details)
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 prettyconfi-0.1.2.tar.gz.
File metadata
- Download URL: prettyconfi-0.1.2.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
507490331eb021e8e9fd0a70f3d51d2d0fca8b6db15c71faab9a332ed696736c
|
|
| MD5 |
ad85813756819a22f7235655ad8f79fb
|
|
| BLAKE2b-256 |
6df509ba2a031a1c64414c4761fbb8d33ed37f2d016cf89c5176addb2be3135d
|
File details
Details for the file prettyconfi-0.1.2-py3-none-any.whl.
File metadata
- Download URL: prettyconfi-0.1.2-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0f1a079d39116a5dd2aab358b89d9af078eae7ec93ea6e4af08eb878a96345a
|
|
| MD5 |
9ca4d63c4b4c1fab93ab558a2f1fecaa
|
|
| BLAKE2b-256 |
4050c5a431d1d9ee468f99346cf36566a7d059d49f68168e2bed64e0c4a1bb5f
|