Skip to main content

Lightweight and powerful wsgi rest framework for rapid building applications based on wsgi servers.

Project description

Chocs PyPI version Release Linting and Tests codecov Maintainability

Chocs is a modern HTTP framework for building AWS HTTP API/REST API and WSGI compatible applications. Chocs aims to be small, expressive, and robust. It provides an elegant API for writing fault-proof, extensible microservices.

Features

  • AWS Serverless integration
  • Open api integration
  • Elegant and easy API
  • No additional bloat like built-in template engines, session handlers, etc.
  • Compatible with all WSGI servers
  • Loosely coupled components which can be used separately
  • Multipart body parsing
  • Graceful error handling
  • HTTP middleware support
  • Fast routing

Installation

pip install chocs

or with poetry

poetry add chocs

Quick start

from chocs import Application
from chocs import HttpRequest
from chocs import HttpResponse
from chocs import serve


http = Application()

@http.get("/hello/{name}")
def hello(request: HttpRequest) -> HttpResponse:
    return HttpResponse(f"Hello {request.path_parameters.get('name')}!")

serve(http)

Keep in mind that the serve() function is using the bjoern package, so make sure you included it in your project dependencies before using it. You are able to use any WSGI compatible server.

Documentation

For usage and detailed documentation please visit our wiki page

Project details


Download files

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

Files for chocs, version 0.13.4
Filename, size File type Python version Upload date Hashes
Filename, size chocs-0.13.4-py3-none-any.whl (44.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size chocs-0.13.4.tar.gz (32.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page