A simple package for easy work with cfg files
Project description
Let's work with a config files easy!
Fast example:
config.yml
servers:
- host: example1.com
login: login1
password: password1
- host: example2.com
login: login2
password: password2
- host: example3.com
login: login3
password: password3
env: prod
>>> from easycfg import Config
>>> cfg = Config('config.yml')
>>> cfg.servers
[{'host': 'example1.com', 'login': 'login1', 'password': 'password1'}, {'host': 'example2.com', 'login': 'login2', 'password': 'password2'}, {'host': 'example3.com', 'login': 'login3', 'password':
'password3'}]
>>> cfg.servers[2]
{'host': 'example3.com', 'login': 'login3', 'password': 'password3'}
>>> cfg.servers[:2]
[{'host': 'example1.com', 'login': 'login1', 'password': 'password1'}, {'host': 'example2.com', 'login': 'login2', 'password': 'password2'}]
>>> cfg.servers.login
['login1', 'login2', 'login3']
easycfg supports json and yaml formats now
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
easycfg-1.0.2.tar.gz
(2.3 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 easycfg-1.0.2.tar.gz.
File metadata
- Download URL: easycfg-1.0.2.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b152f1859d9850a30167091e2334db53667754eae1cca0458f2895d7c665fe9
|
|
| MD5 |
f84b3c1776a50a14a95bbc0a90cd1991
|
|
| BLAKE2b-256 |
b8ff8ec410db2461c2b61858c963a31d84a9614086b824cbc4b758173baf72c8
|
File details
Details for the file easycfg-1.0.2-py3-none-any.whl.
File metadata
- Download URL: easycfg-1.0.2-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03fca6f16900b76c660375417f511d184e14f524071388d65d858a79415976fb
|
|
| MD5 |
935e24838fb374b5f50e70a6b3ab1d20
|
|
| BLAKE2b-256 |
0d0ee3a7208c167e4a385e0834528d01da0dc60d74baef58433fb83b2dfdf3c1
|