Skip to main content

utility library to find and load configuration files

Project description

config-library

utility library to find and load configuration files

Installation

pip install config-library

Usage Example

import configs

config = configs.findAndLoad('app.conf', 'project')

project-structure

/
├─ etc/
├─ home/user/
│  ├─ path/to/repo/
│  │  ├─ src/code/
│  │  │  ├─ main.py
│  ├─ .config/

places to search for the config-file

  • /home/user/path/to/repo/src/code/app.conf
  • /home/user/path/to/repo/src/code/project/app.conf
  • /home/user/path/to/repo/app.conf
  • /home/user/path/to/repo/project/app.conf
  • /home/user/.config/app.conf
  • /home/user/.config/project/app.conf
  • /etc/app.conf
  • /etc/project/app.conf

Supported Config-Types

  • .json
  • .ini/.conf
  • .toml (python3.11+)
  • .yaml (if pyyaml is installed)

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

config-library-0.2.0.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

config_library-0.2.0-py3-none-any.whl (7.2 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