Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A simple package for easy work with cfg files

Project description

Let's work with a config files easy!

Usage

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for easycfg, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size easycfg-1.0.1-py3-none-any.whl (3.2 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size easycfg-1.0.1.tar.gz (2.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page