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 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