flask-rest-jsonapi-next
This is a fork of miLibris/flask-rest-jsonapi project.
flask-rest-jsonapi-next is a flask extension for building REST APIs around a strong specification
JSON:API 1.0.
Documentation: http://flask-rest-jsonapi-next.readthedocs.io/en/latest/
Install
pip install flask-rest-jsonapi-next
A minimal API
from flask import Flask
from flask_rest_jsonapi_next import Api, ResourceDetail, ResourceList
from flask_sqlalchemy import SQLAlchemy
from marshmallow_jsonapi.flask import Schema
from marshmallow_jsonapi import fields
# Create the Flask application and the Flask-SQLAlchemy object.
app = Flask(__name__)
app.config['DEBUG'] = True
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'
db = SQLAlchemy(app)
# Create model
class Person(db.Model):
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String)
# Create the database.
db.create_all()
# Create schema
class PersonSchema(Schema):
class Meta:
type_ = 'person'
self_view = 'person_detail'
self_view_kwargs = {'id': '<id>'}
self_view_many = 'person_list'
id = fields.Integer(as_string=True, dump_only=True)
name = fields.Str()
# Create resource managers
class PersonList(ResourceList):
schema = PersonSchema
data_layer = {'session': db.session,
'model': Person}
class PersonDetail(ResourceDetail):
schema = PersonSchema
data_layer = {'session': db.session,
'model': Person}
# Create the API object
api = Api(app)
api.route(PersonList, 'person_list', '/persons')
api.route(PersonDetail, 'person_detail', '/persons/<int:id>')
# Start the flask loop
if __name__ == '__main__':
app.run()
This example provides the following API structure:
| URL | method | endpoint | Usage |
|---|---|---|---|
/persons |
GET | person_list | Get a collection of persons |
/persons |
POST | person_list | Create a person |
/persons/<int:person_id> |
GET | person_detail | Get person details |
/persons/<int:person_id> |
PATCH | person_detail | Update a person |
/persons/<int:person_id> |
DELETE | person_detail | Delete a person |
Thanks
Flask, marshmallow, marshmallow_jsonapi, sqlalchemy, Flask-RESTful and Flask-Restless are awesome projects. These libraries gave me inspiration to create flask-rest-jsonapi-next, so huge thanks to authors and contributors.
Metadata
Release files for flask-rest-jsonapi-next 0.48.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 |
|---|---|---|---|---|
| flask_rest_jsonapi_next-0.48.0.tar.gz | 34.1 kB | With provenance | Details for flask_rest_jsonapi_next-0.48.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flask_rest_jsonapi_next-0.48.0-py3-none-any.whl | Python 3 | none | any | Details for flask_rest_jsonapi_next-0.48.0-py3-none-any.whl |
Total release size: 74.2 kB
Release files / flask_rest_jsonapi_next-0.48.0.tar.gz
| Download URL | flask_rest_jsonapi_next-0.48.0.tar.gz |
|---|---|
| Size | 34.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e732e3346260b967e13f01d208c12dab04f593b5106c0961dc1c9cd60a5816a
|
|
BLAKE2b-256 checksum How to use checksums |
7db31f6443fdb1f0ceab4f057e1dbb0b24dfe840538901a2565718ac7dca2edc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logRelease files / flask_rest_jsonapi_next-0.48.0-py3-none-any.whl
| Download URL | flask_rest_jsonapi_next-0.48.0-py3-none-any.whl |
|---|---|
| Size | 40.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc00b358b151ca0a68466a2501df3d942f447ddc6e964b77dbbc974569808a75
|
|
BLAKE2b-256 checksum How to use checksums |
45c1de6f31ec4794b29798a8a53d408e5e20a30281f9ebfb4bbe24753b754911
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logSecurity for flask-rest-jsonapi-next 0.48.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for flask_rest_jsonapi_next-0.48.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.
Transparency logA 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.