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.1.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.1-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prettyconfi-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 29f2aed0a3dc37554378095ac05c32654c0bad6d1f60a24bb6704b3e162de73e
MD5 61a303c775f619b1bfab925ccb8bfac0
BLAKE2b-256 6365dd205a88d3623b49f64888b12e458162ff45a4c813f60e68f27487f1fb9d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: prettyconfi-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cc41f35328e687c6bb576013b715571f78460cb83461300382066361f7f0664e
MD5 de3d26105b008a29c2c73a85a2bbe264
BLAKE2b-256 86ad616896e59d51700538179e75a689abbef0504867fec27f2ade8e1c82a1cf

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