Skip to main content

Import JSON/YAML like importing .py files

Project description

Build Status

ezcf stands for easy configuration, it allows you to import JSON/YAML like importing .py files, which is very useful for reading conf files with these formats.

Install

pip install ezcf

Note: if you run into error: yaml.h: No such file or directory, don’t worry, you can still use ezcf without any problem.

Sample Usage

├── subdir
│   ├── __init__.py
│   └── sample_yaml.yaml
├── test_normal.py
└── sample_json.json

If you want to use configurations in sample_yaml.yaml and sample_json.json, here’s how:

import ezcf
from subdir.sample_yaml import *
from sample_json import something

You can assume they’re regular python files.(Currently ezcf only supports files with utf-8 encoding)

ezcf is still in developement, use it at your own risk. If you find any bug, please report it in issues.

Roadmap

  • [x] Use dot to seperate folder/subfolder/file

  • [x] Unicode support

  • [x] JSON support

  • [x] YAML support

  • [ ] INI support

  • [ ] Auto encoding detect?

  • [x] CI

  • [ ] coverage

  • [x] pypi

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

ezcf-0.0.1.dev1.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distribution

ezcf-0.0.1.dev1-py2.py3-none-any.whl (6.7 kB view hashes)

Uploaded Python 2 Python 3

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