{ "info": { "author": "Tiago Teixeira", "author_email": "teitiago@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "Python Configuration Reader\n===========================\n\nThis is a simple project to read python configurations from INI files.\nHas the following features:\n\n- It uses the Singleton pattern to configure the reader only once and\n used it across an application.\n- Reloads the configurations when the configuration file is changed.\n- Read OS variables as Strings, e.g., '%(LANG)s'\n- The configurations are automatically converted to a python data type\n- Collect a configuration section as a dictionary\n\nThe available data types are: - Strings, surrounded by '' or \"\" -\nIntegers - Floats - Lists, [1,2,3] - Dictionaries, {'test': {'is\\_dict':\nTrue}}\n\nInstalling\n----------\n\nTo use the config\\_reader simple install using pip\n\n.. code:: sh\n\n $ pip install ini-config-reader\n\nRequirements\n~~~~~~~~~~~~\n\nPython3 tested for versions 3.5, 3.6 and 3.7\n\nUsage\n-----\n\nThe conf\\_reader has three class variables, INI\\_FILE, RELOAD and\nDICT\\_CACHE.\n\n+---------------+------------------------------------------------------------------------------------------------+\n| Variable | Description |\n+===============+================================================================================================+\n| INI\\_FILE | Path to the file that contains the configurations |\n+---------------+------------------------------------------------------------------------------------------------+\n| RELOAD | Set if the INI file should be reloaded when changes are detected |\n+---------------+------------------------------------------------------------------------------------------------+\n| DICT\\_CACHE | When collecting the section as dictionary store it in a dict to avoid processing the reading |\n+---------------+------------------------------------------------------------------------------------------------+\n\nRegular usage\n~~~~~~~~~~~~~\n\nSince the config\\_reader implements the singleton pattern the user only\nneeds to configure the INI\\_File once. Then the get method and\nget\\_section\\_dict can be used as static methods.\n\n.. code:: python\n\n from conf_reader.reader import ConfReader\n\n ConfReader('/etc/configuration/my_config.ini')\n ConfReader.get('Section_1', 'configuration_1') # Can be used in different modules\n\nDecorator\n~~~~~~~~~\n\nThe config\\_reader uses a decorator to inject configuration in\nfunctions. To use it the INI\\_FILE must be already configured and a\nconfig variable must exist in the function's signature.\n\n.. code:: python\n\n from conf_reader.reader import ConfReader, read_conf\n\n @read_conf(\"SECTION_1\", 'config_2')\n def read_with_arguments(*args, config, **kwargs):\n pass\n\n ConfReader('/etc/configuration/my_config.ini')\n read_with_arguments()\n\nLicense\n-------\n\nThis project is licensed under the MIT License - see the\n`LICENSE.txt `__ file for details", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/teitiago/ini-config-reader", "keywords": "configuration ini reader", "license": "", "maintainer": "", "maintainer_email": "", "name": "ini-config-reader", "package_url": "https://pypi.org/project/ini-config-reader/", "platform": "", "project_url": "https://pypi.org/project/ini-config-reader/", "project_urls": { "Homepage": "https://github.com/teitiago/ini-config-reader" }, "release_url": "https://pypi.org/project/ini-config-reader/0.0.3/", "requires_dist": null, "requires_python": "", "summary": "A simple config reader based on python Config Parser.", "version": "0.0.3" }, "last_serial": 5486923, "releases": { "0.0.3": [ { "comment_text": "", "digests": { "md5": "a38666e982e47d3cd8259652925c88cd", "sha256": "311e4e9c945c9f5607897f9d0fb80f3f19279adaccc37a26ac1f7c542b029f61" }, "downloads": -1, "filename": "ini-config-reader-0.0.3.tar.gz", "has_sig": false, "md5_digest": "a38666e982e47d3cd8259652925c88cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4492, "upload_time": "2019-07-04T14:18:02", "url": "https://files.pythonhosted.org/packages/65/a4/19d00efa0dd0b47a0355dba5a0d6ad1e9defaccfdcdac79c7220ae90ff8b/ini-config-reader-0.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a38666e982e47d3cd8259652925c88cd", "sha256": "311e4e9c945c9f5607897f9d0fb80f3f19279adaccc37a26ac1f7c542b029f61" }, "downloads": -1, "filename": "ini-config-reader-0.0.3.tar.gz", "has_sig": false, "md5_digest": "a38666e982e47d3cd8259652925c88cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4492, "upload_time": "2019-07-04T14:18:02", "url": "https://files.pythonhosted.org/packages/65/a4/19d00efa0dd0b47a0355dba5a0d6ad1e9defaccfdcdac79c7220ae90ff8b/ini-config-reader-0.0.3.tar.gz" } ] }