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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 2Python 3

File details

Details for the file ezcf-0.0.1.dev1.tar.gz.

File metadata

  • Download URL: ezcf-0.0.1.dev1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ezcf-0.0.1.dev1.tar.gz
Algorithm Hash digest
SHA256 303436a0d6fb5f5ea558d92030b27ef6d0a4e25a3e50c44aac9b5b177f60aefc
MD5 0c56fdab5cb1241cc356fc876c5167a2
BLAKE2b-256 25dbf171f7fdfc6c393465b567f898f657dd06cb8c11f343b2fe1863267f22ca

See more details on using hashes here.

File details

Details for the file ezcf-0.0.1.dev1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for ezcf-0.0.1.dev1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b698df840a9d303f8113b7bd70f5f6d5c8ccf99a475f0248a36133949fa27931
MD5 13fe57dca26bd183363d4aeafd9068f2
BLAKE2b-256 1ee446ad27c2f86d5b50ab9372920f793750f1a96ee55eebee578d0fb20617f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page