Skip to main content

A simple config lib

Project description

FastConf

Simple lib for configuration

pypi

Install

$ pip install fastconf

Example project structure

main.py
core/
    __init__.py
    config.py

main.py

from core import config
print('TOKEN:', config.TOKEN)

core/config.py

import fastconf
TOKEN = '...'
fastconf.config(__name__)

Run project:

$ python main.py
TOKEN: ...

The config.yml file is created in the project root directory.

Change him:

TOKEN: 'MY_TOKEN'

Run again

$ python main.py
TOKEN: MY_TOKEN

fastconf.config(name, file='config.yml', root=ROOT_DIR)

name - current name of config module
file - name config file
dir - path to config dir

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

fastconf-1.0.0.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

fastconf-1.0.0-py3-none-any.whl (3.4 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