{ "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": "compress_json\n=========================================================================================\n|travis| |sonar_quality| |sonar_maintainability| |codacy| |code_climate_maintainability| |pip| |downloads|\n\nPython package that handles loading and dumping json files in a compressed fashion. The library is loosely based on the `compress_pickle `_ library.\n\nHow do I install this package?\n----------------------------------------------\nAs usual, just download it using pip:\n\n.. code:: shell\n\n pip install compress_json\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\nAvailable compression modes\n----------------------------------------------\nThe compression modes, detected automatically by the file name, are **gzip**, **bz2** and **lzma**,\nwith the notable exception of **zip** which seems difficult to integrate in the json pipeline.\n\nUsage example\n----------------------------------------------\nThe library is extremely easy to use:\n\n.. code:: python\n\n import compress_json\n \n D = {\n \"A\":{\n \"B\":\"C\"\n }\n }\n compress_json.dump(D, \"filepath.json.gz\") # for a gzip file\n compress_json.dump(D, \"filepath.json.bz\") # for a bz2 file\n compress_json.dump(D, \"filepath.json.lzma\") # for a lzma file\n\n D1 = compress_json.load(\"filepath.json.gz\") # for loading a gzip file\n D2 = compress_json.load(\"filepath.json.bz\") # for loading a bz2 file\n D3 = compress_json.load(\"filepath.json.lzma\") # for loading a lzma file\n\nAdvanced usage\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nClearly you can pass parameters to either the chosen compression mode or the json library as follows:\n\n.. code:: python\n\n import compress_json\n \n D = {\n \"A\":{\n \"B\":\"C\"\n }\n }\n compress_json.dump(\n D, \"filepath.json.gz\",\n compression_kwargs = {kwargs go here},\n json_kwargs = {kwargs go here}\n )\n\n D4 = compress_json.load(\n \"filepath.json.gz\",\n compression_kwargs = {kwargs go here},\n json_kwargs = {kwargs go here}\n )\n\n.. |travis| image:: https://travis-ci.org/LucaCappelletti94/compress_json.png\n :target: https://travis-ci.org/LucaCappelletti94/compress_json\n :alt: Travis CI build\n\n.. |sonar_quality| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_compress_json&metric=alert_status\n :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_compress_json\n :alt: SonarCloud Quality\n\n.. |sonar_maintainability| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_compress_json&metric=sqale_rating\n :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_compress_json\n :alt: SonarCloud Maintainability\n\n.. |sonar_coverage| image:: https://sonarcloud.io/api/project_badges/measure?project=LucaCappelletti94_compress_json&metric=coverage\n :target: https://sonarcloud.io/dashboard/index/LucaCappelletti94_compress_json\n :alt: SonarCloud Coverage\n\n.. |coveralls| image:: https://coveralls.io/repos/github/LucaCappelletti94/compress_json/badge.svg?branch=master\n :target: https://coveralls.io/github/LucaCappelletti94/compress_json?branch=master\n :alt: Coveralls Coverage\n\n.. |pip| image:: https://badge.fury.io/py/compress-json.svg\n :target: https://badge.fury.io/py/compress-json\n :alt: Pypi project\n\n.. |downloads| image:: https://pepy.tech/badge/compress-json\n :target: https://pepy.tech/badge/compress-json\n :alt: Pypi total project downloads \n\n.. |codacy| image:: https://api.codacy.com/project/badge/Grade/6aa4b62b4ed34f7d8e2c37ef09848294\n :target: https://www.codacy.com/manual/LucaCappelletti94/compress_json?utm_source=github.com&utm_medium=referral&utm_content=LucaCappelletti94/compress_json&utm_campaign=Badge_Grade\n :alt: Codacy Maintainability\n\n.. |code_climate_maintainability| image:: https://api.codeclimate.com/v1/badges/c79ec561e2fd2b91763c/maintainability\n :target: https://codeclimate.com/github/LucaCappelletti94/compress_json/maintainability\n :alt: Maintainability\n\n.. |code_climate_coverage| image:: https://api.codeclimate.com/v1/badges/c79ec561e2fd2b91763c/test_coverage\n :target: https://codeclimate.com/github/LucaCappelletti94/compress_json/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/compress_json", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "compress-json", "package_url": "https://pypi.org/project/compress-json/", "platform": "", "project_url": "https://pypi.org/project/compress-json/", "project_urls": { "Homepage": "https://github.com/LucaCappelletti94/compress_json" }, "release_url": "https://pypi.org/project/compress-json/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Python package that handles loading and dumping json files in a compressed fashion.", "version": "1.0.0" }, "last_serial": 5824391, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "8a629051c513fc57192f27dad6c67156", "sha256": "be5c75095282712d6b707fa39ca1fb2934a9e06e66fc0c97d9bd0ce13e15cd89" }, "downloads": -1, "filename": "compress_json-1.0.0.tar.gz", "has_sig": false, "md5_digest": "8a629051c513fc57192f27dad6c67156", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4086, "upload_time": "2019-09-13T08:14:09", "url": "https://files.pythonhosted.org/packages/63/8a/2e3a2892b70d7a8759f6563124006a825d52d8c50157c11348728b95a8e6/compress_json-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8a629051c513fc57192f27dad6c67156", "sha256": "be5c75095282712d6b707fa39ca1fb2934a9e06e66fc0c97d9bd0ce13e15cd89" }, "downloads": -1, "filename": "compress_json-1.0.0.tar.gz", "has_sig": false, "md5_digest": "8a629051c513fc57192f27dad6c67156", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4086, "upload_time": "2019-09-13T08:14:09", "url": "https://files.pythonhosted.org/packages/63/8a/2e3a2892b70d7a8759f6563124006a825d52d8c50157c11348728b95a8e6/compress_json-1.0.0.tar.gz" } ] }