RestIt
Python HTTP REST library including OOP-readiness and Open-API generation
For a more comprehensive documentation see: https://restit.readthedocs.io/en/latest/
Features
WSGI conform
- Validation (using marshmallow)
query parameter validation
path parameter validation
request body validation
response body validation
OpenApi documentation generation
OOP-ready (no module-based global instances necessary)
Easy hyperlink generation
Exception mapping
Response serialization customization
Request deserialization customization
Easy to test
Quick example
from restit import Request, Resource, Response, RestItApp
from restit.decorator import path
@path("/")
class IndexResource(Resource):
def get(self, request: Request) -> Response:
return Response("Hello from index.")
app = RestItApp(resources=[IndexResource()])
if __name__ == "__main__":
# start a development server on http://127.0.0.1:5000
app.start_development_server()
You can also use a production-ready server like Gunicorn (given the name of the above module is restit_app_test.py):
gunicorn -w 4 restit_app_test:app
Metadata
Release files for restit 0.3.2
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 | |
|---|---|---|---|---|
| restit-0.3.2.tar.gz | 5.2 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| restit-0.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.5 MB
Release files / restit-0.3.2.tar.gz
| Download URL | restit-0.3.2.tar.gz |
|---|---|
| Size | 5.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4acdf359845526f2537ec5fed09949d195edb1b688864aae561d21417a0fa55
|
|
BLAKE2b-256 checksum How to use checksums |
025c149ae37bfabfb2899693aecbeb4fbafcbcbb32f37e3d487e73373bb64a83
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|
Release files / restit-0.3.2-py3-none-any.whl
| Download URL | restit-0.3.2-py3-none-any.whl |
|---|---|
| Size | 5.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a4c4449a068a3b02d8f5f08f6554fab97ad3ce03d96bee31563b4724b92bc4b
|
|
BLAKE2b-256 checksum How to use checksums |
824b9a5ea58cfd5272501a5ad315f81c61617f53787b69ae6dc89d01b6dae4ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.4
|
Security for restit 0.3.2
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.