PyConfigurathon
A python package for making it easy to use and manage configuration files in your python applications.
Installation
Using poetry
`poetry add pyconfigurathon`
Using pip
`pip install pyconfigurathon`
How to use
The recommended way to use this module is to have a module dedicated to your configuration. Eg. config.py
Use with an absolute path to the configuration file:
from pyconfigurathon.configurator import configurator
def get_config(config_name, file_path="/path/to/file/settings.json"):
cf = configurator(file_path)
return cf.get(config_key=config_name)
Use with a path to the configuration file relative to the config.py file
import os
from pyconfigurathon.configurator import configurator
def get_config(config_name, file="settings.json"):
conf = configurator(os.path.join(os.path.dirname(__file__), file))
return conf.get(config_key=config_name)
Please note that these are only examples to help you get started faster. There are other ways to use this package.
Release files for pyconfigurathon 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyconfigurathon-0.1.2.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyconfigurathon-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.0 kB
Release files / pyconfigurathon-0.1.2.tar.gz
| Download URL | pyconfigurathon-0.1.2.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ce65c8300d3acfa9010c237239d1386f81da64e7581ad1b5c32b868876d4c64
|
|
BLAKE2b-256 checksum How to use checksums |
242a0160019ae38cee214798faf111921a793d329dd2af6ab3514756153abbfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.6 Linux/5.8.0-7630-generic
|
Release files / pyconfigurathon-0.1.2-py3-none-any.whl
| Download URL | pyconfigurathon-0.1.2-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b8ddc9dc384d4a086f63a41779de8a649598e332f2094f320bafe9343d838ee1
|
|
BLAKE2b-256 checksum How to use checksums |
6f12ea65edf42b531a694f273729aab350f7897923f1eedfe069832c179b3303
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.0.10 CPython/3.8.6 Linux/5.8.0-7630-generic
|