{
"info": {
"author": "Alexander Zelenyak",
"author_email": "zzz.sochi@gmail.com",
"bugtrack_url": null,
"classifiers": [
"License :: OSI Approved :: BSD License",
"Operating System :: POSIX",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5"
],
"description": "====\nZini\n====\n\n.. image:: https://travis-ci.org/zzzsochi/zini.svg?branch=master\n :target: https://travis-ci.org/zzzsochi/zini\n :align: right\n\n.. image:: https://coveralls.io/repos/github/zzzsochi/zini/badge.svg?branch=master\n :target: https://coveralls.io/github/zzzsochi/zini?branch=master\n :align: right\n\n\nINI-files parser with schemes and types\n\n------------------\nPhilosophy of Zini\n------------------\n\nApplication's settings must be simple!\nIn it should be a code or complex structures. Must be only a simple types.\n\n\n----------\nWhy not...\n----------\n\n`JSON `_?\n-------------------------------\n\nJSON is uncomfortable and unextendable.\n\n\n`YAML `_?\n-------------------------------\n\nThe YAML is like a garden of rakes. It's very complex format.\nI do not need all it's futures.\n\n\n`Configparser `_?\n----------------------------------------------------------------------\n\n1. Configparser is ugly;\n2. Configparser is overengineered;\n3. Configparser is not have type casting;\n4. Configparser is not have type checking;\n5. Configparser is... configparser.\n\n\n---------------\nSupported types\n---------------\n\n:boolean: simple ``true`` or ``false``, e.g. ``key = true``\n:int: simple numeric type, e.g. ``key = 13``\n:float: float type, e.g. ``key = 3.14``\n:string: strings *always* uses quotes, e.g. ``key = \"some string\"``\n:datetime: datetime formated like as ISO 8601\n\n * ``YYYY-MM-DD``\n * ``YYYY-MM-DD hh:mm``\n * ``YYYY-MM-DD hh:mm:ss``\n * ``YYYY-MM-DD hh:mm:ss.sss``\n\n When the time, you can set timezone as ``Z`` or ``\u00b1hh:mm``.\n\n E.g.:\n\n * ``key = 2005-01-13``\n * ``key = 2005-01-13 18:05:00``\n * ``key = 2005-01-13 15:05:00 +03:00``\n * ``key = 2005-01-13 15:00Z``\n\n\n:timedelta: durations:\n\n * ``key = 20m`` \u2014 20 minutes\n * ``key = 10h2m`` \u2014 10 hours and 2 minutes\n * ``key = 1w2s`` \u2014 one week (7 days) and 2 seconds\n * ``key = 1s20ms`` \u2014 one 2 second and 20 milliseconds\n * ``key = 1w1d1h1m1s1ms`` \u2014 694861001 milliseconds\n\n:list: list of values:\n\n .. code:: ini\n\n key =\n \"string value\"\n 2005-01-13 18:00:05\n 13\n\n--------\nExamples\n--------\n\n``$ cat tests/test.ini``\n\n.. code:: ini\n\n # first comment\n [first]\n boolean = false\n integer = 13\n\n [second]\n ; second comment\n boolean = true\n string = \"some string\"\n\n [complex]\n list =\n \"string\"\n \"string too\"\n \"else string\"\n\nSimple reading\n--------------\n\n.. code:: python\n\n >>> from zini import Zini\n >>> ini = Zini()\n >>> result = ini.read('tests/test.ini')\n >>> isinstance(result, dict)\n True\n >>> result['first']['boolean'] is False # automatic type casting\n True\n >>> result['first']['integer'] == 13\n True\n >>> result['second']['string'] == \"some string\"\n True\n >>> result['complex']['list'] == [\"string\", \"string too\", \"else string\"]\n True\n\nTypes and defaults\n------------------\n\n.. code:: python\n\n >>> from zini import Zini\n >>> ini = Zini()\n >>> ini['first']['integer'] = str # set type\n >>> result = ini.read('tests/test.ini')\n zini.ParseError: error in line 3: 'integer = 13'\n\n.. code:: python\n\n >>> from zini import Zini\n >>> ini = Zini()\n >>> ini['second']['boolean'] = \"string\" # set type and default value\n >>> result = ini.read('tests/test.ini')\n zini.ParseError: error in line 7: 'boolean = true'\n\n\nLists of values\n~~~~~~~~~~~~~~~\n\n.. code:: python\n\n >>> import zini\n >>> ini = zini.Zini()\n >>> ini['third']['generic'] = [str]\n >>> result = ini.read('tests/test.ini')\n ParseError: error in line 20: ' 10'\n\n",
"description_content_type": null,
"docs_url": null,
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/zzzsochi/zini",
"keywords": "ini,settings,config,configure,configuration",
"license": "UNKNOWN",
"maintainer": null,
"maintainer_email": null,
"name": "zini",
"package_url": "https://pypi.org/project/zini/",
"platform": "UNKNOWN",
"project_url": "https://pypi.org/project/zini/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/zzzsochi/zini"
},
"release_url": "https://pypi.org/project/zini/1.1.0/",
"requires_dist": null,
"requires_python": null,
"summary": "INI-files parser with schemes and types",
"version": "1.1.0"
},
"last_serial": 2417529,
"releases": {
"1.0.0": [],
"1.0.1": [
{
"comment_text": "",
"digests": {
"md5": "8693e6a73664099ecd66b98fc631ca88",
"sha256": "edf3a165077d7ef969ad612f82b7b618e7910a16e2c5b6aeff42e18f3582ad9e"
},
"downloads": -1,
"filename": "zini-1.0.1.tar.bz2",
"has_sig": false,
"md5_digest": "8693e6a73664099ecd66b98fc631ca88",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3935,
"upload_time": "2016-01-19T21:18:42",
"url": "https://files.pythonhosted.org/packages/f1/ca/63889e62cf042c479651f42f7f51a5e038d15384b750dad25ca31809bec7/zini-1.0.1.tar.bz2"
}
],
"1.0.2": [
{
"comment_text": "",
"digests": {
"md5": "6a7056f2ecc3d0ef0c623a433d21f77d",
"sha256": "c498234f692c3638a962a86523cb873d563d446ea37d4c86c1c9217d103fdcd0"
},
"downloads": -1,
"filename": "zini-1.0.2.tar.bz2",
"has_sig": false,
"md5_digest": "6a7056f2ecc3d0ef0c623a433d21f77d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3990,
"upload_time": "2016-01-23T19:14:12",
"url": "https://files.pythonhosted.org/packages/14/8d/1bc2dd9e96fa3c1765e321603f50ddd046c283cca11cb2f6a69b256350fb/zini-1.0.2.tar.bz2"
}
],
"1.1.0": [
{
"comment_text": "",
"digests": {
"md5": "af9e507a72dac4dbab97946416a2ad27",
"sha256": "3525836ec7e59d964fa691a964a424ce3c2e5b2ff33ee33832bbb4af434cb4c9"
},
"downloads": -1,
"filename": "zini-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "af9e507a72dac4dbab97946416a2ad27",
"packagetype": "bdist_wheel",
"python_version": "3.5",
"requires_python": null,
"size": 5143,
"upload_time": "2016-10-22T22:06:16",
"url": "https://files.pythonhosted.org/packages/22/28/f74d3931788d26e45d7f28d1469ee5a6811b2bd7ea4ebd998a1cacbdbfde/zini-1.1.0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "33eb739f551aa88e8986636ee57095fc",
"sha256": "ac1e91180b8d483eff1697332c774860983cf927c24810aae47011f00279c554"
},
"downloads": -1,
"filename": "zini-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "33eb739f551aa88e8986636ee57095fc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5241,
"upload_time": "2016-10-22T22:06:23",
"url": "https://files.pythonhosted.org/packages/ee/e8/00051aae34d941df588e45b82f86d0602df90da6ed129ed77c43a74e502b/zini-1.1.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "af9e507a72dac4dbab97946416a2ad27",
"sha256": "3525836ec7e59d964fa691a964a424ce3c2e5b2ff33ee33832bbb4af434cb4c9"
},
"downloads": -1,
"filename": "zini-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "af9e507a72dac4dbab97946416a2ad27",
"packagetype": "bdist_wheel",
"python_version": "3.5",
"requires_python": null,
"size": 5143,
"upload_time": "2016-10-22T22:06:16",
"url": "https://files.pythonhosted.org/packages/22/28/f74d3931788d26e45d7f28d1469ee5a6811b2bd7ea4ebd998a1cacbdbfde/zini-1.1.0-py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "33eb739f551aa88e8986636ee57095fc",
"sha256": "ac1e91180b8d483eff1697332c774860983cf927c24810aae47011f00279c554"
},
"downloads": -1,
"filename": "zini-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "33eb739f551aa88e8986636ee57095fc",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5241,
"upload_time": "2016-10-22T22:06:23",
"url": "https://files.pythonhosted.org/packages/ee/e8/00051aae34d941df588e45b82f86d0602df90da6ed129ed77c43a74e502b/zini-1.1.0.tar.gz"
}
]
}