{ "info": { "author": "Brad Murry", "author_email": "bradodarb@hotmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3" ], "description": "\nschleppy\n========\n\nUtilities for traversing and transforming data structures\n\nInspired by Hapi framework for .js (especially the Hoek plugin), I really missed some of these utilities in python so decided to port them over.\n\nreach(source, pattern, [options])\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n`Insipred by Hoek.reach `_\n\nConverts an object key chain string to reference\n\n\n* ``options`` - optional settings\n\n * ``separator`` - string to split chain path on, defaults to '.'\n * ``default`` - value to return if the path or value is not present, default is ``None``\n * ``strict`` - if ``true``\\ , will throw an error on missing member, default is ``False``\n\nA pattern including negative numbers will work like negative indices on an\narray.\n\nIf pattern is ``False-y``\\ , the object itself will be returned.\n\n.. code-block:: python\n\n from schleppy import reach\n\n pattern = 'a.b.c'\n source_obj = {'a' : {'b' : { 'c' : 1}}}\n\n reach(source_obj, pattern) # returns 1\n\n pattern = 'a.b.-1'\n source_obj = {'a' : {'b' : [2,3,6]}}\n\n reach(source_obj, pattern) # returns 6\n\ntransform(source, transform, [options])\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n`Insipred by Hoek.transform `_\n\nTransforms an existing object into a new one based on the supplied ``obj`` and ``transform`` map. ``options`` are the same as the ``reach`` options. The first argument can also be an array of objects. In that case the method will return an array of transformed objects. Note that ``options.separator`` will be respected for the keys in the transform object as well as values.\n\n.. code-block:: python\n\n from schleppy import transform\n\n source = {\n 'address': {\n 'one': '123 main street',\n 'two': 'PO Box 1234'\n },\n 'title': 'Warehouse',\n 'state': 'CA'\n }\n\n result = transform(source, {\n 'person.address.lineOne': 'address.one',\n 'person.address.lineTwo': 'address.two',\n 'title': 'title',\n 'person.address.region': 'state'\n })\n # Results in\n # {\n # 'person': {\n # 'address': {\n # 'lineOne': '123 main street',\n # 'lineTwo': 'PO Box 1234',\n # 'region': 'CA'\n # }\n # },\n # 'title': 'Warehouse'\n # }\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/bradodarb/schleppy", "keywords": "dict list path dot notation", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "schleppy", "package_url": "https://pypi.org/project/schleppy/", "platform": "", "project_url": "https://pypi.org/project/schleppy/", "project_urls": { "Homepage": "http://github.com/bradodarb/schleppy" }, "release_url": "https://pypi.org/project/schleppy/1.0.2/", "requires_dist": null, "requires_python": "", "summary": "Utilities for traversing and transforming data structures", "version": "1.0.2" }, "last_serial": 4145698, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "d848d935c773e80b3ed3cbecbf5df8ce", "sha256": "793d4739a1117041f2d1bcd7874e755a47b51ac294a3e1d267d008dda385f744" }, "downloads": -1, "filename": "schleppy-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "d848d935c773e80b3ed3cbecbf5df8ce", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5491, "upload_time": "2018-08-06T01:33:42", "url": "https://files.pythonhosted.org/packages/0f/12/9be598eaa2bb7f1666f22019a5c0e38c55a744e5cedfd6995dc502fcab98/schleppy-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ded9bb724b953dc59d6d60b96a192128", "sha256": "701e815177fe7fcd9f26023dcbb430af521f4fd7d2f75336aad301cb2b73faab" }, "downloads": -1, "filename": "schleppy-0.2.tar.gz", "has_sig": false, "md5_digest": "ded9bb724b953dc59d6d60b96a192128", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3950, "upload_time": "2018-08-06T01:33:43", "url": "https://files.pythonhosted.org/packages/71/f8/34f019c14a8096793f2ea0e4ab501db2c64503ed20667f77617a265fc71c/schleppy-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "88b52d714df118ccb60a8a9c061cf906", "sha256": "788395c27241697f5a850597076439eee119d95399aeec82f4581fc51e01d2f8" }, "downloads": -1, "filename": "schleppy-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "88b52d714df118ccb60a8a9c061cf906", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5491, "upload_time": "2018-08-06T01:41:14", "url": "https://files.pythonhosted.org/packages/8a/a6/9a68771bc57c386d99be499813f7a872463d28b98af1956315452904347e/schleppy-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "01a95f276936bfb0272aa00db6c14068", "sha256": "b38d5511c2672fa1ba3bd0e76d491755d2ec9bd9ba4e97b71fc4a9b0e80c6422" }, "downloads": -1, "filename": "schleppy-0.3.tar.gz", "has_sig": false, "md5_digest": "01a95f276936bfb0272aa00db6c14068", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3950, "upload_time": "2018-08-06T01:41:15", "url": "https://files.pythonhosted.org/packages/b2/32/a1a3d21d744394908a64199adc334ee8b27a5bf955d6ef9ac1e437486ae3/schleppy-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "18aa588ddc58d248fb178860cd841365", "sha256": "085880dbe045797e447b4a38cbbbb4e4e0b49e86280593adcb0f9a0a620d6eee" }, "downloads": -1, "filename": "schleppy-0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "18aa588ddc58d248fb178860cd841365", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5520, "upload_time": "2018-08-06T01:45:20", "url": "https://files.pythonhosted.org/packages/1d/29/7d257d52a361f69323e796c3a870b39b195b202ecd601dc55573807c2801/schleppy-0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1906a5bcf950bd22b2afea2e30df2719", "sha256": "57ddfb54c3a44d2e930a03f9ca3f29b8b04ef10adee5da137a0ea3ae3714b6f0" }, "downloads": -1, "filename": "schleppy-0.4.tar.gz", "has_sig": false, "md5_digest": "1906a5bcf950bd22b2afea2e30df2719", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4032, "upload_time": "2018-08-06T01:45:21", "url": "https://files.pythonhosted.org/packages/aa/3e/099a5dc26d1a38270319922804877759ca141b219bcbba32f3464af89db2/schleppy-0.4.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "573d0027e0147395d204ff833dc56604", "sha256": "2aac58b20b00d526532d29e165ae5f284dc934cc2a253fc4d3ee35a02fe70e05" }, "downloads": -1, "filename": "schleppy-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "573d0027e0147395d204ff833dc56604", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5691, "upload_time": "2018-08-06T02:23:09", "url": "https://files.pythonhosted.org/packages/6e/7e/dbc3bf6b9a2ccdc13b1dc46b336893a0f358711db136afbb50d98716926d/schleppy-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c381ab3dfa934e4004f5ee29e992b96d", "sha256": "f66ffb5ff2a59279f6c9a2f38fe396ef1a90f7320c2bac6676f2ed737f0fa2c4" }, "downloads": -1, "filename": "schleppy-1.0.0.tar.gz", "has_sig": false, "md5_digest": "c381ab3dfa934e4004f5ee29e992b96d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4197, "upload_time": "2018-08-06T02:23:10", "url": "https://files.pythonhosted.org/packages/da/2e/5820ec1ebe1db8e0ae85fa051472ff8a8bfc80312288159bb1647e718213/schleppy-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "4c277885fe901e8366643d40d9756588", "sha256": "e389545e00739e06b884d36ea06dcdeb8fd8ec57bab8b9b437243d70694177e9" }, "downloads": -1, "filename": "schleppy-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "4c277885fe901e8366643d40d9756588", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5694, "upload_time": "2018-08-06T02:28:46", "url": "https://files.pythonhosted.org/packages/ed/a3/4ae3be9c4de02de2f4e7cfcbf3479f42f5aae48fe8c39a6e426cf814d0f5/schleppy-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d09fb4fd9b36e170be021f072505044f", "sha256": "48b7096b469080703f0ccfbe1951304fa4918520429746200043f2b4be8af592" }, "downloads": -1, "filename": "schleppy-1.0.1.tar.gz", "has_sig": false, "md5_digest": "d09fb4fd9b36e170be021f072505044f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4201, "upload_time": "2018-08-06T02:28:47", "url": "https://files.pythonhosted.org/packages/fd/c4/75ba61a64a9fcecbb1cda1964179df4652aba5986ca42c16e821f6ab9bde/schleppy-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "faa3f3333f0d06e2b9a8d7eaab609246", "sha256": "8ebda4639481ac6607cba614fc06d69a7e717c0df463cec8d549fdd7d90bc9fc" }, "downloads": -1, "filename": "schleppy-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "faa3f3333f0d06e2b9a8d7eaab609246", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3354, "upload_time": "2018-08-07T19:54:40", "url": "https://files.pythonhosted.org/packages/31/2d/6f77f28b870ab73a97fb10363fc42c9d1912cf5bdd006adf076a461adcd1/schleppy-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "92bb8b6342e3613be941cc8ea4e48376", "sha256": "e50442f88113cb703a480440c8475e088b5a0432e077052d230a27cf6b69ff93" }, "downloads": -1, "filename": "schleppy-1.0.2.tar.gz", "has_sig": false, "md5_digest": "92bb8b6342e3613be941cc8ea4e48376", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4217, "upload_time": "2018-08-07T19:54:41", "url": "https://files.pythonhosted.org/packages/e5/d5/af6c056cd2fb97ef3111de139b1887e29b82629bfdd65f828e4f2cd17aa8/schleppy-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "faa3f3333f0d06e2b9a8d7eaab609246", "sha256": "8ebda4639481ac6607cba614fc06d69a7e717c0df463cec8d549fdd7d90bc9fc" }, "downloads": -1, "filename": "schleppy-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "faa3f3333f0d06e2b9a8d7eaab609246", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3354, "upload_time": "2018-08-07T19:54:40", "url": "https://files.pythonhosted.org/packages/31/2d/6f77f28b870ab73a97fb10363fc42c9d1912cf5bdd006adf076a461adcd1/schleppy-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "92bb8b6342e3613be941cc8ea4e48376", "sha256": "e50442f88113cb703a480440c8475e088b5a0432e077052d230a27cf6b69ff93" }, "downloads": -1, "filename": "schleppy-1.0.2.tar.gz", "has_sig": false, "md5_digest": "92bb8b6342e3613be941cc8ea4e48376", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4217, "upload_time": "2018-08-07T19:54:41", "url": "https://files.pythonhosted.org/packages/e5/d5/af6c056cd2fb97ef3111de139b1887e29b82629bfdd65f828e4f2cd17aa8/schleppy-1.0.2.tar.gz" } ] }