Tornado_jsonapi
Tornado_jsonapi is a Python 3.3+ library for creating JSON API (as per jsonapi.org specification) using Tornado web framework. It features
semi-automatic API generation using provided JSON schema of resource;
support for arbitrary data sources, including SQLAlchemy and PostgreSQL (via DBAPI2 support layer);
support for asynchronous data source operations;
strict jsonapi.org specification conformance.
Usage
import sqlite3
import tornado.ioloop
import tornado.web
import tornado_jsonapi.handlers
import tornado_jsonapi.resource
schema = {
"title": "post",
"properties": {
"text":
{
"type": "string"
},
"author":
{
"type": "string"
}
}
}
res = tornado_jsonapi.resource.DBAPI2Resource(
schema, sqlite3, sqlite3.connect(':memory:'))
res._create_table()
application = tornado.web.Application([
(
r"/api/posts/([^/]*)",
tornado_jsonapi.handlers.APIHandler,
dict(resource=res)
)
])
application.listen(8888)
tornado.ioloop.IOLoop.current().start()
Installation
$ pip install tornado_jsonapi
Documentation
Roadmap
a.k.a. TODO
improve documentation :pensive:
automatic API doc generation based on JSON schema;
MongoDB/Motor support;
support for API testing.
License
This project is licensed under the MIT License.
Changelog
0.1.4 (2020-01-24)
Added support for column blacklisting and pagination, thanks to Zachary Gorak.
0.1.3 (2016-04-07)
Fixed incompatibility with latest python-jsonschema-objects
Updated obsolete requirements
Adjusted supported Python versions
0.1.2 (2016-04-07)
Fixed dependencies issue preventing installation in environment with LANG=C
0.1.0 (2016-03-21)
First release.
Metadata
Release files for tornado-jsonapi 0.1.4
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 |
|---|---|---|---|---|
| tornado_jsonapi-0.1.4.tar.gz | 16.1 kB | Without provenance | Details for tornado_jsonapi-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tornado_jsonapi-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for tornado_jsonapi-0.1.4-py3-none-any.whl |
Total release size: 28.4 kB
Release files / tornado_jsonapi-0.1.4.tar.gz
| Download URL | tornado_jsonapi-0.1.4.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6bd611038ac6cd7a8003b542bee574281823b5b6d1862f63b6c11bb3e31e6fa9
|
|
BLAKE2b-256 checksum How to use checksums |
ba33e9716c64e0d8b3f4f8750a1647817b2ab9d9198bd0deaa758615dca8db24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9
|
Release files / tornado_jsonapi-0.1.4-py3-none-any.whl
| Download URL | tornado_jsonapi-0.1.4-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8e37a1160fe26e95f7f21bb4b73512c91f0d9e757b85c07fd0f91ede02e90023
|
|
BLAKE2b-256 checksum How to use checksums |
c1135aff1f8f64744361305b18366321b9c88590236335c9a0c871b4aee485ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9
|
Security for tornado-jsonapi 0.1.4
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.