Skip to content

Build sqlalchemy queries from jQuery-Query json

License

Notifications You must be signed in to change notification settings

ocurero/sqlalchemy-querybuilder

Repository files navigation

WARNING, this repository is a read-only mirror!

See sourcehut for PR and latest news

SQLAlchemy query builder for jQuery QueryBuilder

Project Status: Active – The project has reached a stable, usable state and is being actively developed. builds.sr.ht status codecov readthedocs

This package implements a sqlalchemy query builder for json data generated with (but not limited to) jQuery QueryBuilder.

Quickstart

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))

About

Build sqlalchemy queries from jQuery-Query json

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages