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.1.3.tar.gz (20.4 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.3-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: prettyconfi-0.1.3.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

Hashes for prettyconfi-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6e9baaf0135d8e6adc0362fa6170b074105a5b468c230568d361ec88ef041bbe
MD5 098f181f88b80634e16033feb7859555
BLAKE2b-256 c55b34f80f3f22b342a1cfa5645e91f7d9441b7c5ef403173e8bb215268fc7a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: prettyconfi-0.1.3-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

Hashes for prettyconfi-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 dadad81c91075dbcc1c8fddad98e21d8a69fbb3b2df9fdf5f3bf5f0e6c07b32d
MD5 064de7c9ade4c479e5d7f0a15130eb3b
BLAKE2b-256 2820cbdcfa1c867dfdd69694e8f2b6ad39299dfe0fecdaf73fb4eef81472cade

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