See sourcehut for PR and latest news
This package implements a sqlalchemy query builder for json data
generated with (but not limited to) jQuery QueryBuilder
.
- Open Source: Apache 2.0 license.
- Website: https://sr.ht/~ocurero/sqlalchemy-querybuilder/
- Documentation: https://sqlalchemy-querybuilder.readthedocs.io/
Using sqlalchemy-querybuilder is very simple:
from sqlalchemy_querybuilder import Filter
from myapp import models, query
rules = {
"condition": "OR",
"rules": [{
"field": "mytable.myfield",
"operator": "equal",
"value": "foo"
},
],
}
myfilter = Filter(models, query)
print(myfilter.querybuilder(rules))