Metadata-Version: 2.1
Name: deflate-dict
Version: 1.0.8
Summary: Python package to deflate and re-inflate dictionaries.
Home-page: https://github.com/LucaCappelletti94/deflate_dict
Author: Luca Cappelletti
Author-email: cappelletti.luca94@gmail.com
License: MIT
Description: deflate_dict
        =========================================================================================
        |travis| |sonar_quality| |sonar_maintainability| |codacy| |code_climate_maintainability| |pip| |downloads|
        
        Python package to deflate and re-inflate dictionaries.
        
        How do I install this package?
        ----------------------------------------------
        As usual, just download it using pip:
        
        .. code:: shell
        
            pip install deflate_dict
        
        Tests Coverage
        ----------------------------------------------
        Since some software handling coverages sometime get slightly different results, here's three of them:
        
        |coveralls| |sonar_coverage| |code_climate_coverage|
        
        Deflating a dictionary
        -------------------------------------------
        A dictionary will be deflated down to its smallest non-further iterable elements, defined as those not containing lists or dictionaries.
        
        .. code:: python
        
            from deflate_dict import deflate
            D = {
                "a":[
                    {
                        "b":(0,1,2)
                    },
                    {
                        "c": [1,2,3]
                    }
                ]
            }
            result = deflate(D, sep="_")
        
            # {'a_0_b': (0, 1, 2), 'a_1_c': [1, 2, 3], 'd': 4}
        
        
        Inflate a dictionary
        ---------------------------------------------
        To reinflate a dictionary to its forgotten glory, just go with:
        
        .. code:: python
        
            from deflate_dict import inflate
            D = {"a_0_b": (0, 1, 2), "a_1_c": [1, 2, 3], "d": 4}
        
            result = inflate(D, sep="_")
        
            # {'a': [{'b': (0, 1, 2)}, {'c': [1, 2, 3]}], 'd': 4}
        
        Limitations
        ----------------------------------------------
        The library, as of version `1.0.2`, is unable to distinguish between reinflated numerical strings and actual numbers,
        since to deflate the strings the library has to convert the numbers to strings.
        
        .. |travis| image:: https://travis-ci.org/LucaCappelletti94/deflate_dict.png
           :target: https://travis-ci.org/LucaCappelletti94/deflate_dict
           :alt: Travis CI build
        
        .. |sonar_quality| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_deflate_dict&metric=alert_status
            :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_deflate_dict
            :alt: SonarCloud Quality
        
        .. |sonar_maintainability| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_deflate_dict&metric=sqale_rating
            :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_deflate_dict
            :alt: SonarCloud Maintainability
        
        .. |sonar_coverage| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_deflate_dict&metric=coverage
            :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_deflate_dict
            :alt: SonarCloud Coverage
        
        .. |coveralls| image:: https://coveralls.io/repos/github/LucaCappelletti94/deflate_dict/badge.svg?branch=master
            :target: https://coveralls.io/github/LucaCappelletti94/deflate_dict?branch=master
            :alt: Coveralls Coverage
        
        .. |pip| image:: https://badge.fury.io/py/deflate-dict.svg
            :target: https://badge.fury.io/py/deflate-dict
            :alt: Pypi project
        
        .. |downloads| image:: https://pepy.tech/badge/deflate-dict
            :target: https://pepy.tech/badge/deflate-dict
            :alt: Pypi total project downloads 
        
        .. |codacy|  image:: https://api.codacy.com/project/badge/Grade/ac52bf2f95bc4f6590f65bac9bc7fc60
            :target: https://www.codacy.com/app/LucaCappelletti94/deflate_dict?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=LucaCappelletti94/deflate_dict&amp;utm_campaign=Badge_Grade
            :alt: Codacy Maintainability
        
        .. |code_climate_maintainability| image:: https://api.codeclimate.com/v1/badges/965dea01ed74fa710728/maintainability
            :target: https://codeclimate.com/github/LucaCappelletti94/deflate_dict/maintainability
            :alt: Maintainability
        
        .. |code_climate_coverage| image:: https://api.codeclimate.com/v1/badges/965dea01ed74fa710728/test_coverage
            :target: https://codeclimate.com/github/LucaCappelletti94/deflate_dict/test_coverage
            :alt: Code Climate Coverate
        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Provides-Extra: test
