Skip to main content

A library to add a configuration file to your project

Project description

DTU Configuration

This package provides a configuration class to get, process, edit and store user input.

It is a thin wrapper around ConfigParser that provides utilities for adding validated configuration options and prompting the user for them, or allowing them to be filled by a CLI.

Usage

from dtu_conf import DtuConfig
app_name = "example_app"
app_author = "author_name"
conf = DtuConfig(app_name=app_name, app_author=app_author)

# Add options.

conf.add_str(
    "User metadata", "institution",
    input_text="Please enter your institution"
)
conf.add_email(
    "User metadata", "email",
    input_text="Please enter your email (optional)",
    required=False
)
conf.create_config()

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

dtu_config-0.1.tar.gz (16.3 kB view hashes)

Uploaded Source

Built Distribution

dtu_config-0.1-py3-none-any.whl (7.3 kB view hashes)

Uploaded Python 3

Supported by

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