{ "info": { "author": "Antoine Millet", "author_email": "antoine@inaps.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Text Processing" ], "description": "=======\nDotconf\n=======\n\nDotconf is an advanced configuration parser which allow nested sections to any\nlevel, typed values in syntax, file include and so more. Dotconf is also\nshipped with a powerful schema validation system.\n\nThe full documentation can be found here: http://dotconf.readthedocs.org\n\n.. image:: https://www.ohloh.net/p/dotconf-python/widgets/project_thin_badge.gif\n :target: https://www.ohloh.net/p/dotconf-python?ref=sample\n\n\nFeatures\n--------\n\n- Configuration format kept as simple as possible.\n- Developer friendly APIs.\n- Types are expressed in the syntax, so the parser can guess it without\n validation.\n- Four primitive types: string, number, boolean, or list.\n- More complex composite types can be created using the schema validation\n system.\n- Nested section of any deep. Sections can take a special \"argument\" value\n (look at the example).\n- Schema validation system, all schema can be defined using declarative or\n imperative way.\n- External file include with globbing.\n- Integration with argparse.\n- Tests (only parser is covered yet)\n- Released under MIT license.\n\n\nExample\n-------\n\nThis is an example of configuration file for an imaginary web server::\n\n\n daemon = yes\n pidfile = '/var/run/myapp.pid'\n interface = '0.0.0.0:80'\n interface_ssl = '0.0.0.0:443'\n\n host 'example.org' {\n path '/' {\n rate_limit = 30\n }\n }\n\n host 'protected.example.org' {\n enable_ssl = yes\n\n path '/files' {\n enable_auth = yes\n user 'foo' {\n password = 'bar'\n }\n }\n }\n\nYou can access to each values using the developer friendly API::\n\n >>> from dotconf import Dotconf\n >>> parsed_conf = Dotconf.from_filename('mywebserver.conf').parse()\n >>> print parsed_conf.get('daemon', False)\n True\n\n\nEven more exciting, you can create a validation schema to avoid you the\npainful chore of manual configuration file validation::\n\n from dotconf.schema.containers import many, once\n from dotconf.schema.containers import Section, Value\n from dotconf.schema.types import Boolean, Integer, Float, String\n\n # Schema definition:\n\n class UserSection(Section):\n password = Value(String())\n _meta = {'repeat': many, 'unique': True}\n\n class PathSection(Section):\n rate_limit = Value(Float(), default=0)\n enable_auth = Value(Boolean(), default=False)\n user = UserSection()\n\n class VirtualHostSection(Section):\n enable_ssl = Value(Boolean(), default=False)\n path = PathSection()\n _meta = {'repeat': many, 'unique': True}\n\n class MyWebserverConfiguration(Section):\n daemon = Value(Boolean(), default=False)\n pidfile = Value(String(), default=None)\n interface = Value(String(), default='127.0.0.1:80')\n interface_ssl = Value(String(), default='127.0.0.1:443')\n host = VirtualHostSection()\n\nThen you can use the API exactly as if it was not validated::\n\n >>> conf = '''\n ... daemon = yes\n ... pidfile = '/var/run/myapp.pid'\n ... interface = '0.0.0.0:80'\n ... interface_ssl = '0.0.0.0:443'\n ...\n ... host 'example.org' {\n ... path '/' {\n ... rate_limit = 30\n ... }\n ... }\n ...\n ... host 'protected.example.org' {\n ... enable_ssl = yes\n ...\n ... path '/files' {\n ... enable_auth = yes\n ... user 'foo' {\n ... password = 'bar'\n ... }\n ... }\n ... }\n ... '''\n >>> from dotconf import Dotconf\n >>> from myconfschema import MyWebserverConfiguration\n >>> parsed_conf = Dotconf(conf, schema=MyWebserverConfiguration()).parse()\n >>> print 'daemon:', parsed_conf.get('daemon')\n daemon: True\n >>> for vhost in parsed_conf.subsections('host'):\n >>> print vhost.args\n >>> if vhost.get('enable_ssl'):\n >>> print ' SSL enabled'\n >>> for path in vhost.subsections('path'):\n >>> print ' ' + path.args\n >>> if path.get('enable_auth'):\n >>> print ' Following users can access to this directory:'\n >>> for user in path.subsections('user'):\n >>> print ' - ' + user.args\n >>>\n example.org\n /\n protected.example.org\n SSL enabled\n /files\n Following users can access to this directory:\n - foo\n\nSetup\n-----\n\nThe fastest and more common way to install Dotconf is using pip::\n\n pip install dotconf\n\nDebian\n~~~~~~\n\nIf you use Debian, you can also use the Tecknet repositories. Add this lines\nin your ``/etc/apt/source.list`` file::\n\n deb http://debian.tecknet.org/debian squeeze tecknet\n deb-src http://debian.tecknet.org/debian squeeze tecknet\n\nAdd the Tecknet repositories key in your keyring:\n\n # wget http://debian.tecknet.org/debian/public.key -O - | apt-key add -\n\nThen, update and install::\n\n # aptitude update\n # aptitude install python-dotconf\n\nArchlinux\n~~~~~~~~~\n\nIf you use Archlinux, a Dotconf package is available in Aur::\n\n yaourt -S python2-dotconf\n\n\nTODO\n----\n\n- More test.\n\n\nChangelog\n---------\n\nv1.8 08/09/13\n~~~~~~~~~~~~~\n\nThis new release bring a lot of bugfixes all reported by Stefan Tschiggerl.\nThanks to him for its time and its help to enhance Dotconf.\n\nChanges:\n\n- Fixed a bug where from_filename is not passing extra\n- Fixed examples in readme and docs\n- Fixed bad API usage in containers' argument validation\n- Handle the uniqueness validation of empty args\n- Added single subsection access method (eg: section.subsection('foo'))\n- Fixed optional section without occurrence not working\n- Fixed a bug when subsection method is used twice with the same name\n- Fixed traceback when a section is not in schema\n\nNew contributors:\n\n- Stefan Tschiggerl (bug report and fixes)\n\nv1.7 released on 31/07/13\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe major (and almost the only) change of this release is the compatibility with\nPython 3. This work has been done with the help of 2to3 with some thing fixed\nmanually. Enjoy!\n\n- Added compatibility with Python 3\n- Now use py.test instead of nosetests\n\nv1.6 released on 09/12/12\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis second stable release bring some bug fixes and features, the API has not\nbeen broken. I also registered the project on travis-ci and I will try to\nimprove the test coverage for the next release.\n\nChanges:\n\n- Added Choice container\n- Added a from_filename constructor the the Dotconf class\n- Added encoding management (by default, files are parsed in UTF-8)\n- Added continuous integration with travis\n- Fixed bug with Float type validation\n- Fixed an error when a section is included by an external file (thanks to\n DuanmuChun for its bug report and help to fix it)\n- Fixed other minor bugs\n\nNew contributors:\n\n- DuanmuChun (bug report and help to fix it)\n\nv1.5 released on 14/04/2012\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nFirst stable release of Dotconf has been released, development will now take\ncare of API compatibility. The project status has been changed to \"Beta\" on the\nPYPI, and should be \"Stable\" on the next release if no major bug is found.\nPackages will be updated for Debian and Archlinux, feel free to contact me if\nyou want to package it for your distro.\n\nChanges:\n\n- Added Eval, NamedRegex and RegexPattern types\n- Added TypedArray container\n- Fixed bug with scalar values from a singleton list in Value container\n- Fixed argument validation in Section container\n- Updated documentation (new tips and tricks section)\n\nNew contributors:\n\n- Ana\u00ebl Beutot (thanks for RegexPattern type and argument validation fix)\n\nv0.4 released on 07/04/2012\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Added debian package\n- Added IPSocketAddress type\n- Added Array container\n- Added release procedure\n- Fixed bug on IPAddress and IPNetwork types when ipaddr is missing\n- Fixed documentation build\n\nv0.3 released on 04/04/2012\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Added IPAddress, IPNetwork, Regex and Url types\n- Added min and max options on Integer type\n- Added units on number parsing (42k == 42000)\n- Fixed bug with validation of long numbers\n\nv0.2 released on 03/04/2012\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Added argparse integration feature & documentation\n- Cleanup\n\nv0.1 released on 24/03/2012\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n- Initial version.\n\n\nA note on versioning\n--------------------\n\nDotconf use a two numbers X.Y versioning. The Y part is incremented by one on\neach release. The X part is used as API compatibility indicator and will be\nincremented each time the API is broken.\n\n\nContribute\n----------\n\nYou can contribute to Dotconf through these ways:\n\n- Main Git repository: https://idevelop.org/p/dotconf/source/tree/master/\n- Bitbucket: https://bitbucket.org/NaPs/dotconf\n- Github: https://github.com/NaPs/Dotconf\n\nFeel free to contact me for any question/suggestion: .", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://idevelop.org/p/dotconf/", "keywords": "configuration parser dotconf conf", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "dotconf", "package_url": "https://pypi.org/project/dotconf/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/dotconf/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://idevelop.org/p/dotconf/" }, "release_url": "https://pypi.org/project/dotconf/1.8/", "requires_dist": null, "requires_python": null, "summary": "Advanced configuration parser for Python", "version": "1.8" }, "last_serial": 860219, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "5a9750edd0de76936f4400957536fb97", "sha256": "810ed3566ec59983d4fe7417f2bdb73b066ffe620503aa6dd389d8b787c91c62" }, "downloads": -1, "filename": "dotconf-0.1-py2.7.egg", "has_sig": false, "md5_digest": "5a9750edd0de76936f4400957536fb97", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 23216, "upload_time": "2012-03-24T11:07:52", "url": "https://files.pythonhosted.org/packages/1b/d0/befffc670d4026ba10b51ca75e2f3d93d26b58001025c30af979b96af0ca/dotconf-0.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "4101c99f44c68d0e1c1a064e401d46f6", "sha256": "88a289c89a4f9715e83d882003a24486047797a9d679e8756d5de75173dc8273" }, "downloads": -1, "filename": "dotconf-0.1.tar.gz", "has_sig": false, "md5_digest": "4101c99f44c68d0e1c1a064e401d46f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10991, "upload_time": "2012-03-24T11:07:51", "url": "https://files.pythonhosted.org/packages/8d/31/49a5f3d4f7d7f044982a1541d4d75b22f24472f90728736156883e3ca2c9/dotconf-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "e51312f940c7cc4109b9e1fd4a614b18", "sha256": "626ba4cf179737de58c54c80e202d05e04650f46fe7785f2073dab3d34fec2aa" }, "downloads": -1, "filename": "dotconf-0.2-py2.7.egg", "has_sig": false, "md5_digest": "e51312f940c7cc4109b9e1fd4a614b18", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 25474, "upload_time": "2012-04-03T23:40:14", "url": "https://files.pythonhosted.org/packages/13/18/125107761f3c9d2d4f73b6bed902d7965a5a6cbd809acb1de469eb2d74ce/dotconf-0.2-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "9fb08b8cb60a7f651562b69d30505439", "sha256": "c5b58530d5c1d211283c710d65c2b967bb077cccc2cfa8be39a5af648e45f369" }, "downloads": -1, "filename": "dotconf-0.2.tar.gz", "has_sig": false, "md5_digest": "9fb08b8cb60a7f651562b69d30505439", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11901, "upload_time": "2012-04-03T23:40:13", "url": "https://files.pythonhosted.org/packages/18/37/27dbdbc789b077616519a3a42b22b716064ace2021e1b1139f6d290b9d7d/dotconf-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "0b10424903013a4614bc5d83526688d8", "sha256": "0186804a11b26a0cdcd4983d63f91a9e3dc0d338547cc4b5e1e58a6beac84145" }, "downloads": -1, "filename": "dotconf-0.3-py2.7.egg", "has_sig": false, "md5_digest": "0b10424903013a4614bc5d83526688d8", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 28094, "upload_time": "2012-04-04T23:03:23", "url": "https://files.pythonhosted.org/packages/59/4c/9d65afe48e657d40defa9ab73fde556266b82a7cb6fc3dae7a26d8e29bcc/dotconf-0.3-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "77bf4bf7ba34e52b0db14c02f1cceeb1", "sha256": "5fd346929571f9d3d1ee36300ac5eda95bbfc708e42af02f8c04ff1bb43a32f2" }, "downloads": -1, "filename": "dotconf-0.3.tar.gz", "has_sig": false, "md5_digest": "77bf4bf7ba34e52b0db14c02f1cceeb1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12939, "upload_time": "2012-04-04T23:03:22", "url": "https://files.pythonhosted.org/packages/ba/3c/5ada1b073336b3386010286ed65f29f9c6bc5a0a83cc21ccfe312a042bb6/dotconf-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "78c78366a9db092f73f703c1c58c26fd", "sha256": "003e6dc46bf392d44197b0df207642b94932d3be8e70d51487148b560a3fd71a" }, "downloads": -1, "filename": "dotconf-0.4-py2.7.egg", "has_sig": false, "md5_digest": "78c78366a9db092f73f703c1c58c26fd", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 30613, "upload_time": "2012-04-07T23:20:01", "url": "https://files.pythonhosted.org/packages/74/f0/61e926470f3358e9baf43106d5ff327e3f9248f4f1b2897146ecbc3ed1de/dotconf-0.4-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "dc339195f5d07fe470e7e6aeb7809f55", "sha256": "d8f16fb08877dd019e24fec0b3db8d63a94a5665dc6cb6fe56b494031c53aae5" }, "downloads": -1, "filename": "dotconf-0.4.tar.gz", "has_sig": false, "md5_digest": "dc339195f5d07fe470e7e6aeb7809f55", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14369, "upload_time": "2012-04-07T23:20:00", "url": "https://files.pythonhosted.org/packages/4a/91/f636117fa8268de4e9dd71dec39b6dba1e41e9c82ea716052688b2438250/dotconf-0.4.tar.gz" } ], "1.5": [ { "comment_text": "", "digests": { "md5": "b5b1a4a6ab2032f1fac741781ea8b30b", "sha256": "cc6e66ff5839377827c4645f859e015852eab2c821b72c0528952a3ceef50c40" }, "downloads": -1, "filename": "dotconf-1.5-py2.7.egg", "has_sig": false, "md5_digest": "b5b1a4a6ab2032f1fac741781ea8b30b", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 34457, "upload_time": "2012-04-14T22:58:41", "url": "https://files.pythonhosted.org/packages/85/99/07645d90f71132745063b7ef8e6047e171221130b445bd43a943b14fe0c8/dotconf-1.5-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "62e73264522c020123514e919c5aec50", "sha256": "2e119b4c71e271fd92b844f45a14a0b53bdaf44956a5bebf2a0525c229dcf277" }, "downloads": -1, "filename": "dotconf-1.5.tar.gz", "has_sig": false, "md5_digest": "62e73264522c020123514e919c5aec50", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29399, "upload_time": "2012-04-14T22:58:40", "url": "https://files.pythonhosted.org/packages/d7/a7/14e763b400f75c0cc50cbca73c1933408f04104dc1250d17ae754152356f/dotconf-1.5.tar.gz" } ], "1.6": [ { "comment_text": "", "digests": { "md5": "e8eb94f812c6e2e3c6b11451e41ee704", "sha256": "536f94ef2c78144a8273d33f77218548fb2572df0c99ac9be10ab76c70b48fb0" }, "downloads": -1, "filename": "dotconf-1.6-py2.7.egg", "has_sig": false, "md5_digest": "e8eb94f812c6e2e3c6b11451e41ee704", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 35815, "upload_time": "2012-12-09T15:35:23", "url": "https://files.pythonhosted.org/packages/2b/cb/7274436bb23f6b482a48a9a505d6f556a32631cda2f49457467a9b8c1053/dotconf-1.6-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "065eeebc83ad8b2c32ab3eedb400bf65", "sha256": "18ae12a027390535ccf35eabf68c4829b73e317ae0e4e30bff65ae0f4db5eb26" }, "downloads": -1, "filename": "dotconf-1.6.tar.gz", "has_sig": false, "md5_digest": "065eeebc83ad8b2c32ab3eedb400bf65", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26563, "upload_time": "2012-12-09T15:35:21", "url": "https://files.pythonhosted.org/packages/1d/9a/8c98c80ffb9423c73f9dd700164bca5f636f819f3d852163bc90d6ce9dc3/dotconf-1.6.tar.gz" } ], "1.7": [ { "comment_text": "", "digests": { "md5": "336504608ca5012cd346c63e555d62ef", "sha256": "a94ddeb8701885b90b855f2ff991eb055a8a6fe8e2b8b2b5bb602d8b5edafcc8" }, "downloads": -1, "filename": "dotconf-1.7-py2.7.egg", "has_sig": false, "md5_digest": "336504608ca5012cd346c63e555d62ef", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 36320, "upload_time": "2013-07-31T20:32:40", "url": "https://files.pythonhosted.org/packages/f7/30/4ded5c2d02d4b3f625fc2259489976618d8038eef5aa4a23de518b905a34/dotconf-1.7-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "c84a99756b3618008321af5dd99bcc34", "sha256": "9a351e600936fca29f49cf71e4d20ef31e914b9c49ece02a067d5b5acad50461" }, "downloads": -1, "filename": "dotconf-1.7-py3.3.egg", "has_sig": false, "md5_digest": "c84a99756b3618008321af5dd99bcc34", "packagetype": "bdist_egg", "python_version": "3.3", "requires_python": null, "size": 38043, "upload_time": "2013-07-31T20:36:20", "url": "https://files.pythonhosted.org/packages/20/84/d80e9765ddeb07ed76605f523ca8a3454b8f4081b19e67d896c06d5a7296/dotconf-1.7-py3.3.egg" }, { "comment_text": "", "digests": { "md5": "1cfbe25f32826a043b2812a55e889ae3", "sha256": "e9e7621ed78de26c4f63da83b558e1a144f17d9739d2992cc68e79e9145a5c32" }, "downloads": -1, "filename": "dotconf-1.7.tar.gz", "has_sig": false, "md5_digest": "1cfbe25f32826a043b2812a55e889ae3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26980, "upload_time": "2013-07-31T20:32:36", "url": "https://files.pythonhosted.org/packages/b5/4f/7f13bdb45fc9f61d0924195649a8ababbc9ca3095dc3b34cf54b195dfa50/dotconf-1.7.tar.gz" } ], "1.8": [ { "comment_text": "", "digests": { "md5": "e7cd1b9f45eded5ccae74637d678221d", "sha256": "7e07b8808a72273d742d40d3a4c8fd45055e7c2e95d8ef1f1e4fa690688f12f0" }, "downloads": -1, "filename": "dotconf-1.8-py2.7.egg", "has_sig": false, "md5_digest": "e7cd1b9f45eded5ccae74637d678221d", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 37885, "upload_time": "2013-09-08T20:19:40", "url": "https://files.pythonhosted.org/packages/dd/69/a0589909f924d7929cc09773f23e4d5d4206e72fbccedc67678434825324/dotconf-1.8-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "6a264ad91089c4cd6dd9801358066412", "sha256": "31a920b32c7c67ee2a43e6b289e26ddcaa17af56829dac80893417bddb1861ed" }, "downloads": -1, "filename": "dotconf-1.8.tar.gz", "has_sig": false, "md5_digest": "6a264ad91089c4cd6dd9801358066412", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28535, "upload_time": "2013-09-08T20:19:30", "url": "https://files.pythonhosted.org/packages/4e/af/a37dd5e9017189f3f94473c4cd0d7e8253bd4bb0cf2c1f051b2076ce74ad/dotconf-1.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e7cd1b9f45eded5ccae74637d678221d", "sha256": "7e07b8808a72273d742d40d3a4c8fd45055e7c2e95d8ef1f1e4fa690688f12f0" }, "downloads": -1, "filename": "dotconf-1.8-py2.7.egg", "has_sig": false, "md5_digest": "e7cd1b9f45eded5ccae74637d678221d", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 37885, "upload_time": "2013-09-08T20:19:40", "url": "https://files.pythonhosted.org/packages/dd/69/a0589909f924d7929cc09773f23e4d5d4206e72fbccedc67678434825324/dotconf-1.8-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "6a264ad91089c4cd6dd9801358066412", "sha256": "31a920b32c7c67ee2a43e6b289e26ddcaa17af56829dac80893417bddb1861ed" }, "downloads": -1, "filename": "dotconf-1.8.tar.gz", "has_sig": false, "md5_digest": "6a264ad91089c4cd6dd9801358066412", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28535, "upload_time": "2013-09-08T20:19:30", "url": "https://files.pythonhosted.org/packages/4e/af/a37dd5e9017189f3f94473c4cd0d7e8253bd4bb0cf2c1f051b2076ce74ad/dotconf-1.8.tar.gz" } ] }