Skip to main content

A basic config package that reads a JSON config file, environment variables, and console arguments (prioritized in that order)

Project description

PrefRef

Config init in __main__

Subsection

example code

Boolean Arguments

There are two types of boolean arguments supported as a Config_Option, the property 'is_flag' will determine how the boolean is handled.

If 'is_flag' is true, the option can only be set by environment variable or console argument and cannot be stored in a config file. Passing the argument or having the environment variable existing, with or without explicitly setting it to a true/false value, will set the Config_Option value to True. Otherwise, the value will be set to the default value of the Config_Option.

If 'is_flag' is false, the option can also be stored in a config file. You can either pass the console argument or have the environment variable set without an explicit statement of true/false to set it to True OR set it explicitly by passing/setting the value to true or false.

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

prefref-24.5.701.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

prefref-24.5.701-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file prefref-24.5.701.tar.gz.

File metadata

  • Download URL: prefref-24.5.701.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for prefref-24.5.701.tar.gz
Algorithm Hash digest
SHA256 f95ad6c3af3e60a7f9fd59066095ac6f0d2549754fcef5e5a60734142871d06a
MD5 0a7f06252b6ad93df98860fe3c7b6ef0
BLAKE2b-256 f85621d892480b1c5660294f8fca977fa5b69521f2994ccf63f4075b1e07f641

See more details on using hashes here.

File details

Details for the file prefref-24.5.701-py3-none-any.whl.

File metadata

  • Download URL: prefref-24.5.701-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.1

File hashes

Hashes for prefref-24.5.701-py3-none-any.whl
Algorithm Hash digest
SHA256 d83bc58146a7d3661ceae8ff45c75553ef2436fc32a88912b53d8e4bfc75436f
MD5 8849c563f14acfd5a9cc541dd0801bea
BLAKE2b-256 d990f308ac25d0edbff1dac8d06452880f3c60133bcf6673611cc3149de8e24c

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