{ "info": { "author": "Filipe Waitman", "author_email": "filwaitman@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": ".. image:: https://travis-ci.org/filwaitman/pyrecursive.svg?branch=master\n :target: https://travis-ci.org/filwaitman/pyrecursive\n\n\npyrecursive\n===========\n\nHave you ever needed to transform a :code:`whatever python object` in depth? So this one is for you. =]\n\nThis library runs on both Python 2 and Python 3 (tested on 2.7 and 3.5, precisely).\n\n\nInstallation:\n-------------\n\n.. code:: bash\n\n pip install pyrecursive\n\n\nUsage:\n-------------\n\n.. code:: python\n\n from pyrecursive import pyrecursive\n\n def double(obj):\n return x * 2\n\n pyrecursive(42, double)\n # result: 84\n\n pyrecursive([1, 2, 3, [4, 5, [6], 7], 8, 9, 'x'], double)\n # result: [2, 4, 6, [8, 10, [12], 14], 16, 18, 'xx']\n\n pyrecursive({'hamster': [1, 2, 3, {'test': 42}]}, double)\n # result: {'hamster': [2, 4, 6, {'test': 84}]}\n\n # In order to transform dict keys in depth by setting transform_dict_keys variable to True (default: False).\n pyrecursive({'hamster': [1, 2, 3, {'test': 42}]}, double, transform_dict_keys=True)\n # result: {'hamsterhamster': [2, 4, 6, {'testtest': 84}]}\n\n # In order not to transform dict value in depth by setting transform_dict_values variable to False (default: True).\n pyrecursive({'hamster': [1, 2, 3, {'test': 42}]}, double, transform_dict_values=False)\n # result: {'hamster': [2, 4, 6, {'test': 42}]}\n\n # In order to define custom rules for each object type in depth by setting custom_rules variable.\n pyrecursive([1, 2, 3, 'banana'], double, custom_rules={int: lambda x: x * 5})\n # result: [5, 10, 15, 'bananabanana'] (multiplied by 5 when int, multiplied by 2 otherwise)\n\n\nContribute\n----------\nDid you think in some interesting feature, or have you found a bug? Please let me know!\n\nOf course you can also download the project and send me some `pull requests `_. Please keep in mind that (1) we do follow pep8, (2) our line-length is 120 chars and (3) your changes must be compatible with Python 2.7 and Python 3.5.\n\nYou can send your suggestions by `opening issues `_.\n\nYou can contact me directly as well. Take a look at my contact information at `http://filwaitman.github.io/ `_ (email is preferred rather than mobile phone).\n", "description_content_type": null, "docs_url": null, "download_url": "http://github.com/filwaitman/pyrecursive/tarball/0.0.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/filwaitman/pyrecursive", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "pyrecursive", "package_url": "https://pypi.org/project/pyrecursive/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyrecursive/", "project_urls": { "Download": "http://github.com/filwaitman/pyrecursive/tarball/0.0.1", "Homepage": "http://github.com/filwaitman/pyrecursive" }, "release_url": "https://pypi.org/project/pyrecursive/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "Have you ever needed to transform a `whatever python object` in depth? So this one is for you. =]", "version": "0.0.1" }, "last_serial": 2541271, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "66c156d7461a36675cf1b4bb4bb66468", "sha256": "e85e49165328a146c10fea16f13ffba0b94b52560f866c48441d09a95e07001b" }, "downloads": -1, "filename": "pyrecursive-0.0.1.tar.gz", "has_sig": false, "md5_digest": "66c156d7461a36675cf1b4bb4bb66468", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3305, "upload_time": "2016-12-27T20:03:27", "url": "https://files.pythonhosted.org/packages/97/57/92a3a4b500ccc4d5e97e9ed46c71dc0937f63e646c3395698c40574de2d4/pyrecursive-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "66c156d7461a36675cf1b4bb4bb66468", "sha256": "e85e49165328a146c10fea16f13ffba0b94b52560f866c48441d09a95e07001b" }, "downloads": -1, "filename": "pyrecursive-0.0.1.tar.gz", "has_sig": false, "md5_digest": "66c156d7461a36675cf1b4bb4bb66468", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3305, "upload_time": "2016-12-27T20:03:27", "url": "https://files.pythonhosted.org/packages/97/57/92a3a4b500ccc4d5e97e9ed46c71dc0937f63e646c3395698c40574de2d4/pyrecursive-0.0.1.tar.gz" } ] }