Skip to content

Repository files navigation

SQLAlchemy-JSONAPI

Build Status

JSON API implementation for use with SQLAlchemy.

SQLAlchemy-JSONAPI aims to implement the JSON API spec and to make it as simple to use and implement as possible.

Installation

pip install sqlalchemy-jsonapi

Quick usage with Flask-SQLAlchemy

# Assuming FlaskSQLAlchemy is db and your Flask app is app:fromsqlalchemy_jsonapiimportFlaskJSONAPIapi=FlaskJSONAPI(app, db)
# Or, for factory-style applicationsapi=FlaskJSONAPI()
api.init_app(app, db)

Quick usage without Flask

# Assuming declarative base is called Basefromsqlalchemy_jsonapiimportJSONAPIapi=JSONAPI(Base)
# And assuming a SQLAlchemy sessionprint(api.get_collection(session, {}, 'resource-type'))

About

JSONAPI implementation for use with SQLAlchemy

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages