Metadata-Version: 1.1
Name: iniconfig.py
Version: 1.0.2
Summary: A more convenient and practical approach to manage .ini files
Home-page: https://github.com/dmiro/iniconfig
Author: David Miro
Author-email: lite.3engine@gmail.com
License: The MIT License (MIT)

Copyright (c) 2016 David Miró

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Description: iniconfig
        =========
        
        |Build Status| |GitHub license| |PyPI| |PyPI| |PyPI|
        
        A more convenient and practical approach to manage .ini files. You can
        link a class property with an .ini file option and delegating your
        management.
        
        :package: Installation
        ----------------------
        
        Install it via ``pip``
        
        ``$ [sudo] pip install iniconfig.py``
        
        Or download zip and then install it by running
        
        ``$ [sudo] python setup.py install``
        
        Example
        -------
        
        .. code:: python
        
            from iniconfig import IniConfig
        
            class Config(IniConfig):
        
                # file section
                useCsvWizard = IniConfig.iniproperty('file', 'useCsvWizard', True)
                owner = IniConfig.iniproperty('file', 'owner', {'name':'david', 'login':'yeap'})
                files = IniConfig.iniproperty('file', 'files', [])
        
                # tools section
                searches = IniConfig.iniproperty('tools', 'searches', ['primate', 'wolf', 'rabbit'])
                matchMode = IniConfig.iniproperty('tools', 'matchMode', 0)
                weight = IniConfig.iniproperty('tools', 'weight', False)
        
                # config section
                restore = IniConfig.iniproperty('config', 'restore', True)
        
        
            config = Config('demo.ini')#, autocreate=True)
        
            print '\nafter'
            print 'file/useCsvWizard:', config.useCsvWizard
            print 'file/owner:', config.owner
            print 'file/files:', config.files
            print 'tools/searches:', config.searches
        
            config.useCsvWizard = False
            config.files = ['myfile.py']
            config.owner['name'] = 'joan'
            config.owner['surname'] = 'miro'
            del(config.owner['login'])
            del config.searches[2]
        
            print '\nbefore'
            print 'file/useCsvWizard:', config.useCsvWizard
            print 'file/owner:', config.owner
            print 'file/files:', config.files
            print 'tools/searches:', config.searches
        
        Result
        
        .. code:: bash
        
            after
            file/useCsvWizard: True
            file/owner: {'login': 'yeap', 'name': 'david'}
            file/files: []
            tools/searches: ['primate', 'wolf', 'rabbit']
        
            before
            file/useCsvWizard: False
            file/owner: {'surname': 'miro', 'name': 'joan'}
            file/files: ['myfile.py']
            tools/searches: ['primate', 'wolf']
        
        Now the content .ini file is:
        
        .. code:: text
        
            [file]
            usecsvwizard = False
            files = ['myfile.py']
            owner = {'surname': 'miro', 'name': 'joan'}
        
            [tools]
            searches = ['primate', 'wolf']
        
        :yum: How to contribute
        -----------------------
        
        Have an idea? Found a bug? `add a new
        issue <https://github.com/dmiro/iniconfig/issues>`__ or [fork]
        (https://github.com/dmiro/iniconfig#fork-destination-box) and sendme a
        pull request. Don't forget to add your name to the Contributors section
        of this document.
        
        :scroll: License
        ----------------
        
        Licensed under the MIT, see ``LICENSE``
        
        :heart\_eyes: Contributors
        --------------------------
        
        David Miro lite.3engine@gmail.com
        
        .. |Build Status| image:: https://travis-ci.org/dmiro/iniconfig.svg?branch=master
           :target: https://travis-ci.org/dmiro/iniconfig
        .. |GitHub license| image:: https://img.shields.io/badge/license-MIT-blue.svg
           :target: https://raw.githubusercontent.com/dmiro/iniconfig/master/LICENSE
        .. |PyPI| image:: https://img.shields.io/pypi/dm/iniconfig.py.svg?maxAge=2592000
           :target: https://pypi.python.org/pypi/iniconfig.py/
        .. |PyPI| image:: https://img.shields.io/pypi/v/iniconfig.py.svg?maxAge=2592000
           :target: https://pypi.python.org/pypi/iniconfig.py/
        .. |PyPI| image:: https://img.shields.io/badge/Python-2.6%20|%202.7%20|%203.2%20|%203.3%20|%203.4%20|%203.5-green.svg
           :target: https://pypi.python.org/pypi/iniconfig.py/
        
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: License :: OSI Approved :: MIT License
