Skip to main content

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.2.0.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prettyconfi-0.2.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file prettyconfi-0.2.0.tar.gz.

File metadata

  • Download URL: prettyconfi-0.2.0.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for prettyconfi-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b7558130917ff59d4fca40e57b1ea3a94b1b2144b1214f7b3269e72f01a93063
MD5 46d0bdd6f08868623bfc3423d4765fbd
BLAKE2b-256 ab4c878b4ee7f1cdd60f21f95e74a71a79c367fb7337c0b188a0eaf678705ed1

See more details on using hashes here.

File details

Details for the file prettyconfi-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: prettyconfi-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for prettyconfi-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2a556ea900b15a04ad8347ea2ef69ac4fedc6cd4c0d4b799509455339f42888b
MD5 2a9309f781838daf8e2e7a830719b89e
BLAKE2b-256 1e93a381c6bee6b58604eed82539dba64b45ada04eaf88b8801c531de9b1f5b8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page