A simple way to configure python libraries
Project description
FigCon
A simple way to configure applications using pure python files.
Quickstart
# contents of default config (base_config.py)
bob = 1
harry = {0: 1, 1: 3}
# contents of secondary config (~/config.py)
bob = 2
harry = {1: 2, 3: 4}
# contents of primary config (config.py)
bill = 4
harry = {1: 6}
# now use the configuration:
from figcon import Figcon
# give figcon a path to the default config file
config = Figcon(default_path='base_config', primary_path='config.py',
secondary_path='~')
# objects are updated based on lowest priority (default) to highest (primary)
assert config.bob == 2
assert config.harry == {0:1, 1: 6, 3:4}
Features
- 3 step hierarchical configuration using a default, primary, and secondary config file.
- Config files are pure python which allow lots flexibility.
- Dont use this if you don't trust your users.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
figcon-0.0.0.tar.gz
(3.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file figcon-0.0.0.tar.gz.
File metadata
- Download URL: figcon-0.0.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9104f14d076aa4c71eda04812ee8c7040407de852a9f3e7887f8c5a4105da26d
|
|
| MD5 |
670225f172ccb162263740582b301870
|
|
| BLAKE2b-256 |
de2cc702dc6167985f10af275b5954e9335979a6ed56bbf9171ee872ec8ffa41
|
File details
Details for the file figcon-0.0.0-py3-none-any.whl.
File metadata
- Download URL: figcon-0.0.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efdf0b04c498b928d06e18e2a6346ac022be24c8d1f9a66d03ed86b87ff18533
|
|
| MD5 |
15116756f280c334ec083ae75cb2a1f2
|
|
| BLAKE2b-256 |
f6f032fc4be23c8d14bed14e3369f5c6337d9b7da4e98842dbf2de71680c9d58
|