{ "info": { "author": "Luca Cappelletti", "author_email": "cappelletti.luca94@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3" ], "description": "deflate_dict\n=========================================================================================\n|travis| |sonar_quality| |sonar_maintainability| |codacy| |code_climate_maintainability| |pip| |downloads|\n\nPython package to deflate and re-inflate dictionaries.\n\nHow do I install this package?\n----------------------------------------------\nAs usual, just download it using pip:\n\n.. code:: shell\n\n pip install deflate_dict\n\nTests Coverage\n----------------------------------------------\nSince some software handling coverages sometime get slightly different results, here's three of them:\n\n|coveralls| |sonar_coverage| |code_climate_coverage|\n\nDeflating a dictionary\n-------------------------------------------\nA dictionary will be deflated down to its smallest non-further iterable elements, defined as those not containing lists or dictionaries.\n\n.. code:: python\n\n from deflate_dict import deflate\n D = {\n \"a\":[\n {\n \"b\":(0,1,2)\n },\n {\n \"c\": [1,2,3]\n }\n ]\n }\n result = deflate(D, sep=\"_\")\n\n # {'a_0_b': (0, 1, 2), 'a_1_c': [1, 2, 3], 'd': 4}\n\n\nInflate a dictionary\n---------------------------------------------\nTo reinflate a dictionary to its forgotten glory, just go with:\n\n.. code:: python\n\n from deflate_dict import inflate\n D = {\"a_0_b\": (0, 1, 2), \"a_1_c\": [1, 2, 3], \"d\": 4}\n\n result = inflate(D, sep=\"_\")\n\n # {'a': [{'b': (0, 1, 2)}, {'c': [1, 2, 3]}], 'd': 4}\n\nLimitations\n----------------------------------------------\nThe library, as of version `1.0.2`, is unable to distinguish between reinflated numerical strings and actual numbers,\nsince to deflate the strings the library has to convert the numbers to strings.\n\n.. |travis| image:: https://travis-ci.org/LucaCappelletti94/deflate_dict.png\n :target: https://travis-ci.org/LucaCappelletti94/deflate_dict\n :alt: Travis CI build\n\n.. |sonar_quality| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_deflate_dict&metric=alert_status\n :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_deflate_dict\n :alt: SonarCloud Quality\n\n.. |sonar_maintainability| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_deflate_dict&metric=sqale_rating\n :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_deflate_dict\n :alt: SonarCloud Maintainability\n\n.. |sonar_coverage| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_deflate_dict&metric=coverage\n :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_deflate_dict\n :alt: SonarCloud Coverage\n\n.. |coveralls| image:: https://coveralls.io/repos/github/LucaCappelletti94/deflate_dict/badge.svg?branch=master\n :target: https://coveralls.io/github/LucaCappelletti94/deflate_dict?branch=master\n :alt: Coveralls Coverage\n\n.. |pip| image:: https://badge.fury.io/py/deflate-dict.svg\n :target: https://badge.fury.io/py/deflate-dict\n :alt: Pypi project\n\n.. |downloads| image:: https://pepy.tech/badge/deflate-dict\n :target: https://pepy.tech/badge/deflate-dict\n :alt: Pypi total project downloads \n\n.. |codacy| image:: https://api.codacy.com/project/badge/Grade/ac52bf2f95bc4f6590f65bac9bc7fc60\n :target: https://www.codacy.com/app/LucaCappelletti94/deflate_dict?utm_source=github.com&utm_medium=referral&utm_content=LucaCappelletti94/deflate_dict&utm_campaign=Badge_Grade\n :alt: Codacy Maintainability\n\n.. |code_climate_maintainability| image:: https://api.codeclimate.com/v1/badges/965dea01ed74fa710728/maintainability\n :target: https://codeclimate.com/github/LucaCappelletti94/deflate_dict/maintainability\n :alt: Maintainability\n\n.. |code_climate_coverage| image:: https://api.codeclimate.com/v1/badges/965dea01ed74fa710728/test_coverage\n :target: https://codeclimate.com/github/LucaCappelletti94/deflate_dict/test_coverage\n :alt: Code Climate Coverate", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/LucaCappelletti94/deflate_dict", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "deflate-dict", "package_url": "https://pypi.org/project/deflate-dict/", "platform": "", "project_url": "https://pypi.org/project/deflate-dict/", "project_urls": { "Homepage": "https://github.com/LucaCappelletti94/deflate_dict" }, "release_url": "https://pypi.org/project/deflate-dict/1.0.2/", "requires_dist": null, "requires_python": "", "summary": "Python package to deflate and re-inflate dictionaries.", "version": "1.0.2" }, "last_serial": 5934482, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "fc89ae370d2f781dd5f8e434188689de", "sha256": "95fe658745e7200e176db02921fe59923cab448e8ef29ea14a1f77dbfc0a3b24" }, "downloads": -1, "filename": "deflate_dict-1.0.0.tar.gz", "has_sig": false, "md5_digest": "fc89ae370d2f781dd5f8e434188689de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4058, "upload_time": "2019-05-26T08:01:11", "url": "https://files.pythonhosted.org/packages/a1/39/abc89809b4757def1cd0db160a251453b6e1039a2bcbe386fd39e34a5c3f/deflate_dict-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "1925d6f8a67d046f8ce78dffca42f908", "sha256": "58feee3caa532e3226d03f072bac54b2cf4d311123c1911d1949527d3a14d865" }, "downloads": -1, "filename": "deflate_dict-1.0.1.tar.gz", "has_sig": false, "md5_digest": "1925d6f8a67d046f8ce78dffca42f908", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4149, "upload_time": "2019-06-02T17:55:28", "url": "https://files.pythonhosted.org/packages/1f/b7/fea6824f1f74fda005b5019ca37b7f6dffeefd3cacd609395e80837cbb3d/deflate_dict-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "416833d3c7c95ba4afdda8663c239816", "sha256": "6dcc8770c377e9553cc56010d795975d55d8c10c322743d99389529ca9b4afb8" }, "downloads": -1, "filename": "deflate_dict-1.0.2.tar.gz", "has_sig": false, "md5_digest": "416833d3c7c95ba4afdda8663c239816", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4365, "upload_time": "2019-10-06T10:55:37", "url": "https://files.pythonhosted.org/packages/7e/10/81e08149f18b7c4faaf05a7ef1dac4bcccb48a999e520f7b8d24f3b13968/deflate_dict-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "416833d3c7c95ba4afdda8663c239816", "sha256": "6dcc8770c377e9553cc56010d795975d55d8c10c322743d99389529ca9b4afb8" }, "downloads": -1, "filename": "deflate_dict-1.0.2.tar.gz", "has_sig": false, "md5_digest": "416833d3c7c95ba4afdda8663c239816", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4365, "upload_time": "2019-10-06T10:55:37", "url": "https://files.pythonhosted.org/packages/7e/10/81e08149f18b7c4faaf05a7ef1dac4bcccb48a999e520f7b8d24f3b13968/deflate_dict-1.0.2.tar.gz" } ] }