Skip to content

ColtonProvias/flask-jsonapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask-JSONAPI

JSON API-compliant view generators for Flask

This project is being merged in with SQLAlchemy-JSONAPI in its rewrite. The new SQLAlchemy-JSONAPI will be released when JSON-API nears finalization.

Installation

Clone repository and run python setup.py install until this reaches version 0.1.

Usage

To use this, make sure your models already have the JSONAPIMixin from SQLAlchemy-JSONAPI added. Then add the following code to your application:

from flask.ext.jsonapi import FlaskJSONAPI, SQLAlchemyEndpoint

# Add the extension to your application.  You can also call init_app later
# much like most other extensions for Flask.
api = FlaskJSONAPI(app)

# Now add an endpoint for each model.
api.add_endpoint(SQLAlchemyEndpoint(User, db.session), urlprefix='/api')

In this example, the endpoint will be accessible at /api/users.

About

JSONAPI-compliant view generators for Flask

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages