Tiny wrapper on starlette and marshmallow-jsonapi for fast JSON:API compliant python services.
In the maintainer's view, REST frameworks that come with a complete data layer implementation are quite limiting and rarely usable in production systems due to business logic needs or authorization constraints. The default implementation they come with is usually getting in the way, more than helping.
Because of that,
starlette_jsonapi does not contain a data layer implementation, so you should be able to pick
any available async ORM. This also means that you are going to get a very basic interface for writing a REST resource,
with some helpers to make your experience more pleasant, but nothing fancy.
pip install starlette-jsonapi
Since this project is under development, please pin your dependencies to avoid problems.
- 100% tests coverage
- basic json:api serialization
- including related resources
- starlette friendly route generation
- exception handlers to serialize as json:api responses
- relationship resources
- sparse fields
- support for client generated IDs
- support top level meta objects
- pagination helpers
- OpenAPI 3.x (f.k.a Swagger) integration
- sorting helpers
- examples for other ORMs
- support jsonapi objects
- enforce member name validation
- optionally enforce query name validation
Available on Read The Docs
You should take a look at the examples directory for full implementations.
To generate documentation files locally, you should create a virtualenv, then activate it and install the requirements:
cd docs pip install -r requirements.txt
With the docs virtualenv activated, you can then run
make html to generate the HTML files.
The result will be written to
docs/build, and you can open
docs/build/html/index.html in your browser of choice
to view the pages.
This project is in its early days, so any help is appreciated.
As simple as running
If you plan to use pyenv and want to run tox for multiple python versions,
you can create multiple virtual environments and then make them available to tox by running
pyenv shell starlette_jsonapi_venv36 starlette_jsonapi_venv37 starlette_jsonapi_venv38 starlette_jsonapi_venv39.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size starlette_jsonapi-2.2.0-py3-none-any.whl (26.5 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size starlette_jsonapi-2.2.0.tar.gz (22.2 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for starlette_jsonapi-2.2.0-py3-none-any.whl