aratrum-0.3.2
توضیحات
A simple json configuration handler.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | aratrum-0.3.2 |
| نام | aratrum |
| نسخه کتابخانه | 0.3.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Jacopo Cascioli |
| ایمیل نویسنده | jacopocascioli@gmail.com |
| آدرس صفحه اصلی | https://github.com/Vesuvium/aratrum |
| آدرس اینترنتی | https://pypi.org/project/aratrum/ |
| مجوز | MIT |
Aratrum
#######
|Pypi| |Build Status| |Code Climate|
A simple configuration handler that reads a JSON config file and provides
methods to interact with it.
Was it really necessary to make a package for such a simple thing?
Maybe not, but I like the DRYness of it, since almost every app will
need a configuration reader.
Installation
############
::
pip install aratrum
Usage
#####
Load a configuration file::
>>> from Aratrum import Aratrum
>>> config = Aratrum('config.json')
>>> options = config.get()
>>> print(type(options))
dict
Set a value in the config and save it::
>>> config = Aratrum('config.json')
>>> config.get()
>>> config.set('server', 'somewhere')
>>> config.save()
.. |Build Status| image:: https://img.shields.io/travis/Vesuvium/aratrum.svg?maxAge=3600&style=flat-square
:target: https://travis-ci.org/Vesuvium/aratrum
.. |Pypi| image:: https://img.shields.io/pypi/v/aratrum.svg?maxAge=3600&style=flat-square
:target: https://pypi.python.org/pypi/aratrum
.. |Code Climate| image:: https://img.shields.io/codeclimate/github/Vesuvium/aratrum.svg?maxAge=3600&style=flat-square
:target: https://codeclimate.com/github/Vesuvium/aratrum
نحوه نصب
نصب پکیج whl aratrum-0.3.2:
pip install aratrum-0.3.2.whl
نصب پکیج tar.gz aratrum-0.3.2:
pip install aratrum-0.3.2.tar.gz