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.0.1.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

dtu_config-0.0.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file dtu_config-0.0.1.tar.gz.

File metadata

  • Download URL: dtu_config-0.0.1.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for dtu_config-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0fc779bb4f09b5ff77bfc53f20204a066d2f7bbb625f632d347a2a339a20b1d2
MD5 e76f2a5e62503fd1ccd288e746103e91
BLAKE2b-256 2c7721a4fe8c9d3d461d61bc8ac61827297ea153f3c28db18b8dfcb4e7e0c999

See more details on using hashes here.

File details

Details for the file dtu_config-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: dtu_config-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for dtu_config-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4328ff207b12e27d4c113f721f07accc5592cb626636534c3207c57c1a9e25c7
MD5 abd028f117f5cdf3904711a3d836f01e
BLAKE2b-256 5306bff31177a63605af85beac71e7451ed248961693a2e420180f216f6ce49d

See more details on using hashes here.

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