Skip to main content

RestIt

https://readthedocs.org/projects/restit/badge/?version=latest https://coveralls.io/repos/github/Rollmops/restit/badge.svg?branch=master https://github.com/Rollmops/restit/workflows/Python%20package/badge.svg

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

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)

Source distribution for restit 0.3.2
File Size Uploaded
restit-0.3.2.tar.gz 5.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for restit 0.3.2
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page