Skip to main content

Schema-driven configuration wizard for CLI and web

Project description

prettyconfig

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 prettyconfig          # core (web-only)
pip install prettyconfig[cli]     # with interactive CLI prompts

Quick Start

import prettyconfig
from pathlib import Path

# Load and merge schemas
schemas = prettyconfig.load_schemas([Path("base.toml"), Path("app.toml")])
composed = prettyconfig.compose(schemas)

# Interactive CLI
runner = prettyconfig.CLIRunner(composed)
answers = runner.run()

# Save results
prettyconfig.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.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.1.0-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prettyconfi-0.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 f3d1a8717a3a7a147ff94a6561758295754fa24a2ffa98dc99428a4ff65d7715
MD5 add7a2fd2ab0869e65765c97caddbb6e
BLAKE2b-256 48620eaf5c9e336090a0f326aab848cd4a3f95ef4193bdc42646ae9c74580fd9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: prettyconfi-0.1.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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78072e78df819ea18982e00ada6648b7303cc28828f8d958222c6920f2b3942b
MD5 137a672ec987d148208ea221117e3065
BLAKE2b-256 6934d7e364d34bb20cc8558c758e5464941c6ae60c5523a961e0a0ae223c9601

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