{ "info": { "author": "Kudo Chien", "author_email": "ckchien@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Python collection filter\n========================\n\nhttps://github.com/kudo/collection-filter\n\n|Build Status| |Unit Test Coverage|\n\nThis library provides a DSL filter for list or dict data.\nIt is original designed for RESTful API partial response.\nTested with Python 2.6, 2.7. \n\nQuick Start\n-----------\n\nTo install, use pip:\n\n::\n\n $ pip install collection-filter\n\nThen:\n\n.. code:: python\n\n $ python\n\n >>> from collection_filter import collection_filter\n\n # Query a dict\n >>> collection_filter({'foo': 1, 'bar': 2}, 'foo')\n {'foo': 1}\n\n # Query a dict with multiple elements (seperated by comma)\n >>> collection_filter({'foo': 1, 'bar': 2}, 'foo,bar')\n {'foo': 1, 'bar': 2}\n\n # Query a dict deeply\n >>> collection_filter({'foo': {'bar': 2, 'orange': 'sweet'}}, 'foo.bar')\n {'foo': {'bar': 2}}\n\n # Query a list\n >>> collection_filter([{'foo': 1, 'bar': 2}, {'foo': 3, 'bar': 4}], '[].foo')\n [{'foo': 1}, {'foo': 3}]\n\n # list/dict combination example\n >>> collection_filter({'foo': 'bar', 'aListOfDict': [{'foo': 1, 'bar': 2}], 'aListOfDict[].foo')\n {'aListOfDict': [{'foo': 1}]}\n\n\nSyntax\n---------------\n\nCurrently support operators\n\n+----------+------------------------------------------------+\n| Operator | Description | \n+==========+================================================+\n| , | Multiple field query sperated by comma |\n+----------+------------------------------------------------+\n| [] | To indicate the data should be handled as list |\n+----------+------------------------------------------------+\n| . | Dot notation should follow with a symbol name |\n| | which to specify a field in current dict data |\n+----------+------------------------------------------------+\n\n \nCopyright and License\n---------------------\n\nCopyright 2015, Kudo Chien\n\nLicensed under a `MIT license`_.\n\n.. |Build Status| image:: https://travis-ci.org/Kudo/collection-filter.svg?branch=master\n :target: https://travis-ci.org/Kudo/collection-filter\n\n.. |Unit Test Coverage| image:: https://coveralls.io/repos/Kudo/collection-filter/badge.svg?branch=master&service=github\n :target: https://coveralls.io/github/Kudo/collection-filter?branch=master\n\n.. _MIT license: http://opensource.org/licenses/MIT", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kudo/python-collection-filter", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "collection-filter", "package_url": "https://pypi.org/project/collection-filter/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/collection-filter/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/kudo/python-collection-filter" }, "release_url": "https://pypi.org/project/collection-filter/0.5/", "requires_dist": null, "requires_python": null, "summary": "A small list/dict DSL for field filter specific designed for RESTful API partial response.", "version": "0.5" }, "last_serial": 1789665, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "e70b15e91cbd3196eaa3af35bf2752c8", "sha256": "a3d5efd67692d61d0ff7b8a4d352bd1ef589c7b8a466a3a9e96e5693f485828e" }, "downloads": -1, "filename": "collection-filter-0.2.tar.gz", "has_sig": false, "md5_digest": "e70b15e91cbd3196eaa3af35bf2752c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3305, "upload_time": "2015-07-24T16:15:04", "url": "https://files.pythonhosted.org/packages/c3/ce/882a271b02791fafce007abc6611482f1b982db0f8b7edceec5b90736d23/collection-filter-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "7b978d750ffe5aac8f4e571e53024342", "sha256": "744e220e32881c8923a454247f8928c7efbaf24a9761aaf31237cc228a03a37b" }, "downloads": -1, "filename": "collection-filter-0.3.tar.gz", "has_sig": false, "md5_digest": "7b978d750ffe5aac8f4e571e53024342", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3396, "upload_time": "2015-07-29T15:46:32", "url": "https://files.pythonhosted.org/packages/82/09/8de7d720738e377ac322a5cd0deafdd2595a2a92a0451e39cdfb9fa3df89/collection-filter-0.3.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "e28286f1d4b2bf96b1eae678d57262de", "sha256": "5908cdd4db3efe3003eda0ee8c63f9f4d2b58ba7d69c163db442814f6bca99bd" }, "downloads": -1, "filename": "collection-filter-0.5.tar.gz", "has_sig": false, "md5_digest": "e28286f1d4b2bf96b1eae678d57262de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3739, "upload_time": "2015-10-28T06:47:51", "url": "https://files.pythonhosted.org/packages/e7/08/c6734aba73e246929374d7b82f948de9ae3227403b9a69b27e2ba50ebc30/collection-filter-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e28286f1d4b2bf96b1eae678d57262de", "sha256": "5908cdd4db3efe3003eda0ee8c63f9f4d2b58ba7d69c163db442814f6bca99bd" }, "downloads": -1, "filename": "collection-filter-0.5.tar.gz", "has_sig": false, "md5_digest": "e28286f1d4b2bf96b1eae678d57262de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3739, "upload_time": "2015-10-28T06:47:51", "url": "https://files.pythonhosted.org/packages/e7/08/c6734aba73e246929374d7b82f948de9ae3227403b9a69b27e2ba50ebc30/collection-filter-0.5.tar.gz" } ] }