filteralchemy
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.
For Django users: the design of filteralchemy is strongly inspired by django-filter.
Install
pip install filteralchemy
Quickstart
import flask
from models import Album, session
from webargs.flaskparser import parser
from filteralchemy import FilterSet
from filteralchemy.operators import Equal, Less, Greater
class AlbumFilterSet(FilterSet):
class Meta:
model = Album
query = session.query(Album)
operators = (Equal, Less, Greater)
parser = parser
app = flask.Flask(__name__)
@app.route('/albums')
def get_albums():
query = AlbumFilterSet().filter()
return flask.jsonify(query.all())
http :5000/albums artist==Queen genre==rock sales__gt==1000000
Metadata
Release files for filteralchemy 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| filteralchemy-0.1.0.tar.gz | 5.6 kB | Without provenance | Details for filteralchemy-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| filteralchemy-0.1.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for filteralchemy-0.1.0-py2.py3-none-any.whl |
Total release size: 14.1 kB
Release files / filteralchemy-0.1.0.tar.gz
| Download URL | filteralchemy-0.1.0.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38b9784aa85d31a393282eb2b313e5955b5c7632d9bbfc5c653c040e937a7d96
|
|
BLAKE2b-256 checksum How to use checksums |
ad3c20280257ee8411e905fdd09e4bf7f2bbc37d7e47986413c57b30acb473a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / filteralchemy-0.1.0-py2.py3-none-any.whl
| Download URL | filteralchemy-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 8.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
72a8f636a88094c5ac65accefcdf1b935af7baa13697399c5f049dc267539af5
|
|
BLAKE2b-256 checksum How to use checksums |
6df71a6205908834ac7249796dea17ecfa310595d4184b7be89db3ac047ee588
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for filteralchemy 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.