{ "info": { "author": "Joshua Carp", "author_email": "jm.carp@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "=============\nfilteralchemy\n=============\n\n.. image:: https://img.shields.io/pypi/v/filteralchemy.svg\n :target: http://badge.fury.io/py/filteralchemy\n :alt: Latest version\n\n.. image:: https://readthedocs.org/projects/filteralchemy/badge/?version=latest\n :target: https://filteralchemy.readthedocs.org/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://img.shields.io/travis/jmcarp/filteralchemy/dev.svg\n :target: https://travis-ci.org/jmcarp/filteralchemy\n :alt: Travis-CI\n\n.. image:: https://img.shields.io/codecov/c/github/jmcarp/filteralchemy/dev.svg\n :target: https://codecov.io/github/jmcarp/filteralchemy\n :alt: Code coverage\n\n**filteralchemy** is a declarative query builder for SQLAlchemy. **filteralchemy** uses marshmallow-sqlalchemy_ to auto-generate filter fields and webargs_ to parse field parameters from the request. Use it to filter data with minimal boilerplate.\n\nFor Django users: the design of **filteralchemy** is strongly inspired by django-filter_.\n\nInstall\n-------\n\n.. code-block::\n\n pip install filteralchemy\n \nQuickstart\n----------\n\n.. code-block:: python\n\n import flask\n from models import Album, session\n from webargs.flaskparser import parser\n\n from filteralchemy import FilterSet\n from filteralchemy.operators import Equal, Less, Greater\n\n class AlbumFilterSet(FilterSet):\n class Meta:\n model = Album\n query = session.query(Album)\n operators = (Equal, Less, Greater)\n parser = parser\n\n app = flask.Flask(__name__)\n\n @app.route('/albums')\n def get_albums():\n query = AlbumFilterSet().filter()\n return flask.jsonify(query.all())\n\n.. code-block::\n\n http :5000/albums artist==Queen genre==rock sales__gt==1000000\n\n.. _marshmallow-sqlalchemy: https://marshmallow-sqlalchemy.readthedocs.org/\n.. _webargs: https://webargs.readthedocs.org/\n.. _django-filter: https://github.com/alex/django-filter", "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/jmcarp/filteralchemy", "keywords": "filteralchemy", "license": "Copyright 2015 Joshua Carp\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.", "maintainer": null, "maintainer_email": null, "name": "filteralchemy", "package_url": "https://pypi.org/project/filteralchemy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/filteralchemy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/jmcarp/filteralchemy" }, "release_url": "https://pypi.org/project/filteralchemy/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Declarative query builder for SQLAlchemy", "version": "0.1.0" }, "last_serial": 1796257, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "fcc18a71c5ff9c9fa586069823fa4d24", "sha256": "72a8f636a88094c5ac65accefcdf1b935af7baa13697399c5f049dc267539af5" }, "downloads": -1, "filename": "filteralchemy-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fcc18a71c5ff9c9fa586069823fa4d24", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8542, "upload_time": "2015-10-26T03:31:41", "url": "https://files.pythonhosted.org/packages/6d/f7/1a6205908834ac7249796dea17ecfa310595d4184b7be89db3ac047ee588/filteralchemy-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "32a298e46e8d95daf9dceeaf153e0ab6", "sha256": "38b9784aa85d31a393282eb2b313e5955b5c7632d9bbfc5c653c040e937a7d96" }, "downloads": -1, "filename": "filteralchemy-0.1.0.tar.gz", "has_sig": false, "md5_digest": "32a298e46e8d95daf9dceeaf153e0ab6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5589, "upload_time": "2015-10-26T03:31:44", "url": "https://files.pythonhosted.org/packages/ad/3c/20280257ee8411e905fdd09e4bf7f2bbc37d7e47986413c57b30acb473a0/filteralchemy-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "fcc18a71c5ff9c9fa586069823fa4d24", "sha256": "72a8f636a88094c5ac65accefcdf1b935af7baa13697399c5f049dc267539af5" }, "downloads": -1, "filename": "filteralchemy-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fcc18a71c5ff9c9fa586069823fa4d24", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8542, "upload_time": "2015-10-26T03:31:41", "url": "https://files.pythonhosted.org/packages/6d/f7/1a6205908834ac7249796dea17ecfa310595d4184b7be89db3ac047ee588/filteralchemy-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "32a298e46e8d95daf9dceeaf153e0ab6", "sha256": "38b9784aa85d31a393282eb2b313e5955b5c7632d9bbfc5c653c040e937a7d96" }, "downloads": -1, "filename": "filteralchemy-0.1.0.tar.gz", "has_sig": false, "md5_digest": "32a298e46e8d95daf9dceeaf153e0ab6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5589, "upload_time": "2015-10-26T03:31:44", "url": "https://files.pythonhosted.org/packages/ad/3c/20280257ee8411e905fdd09e4bf7f2bbc37d7e47986413c57b30acb473a0/filteralchemy-0.1.0.tar.gz" } ] }