Skip to main content
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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

restit-0.3.2.tar.gz (5.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

restit-0.3.2-py3-none-any.whl (5.3 MB view details)

Uploaded Python 3

File details

Details for the file restit-0.3.2.tar.gz.

File metadata

  • Download URL: restit-0.3.2.tar.gz
  • Upload date:
  • Size: 5.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for restit-0.3.2.tar.gz
Algorithm Hash digest
SHA256 b4acdf359845526f2537ec5fed09949d195edb1b688864aae561d21417a0fa55
MD5 653d5eed016b7c306e563d6a6726b04f
BLAKE2b-256 025c149ae37bfabfb2899693aecbeb4fbafcbcbb32f37e3d487e73373bb64a83

See more details on using hashes here.

File details

Details for the file restit-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: restit-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 5.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for restit-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7a4c4449a068a3b02d8f5f08f6554fab97ad3ce03d96bee31563b4724b92bc4b
MD5 e2aa1228c3fdfc5d4f7455e062879b2f
BLAKE2b-256 824b9a5ea58cfd5272501a5ad315f81c61617f53787b69ae6dc89d01b6dae4ff

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 files

0.3.1

2 files

0.3.0

2 files

0.2.12

2 files

0.2.11

2 files

0.2.10

2 files

0.2.9

2 files

0.2.7

2 files

0.2.6

2 files

0.2.5

2 files

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page