Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Use configtool from the shell to validate, pretty-print, get or set config values::

With no arguments you will output the same config file, you can use this feature
to validate the file.

$ config.ini > python -m configtool
[app]
name = rocket
description = A app to launch a Space Rocket
[uwsgi]
socket = /var/run/spacerocket.socket

-get argument will print the value of the key on the section you want, you can
also do -section and -get will use that for section.

$ cat config.ini | python -m configtool -get app.name
rocket
$ cat config.ini | python -m configtool -section app -get description
A app to launch a Space Rocket

Specify just the section, and it will output the config syntax for just that
section

$ cat config.ini | python -m configtool -get app
[app]
name = rocket
description = A app to launch a Space Rocket

Easily update values, just by using set

$ python -m configtool -set app.name "spacerocket" > config.ini
$ cat config.ini
[app]
name = spacerocket
description = A app to launch a Space Rocket

You can also convert syntax if you had json or yaml python modules available::

$ cat config.ini | python -m configtool -o yaml
app:
name: spacerocket
description: A app to launch a Space Rocket

$ config.ini > python -m configtool -o json
{"app":{"name":"spacerocket","description":"A app to launch a Space Rocket"}}

Release history Release notifications | RSS feed

This release

0.1a This release

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page