Skip to main content

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
  • 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
  • Middleware packages to simplify daily tasks

Installation

pip install chocs

or with poetry

poetry add chocs

Quick start

import chocs

http = chocs.Application()

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

chocs.serve(http)

Keep in mind that the chocs.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.

Available middlewares

OpenAPI Integration middleware

Allows integrating OpenAPI documentation into your codebase, providing automating request validation based on your OpenAPI spec. More details are available in the chocs-openapi repository.

ParsedBody middleware

Parsed body middleware helps to convert json/yaml request payloads into dataclass, this not only makes your daily tasks easier but increases readability of your code and contract. More details are available in the chocs-parsed-body repository.

Documentation

For usage and detailed documentation please visit our wiki page

Metadata

Release files for chocs 1.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chocs 1.6.1
File Size Uploaded
chocs-1.6.1.tar.gz 23.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chocs 1.6.1
File Interpreter ABI Platform
chocs-1.6.1-py3-none-any.whl Python 3 none any Details

Total release size: 56.5 kB

Release files / chocs-1.6.1.tar.gz

Download URL chocs-1.6.1.tar.gz
Size 23.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c5e9789747a508c1bcbe9dacde7c555d3147633e05b9621c1ca3f1677d5e6eca
BLAKE2b-256 checksum
How to use checksums
bbd0fc1621daa8824ac9022676856651d23109164ba4e80349ad684d9372a3dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.8.12 Linux/5.11.0-1028-azure

Release files / chocs-1.6.1-py3-none-any.whl

Download URL chocs-1.6.1-py3-none-any.whl
Size 32.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf2bb843ce718d1a9ad8330f22da9fd9b92042b77059cbf5eded5de2206f445a
BLAKE2b-256 checksum
How to use checksums
d23da5fe689800d6574bf57685b189c1acd9224199df0607ffd2dae93ef56254
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.8.12 Linux/5.11.0-1028-azure

Release history Release notifications | RSS feed

This release

1.6.1 This release

2 release files

1.6.0

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.18.3

2 release files

0.18.2

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.16.1

2 release files

0.16.0

2 release files

0.14.0

2 release files

0.13.4

2 release files

0.13.3

2 release files

0.13.2

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.9.6

2 release files

0.9.5

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

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.1

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