{ "info": { "author": "Daniel Omar Vergara P\u00e9rez", "author_email": "daniel.omar.vergara@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "# Activejson\n\n[![PyPI version](https://badge.fury.io/py/activejson.svg)](https://badge.fury.io/py/activejson)\n[![CircleCI](https://circleci.com/gh/dany2691/activejson.svg?style=svg)](https://circleci.com/gh/dany2691/activejson)\n\n> A convenient library to deal with large json data\n\nA convenient library to deal with large json data. The purpose of this package is help to deal with complex json-like data, converting them into a more manageable data structure.\n\n## Installation\n\nOS X & Linux:\n\nFrom PYPI\n\n```sh\n$ pip3 install activejson\n```\n\nfrom the source\n\n```sh\n$ git clone https://github.com/dany2691/activejson.git\n$ cd activejson\n$ python3 setup.py install\n```\n\n## Usage example\n\nYou can flat a complex dict the next way:\n\n```python\ncomplex_json = {'cat': {'grass': 'feline', 'mud': 'you never know',\n 'horse': 'my joke'},\n 'dolphin': [{'tiger': [{'bird': 'blue jay'},\n {'fish': 'dolphin'}]},\n {'cat2': 'feline'}, {'dog2': 'canine'}],\n 'dog': 'canine'}\n```\n\n```python\nfrom activejson import flatten_json\n\nflatten_complex_json = flatten_json(complex_json)\n\nprint(flatten_complex_json)\n```\n\nThe result could be the next:\n\n```sh\n{'cat_grass': 'feline',\n 'cat_horse': 'my joke',\n 'cat_mud': 'you never know',\n 'dog': 'canine',\n 'dolphin_0_tiger_0_bird': 'blue jay',\n 'dolphin_0_tiger_1_fish': 'dolphin',\n 'dolphin_1_cat2': 'feline',\n 'dolphin_2_dog2': 'canine'}\n```\n\nOn the other hand, is possible to convert that dict into an object with dynamic attributes:\n\n```python\nfrom activejson import FrozenJSON\n\nfrozen_complex_json = FrozenJSON(complex_json)\n\nprint(frozen_complex_json.cat.grass)\nprint(frozen_complex_json.cat.mud)\nprint(frozen_b.dolphin[2].dog2)\n```\n\nThe result could be the next:\n\n```sh\n'feline'\n'you never know'\n'canine'\n```\n\nTo retrieve the underlying json, is possible to use the json property:\n\n```python\nfrozen_complex_json.json\n```\n\n```sh\n{'cat_grass': 'feline',\n 'cat_horse': 'my joke',\n 'cat_mud': 'you never know',\n 'dog': 'canine',\n 'dolphin_0_tiger_0_bird': 'blue jay',\n 'dolphin_0_tiger_1_fish': 'dolphin',\n 'dolphin_1_cat2': 'feline',\n 'dolphin_2_dog2': 'canine'}\n```\n\n# Development setup\n\nThis project uses _pipenv_ for dependecy resolution. It's a kind of mix between\npip and virtualenv. Follow the next instructions to setup the development enviroment.\n\n```sh\n$ git clone https://github.com/dany2691/activejson.git\n$ cd activejson\n$ pipenv shell\n$ pipenv install -e .\n```\n\nTo run the test-suite, inside the pybundler directory:\n\n```shell\n$ pytest test/ -vv\n```\n\n## Meta\n\nDaniel Omar Vergara P\u00e9rez \u2013 [@dan1_net](https://twitter.com/dan1_net) \u2013 daniel.omar.vergara@gmail.com\n\n[https://github.com/dany2691](https://github.com/dany2691)\n\n## Contributing\n\n1. Fork it ()\n2. Create your feature branch (`git checkout -b feature/fooBar`)\n3. Commit your changes (`git commit -am 'Add some fooBar'`)\n4. Push to the branch (`git push origin feature/fooBar`)\n5. Create a new Pull Request\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dany2691/activejson", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "activejson", "package_url": "https://pypi.org/project/activejson/", "platform": "", "project_url": "https://pypi.org/project/activejson/", "project_urls": { "Homepage": "https://github.com/dany2691/activejson" }, "release_url": "https://pypi.org/project/activejson/0.3.0/", "requires_dist": null, "requires_python": "", "summary": "A convenient library to deal with large json data", "version": "0.3.0" }, "last_serial": 5891743, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "662b2cd773c2a09c29485abc535b4c95", "sha256": "8c76da98793821b086e5a04c4c1e72854accaf511010ab1d9dd4a1c8ac23b7d2" }, "downloads": -1, "filename": "activejson-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "662b2cd773c2a09c29485abc535b4c95", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4397, "upload_time": "2019-07-22T00:15:04", "url": "https://files.pythonhosted.org/packages/5c/12/8716c7963e6c26516866bef5d5d77743b26624ad1ca451fc5038478c908a/activejson-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f18cddcdc9b4cd97f0bbf11b4ecf01e2", "sha256": "315a89276ef972a4f8264f15bddc881c9f67375c7d9eab62af750b9fb887de85" }, "downloads": -1, "filename": "activejson-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f18cddcdc9b4cd97f0bbf11b4ecf01e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3228, "upload_time": "2019-07-22T00:15:07", "url": "https://files.pythonhosted.org/packages/73/b1/0b8dc9712f38d594c7b46eb182ffd0de05068e2247ae4b27bf1bb02721aa/activejson-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "e1d7a125e7d37758c54b00f3aac77655", "sha256": "2475372374162473ec7bf3cab62a53e6f9eba9b061ce174747b444d54d31bcd6" }, "downloads": -1, "filename": "activejson-0.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e1d7a125e7d37758c54b00f3aac77655", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4430, "upload_time": "2019-07-31T20:57:46", "url": "https://files.pythonhosted.org/packages/cb/72/1ad31e7969cda9a4f14c9b918ff08122ac5801a7c77337f5df5d4edb2b85/activejson-0.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "65711f0ea9142d80f61a45f83de0c609", "sha256": "9ca727bc042a06f050f880f52ed929e19554d8d38c095ae46dd045ec98b8880f" }, "downloads": -1, "filename": "activejson-0.2.1.tar.gz", "has_sig": false, "md5_digest": "65711f0ea9142d80f61a45f83de0c609", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3276, "upload_time": "2019-07-31T20:57:48", "url": "https://files.pythonhosted.org/packages/f5/19/d5eab774e11687a4214e7eb322fb2440e0c9480246fde5d7489d2766c16d/activejson-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "bd3fbc185aa2256a702b013bd213532b", "sha256": "642423753614e057dbde0d9ed6217289cffd9e43e41f76832ce5ea58f680fd87" }, "downloads": -1, "filename": "activejson-0.2.2-py3-none-any.whl", "has_sig": false, "md5_digest": "bd3fbc185aa2256a702b013bd213532b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4486, "upload_time": "2019-08-05T14:42:42", "url": "https://files.pythonhosted.org/packages/05/f8/4701534d17f732d76b634f710c5192ec4e6f0bc207afb9e7558a97a0ec5f/activejson-0.2.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ccee7b922b1ffb61b477758b715ff335", "sha256": "d61e24d711964dea31269428d865b2df18633ec2f86596c8432a771767fb4827" }, "downloads": -1, "filename": "activejson-0.2.2.tar.gz", "has_sig": false, "md5_digest": "ccee7b922b1ffb61b477758b715ff335", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3322, "upload_time": "2019-08-05T14:42:43", "url": "https://files.pythonhosted.org/packages/fd/09/904d66451ea007407bd47b6fb80509fbad99685c8bb3f9f536d0ef658d9c/activejson-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "7956428137bb0e9a3c1de0d9f71988a7", "sha256": "213f92e4fb84fd48e729e91d9c7b2afeec2f7d427b0c9ee91b70043264dc7944" }, "downloads": -1, "filename": "activejson-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7956428137bb0e9a3c1de0d9f71988a7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4576, "upload_time": "2019-09-26T17:19:54", "url": "https://files.pythonhosted.org/packages/f5/ad/4b127ac2807fea34898c0a9aabd5a8fbbafc9ca4509f771f1ea14bbfe244/activejson-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8f9adde47d2ec883a551ac5e6df00c60", "sha256": "740877172692992d27ee0ef17265d9a3527ebf5bfafffdf4d2987d3d5430556f" }, "downloads": -1, "filename": "activejson-0.3.0.tar.gz", "has_sig": false, "md5_digest": "8f9adde47d2ec883a551ac5e6df00c60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3593, "upload_time": "2019-09-26T17:19:55", "url": "https://files.pythonhosted.org/packages/90/00/0245a2c5aa346c522df8c54f17951541e1ce669444d04a227fe71c9ca2fb/activejson-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7956428137bb0e9a3c1de0d9f71988a7", "sha256": "213f92e4fb84fd48e729e91d9c7b2afeec2f7d427b0c9ee91b70043264dc7944" }, "downloads": -1, "filename": "activejson-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7956428137bb0e9a3c1de0d9f71988a7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4576, "upload_time": "2019-09-26T17:19:54", "url": "https://files.pythonhosted.org/packages/f5/ad/4b127ac2807fea34898c0a9aabd5a8fbbafc9ca4509f771f1ea14bbfe244/activejson-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8f9adde47d2ec883a551ac5e6df00c60", "sha256": "740877172692992d27ee0ef17265d9a3527ebf5bfafffdf4d2987d3d5430556f" }, "downloads": -1, "filename": "activejson-0.3.0.tar.gz", "has_sig": false, "md5_digest": "8f9adde47d2ec883a551ac5e6df00c60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3593, "upload_time": "2019-09-26T17:19:55", "url": "https://files.pythonhosted.org/packages/90/00/0245a2c5aa346c522df8c54f17951541e1ce669444d04a227fe71c9ca2fb/activejson-0.3.0.tar.gz" } ] }