Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chocs

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chocs

Lightweight and powerful WSGI/AWS lambda framework for rapid building rest applications.

  • 1.6.1
  • PyPI
  • Socket score

Maintainers
1

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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc