Skip to main content
Simple python configuration tool
================================
ezcfg is a python package that allow you to easily maintain and access
configuration throughout your project

* easy registration of configuration
* easy access to configuration
* easy type validation of configuration
* easy loading of configuration from json, ini, or environment variables

How to install
--------------
```bash
pip install ezcfg
```

How to use
----------
register your first configuration
```python
from ezcfg.config import ezcfg
ezcfg.register_config(name='myfirstconfig', config_type=str, default='configvalue')

# Access of configuration
print(ezcfg.myfirstconfig)
# "configvalue"
```
load your config from ini, json, and environment variables
```python
from ezcfg.config import ezcfg
ezcfg.register_config(name='myfirstconfig', config_type=str, default='configvalue')
# load config from json file
ezcfg.load_config_from_json_file('myconfigpath.json')

# load config from ini file
ezcfg.load_config_from_ini_file('myconfigpath.ini', section='DEFAULT')

# load config from environment variables
# you first need to set env_var name
ezcfg.register_config(name='myfirstconfig', config_type=str, default='configvalue', env_var='MYFIRSTCONFIG')
# this will load from MYFIRSTCONFIG env var
ezcfg.load_config_from_env()
```
automatic type checking
```python
from ezcfg.config import ezcfg
# will raise TypeError
ezcfg.register_config(name='myfirstconfig', config_type=int, default='configvalue')
```

status
------
[![Build Status](https://travis-ci.com/shalev67/EZconfig.svg?branch=master)](https://travis-ci.com/shalev67/EZconfig)


Metadata

Release files for ezcfg 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ezcfg 0.1.2
File Size Uploaded
ezcfg-0.1.2.tar.gz 2.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ezcfg 0.1.2
File Interpreter ABI Platform
ezcfg-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 5.7 kB

Release files / ezcfg-0.1.2.tar.gz

Download URL ezcfg-0.1.2.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ca5a6d4436775ad4aa6dddedc89b5b6fefb250e154d8fedbecd402269297bcfb
BLAKE2b-256 checksum
How to use checksums
d3028c0756fc400e6530ec17f3c2ec0eb3ab10126dc201d93c6290e5c45b3cf4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.5

Release files / ezcfg-0.1.2-py3-none-any.whl

Download URL ezcfg-0.1.2-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce1628fefbbcc660a93e887d3f45f1d962a383c9f35fc1a89f317e407bb9db92
BLAKE2b-256 checksum
How to use checksums
97a47daee5aca18d26e886c0fb81f0a9ba2d94febc5af2e8219ab29719730e84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.5

Release history Release notifications | RSS feed

0.1.3

2 release files

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page