Skip to main content

A simple package for easy work with cfg files

Project description

Let's work with a config files easy!


Fast example:


  - host:
    login: login1
    password: password1
  - host:
    login: login2
    password: password2
  - host:
    login: login3
    password: password3
env: prod
>>> from easycfg import Config
>>> cfg = Config('config.yml')
>>> cfg.servers
[{'host': '', 'login': 'login1', 'password': 'password1'}, {'host': '', 'login': 'login2', 'password': 'password2'}, {'host': '', 'login': 'login3', 'password':
>>> cfg.servers[2]
{'host': '', 'login': 'login3', 'password': 'password3'}
>>> cfg.servers[:2]
[{'host': '', 'login': 'login1', 'password': 'password1'}, {'host': '', 'login': 'login2', 'password': 'password2'}]
>>> cfg.servers.login
['login1', 'login2', 'login3']

easycfg supports json and yaml formats now

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

easycfg-1.0.2.tar.gz (2.3 kB view hashes)

Uploaded source

Built Distribution

easycfg-1.0.2-py3-none-any.whl (3.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page