configalchemy-0.5.5
توضیحات
The Settings and Configuration on ideal practices for app development.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | configalchemy-0.5.5 |
| نام | configalchemy |
| نسخه کتابخانه | 0.5.5 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | GuangTian Li |
| ایمیل نویسنده | guangtian_li@qq.com |
| آدرس صفحه اصلی | https://github.com/GuangTianLi/configalchemy |
| آدرس اینترنتی | https://pypi.org/project/configalchemy/ |
| مجوز | - |
=============
ConfigAlchemy
=============
.. image:: https://img.shields.io/pypi/v/configalchemy.svg
:target: https://pypi.python.org/pypi/configalchemy
.. image:: https://github.com/GuangTianLi/configalchemy/workflows/test/badge.svg
:target: https://github.com/GuangTianLi/configalchemy/actions
:alt: CI Test Status
.. image:: https://readthedocs.org/projects/configalchemy/badge/?version=latest
:target: https://configalchemy.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://img.shields.io/pypi/pyversions/configalchemy.svg
:target: https://pypi.org/project/configalchemy/
.. image:: https://codecov.io/gh/GuangTianLi/configalchemy/branch/master/graph/badge.svg
:target: https://codecov.io/gh/GuangTianLi/configalchemy
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
The Settings and Configuration on ideal practices for app development and package building.
* Free software: MIT license
* Documentation: https://configalchemy.readthedocs.io.
Installation
----------------
.. code-block:: shell
$ pipenv install configalchemy
✨🍰✨
Only **Python 3.6+** is supported.
Example
--------
.. code-block:: python
from configalchemy import BaseConfig
class DefaultConfig(BaseConfig):
NAME = "test"
config = DefaultConfig()
config.NAME
>>> 'test'
Features
----------
- Base on `The Twelve-Factor App Configuration <https://12factor.net/config>`_.
- Configurable dynamic configurator
- Configuration-Oriented Development
- Define default config value and its type which is used in your project
- Use class to support inheritance to explicitly define configurable config
- Override config value from multiple source with **priority supported**
- Callable function return value
- File (default: json)
- Environment Variables
- **Proper Typecast** before overriding
- Generic Config Type Support by custom typecast
- Lazy and Proxy Object Support.
- Extension
- Full `Apollo - A reliable configuration management system <https://github.com/ctripcorp/apollo>`_ Features Support
TODO
-------
- IOC - Injector, Singleton
=======
History
=======
0.5.* (2020-12)
------------------
* Support SingletonMetaClass
* Remove unpack feature in `BaseConfig` by removing Mapping Class
* Support nested config for large modular purpose
* Support local object
* Support generic pool object
* Support Dot Notation to update `BaseConfig` object
0.4.* (2020-06)
------------------
* Refatory configure function
* Support property configuration
0.3.* (2020-03)
------------------
* Add proxy and lazy module.
* Add find_caller to trace source of config value
* Refactory ConfigMeta data structure
0.2.* (2019-08)
------------------
* Change global variable to weak reference
* Remove Lock (Prepare to implement optimistic raw lock if necessary)
* Improve Priority Data Structure
* Improve Field Validation
* Use OOP to define call function
* Properer validation and typecast
* Improve Type Annotations
* Import JSON type
0.1.0 (2019-08-01)
------------------
* Init Project.
نیازمندی
| مقدار | نام |
|---|---|
| - | contextvars |
| - | requests |
| - | requests |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6.0 | Python |
نحوه نصب
نصب پکیج whl configalchemy-0.5.5:
pip install configalchemy-0.5.5.whl
نصب پکیج tar.gz configalchemy-0.5.5:
pip install configalchemy-0.5.5.tar.gz