/awesome-sanic

A curated list of awesome Sanic resources and extensions

Awesome Sanic Awesome

A curated list of awesome Sanic resources and extensions
Sanic is an Async Python 3.7+ web server that's written to go fast

User Guide | API Docs | Source | Forums | Discord

Contents

Extensions

Official

API

  • Sanic CRUD: CRUD REST API generation with peewee models. starfork
  • Sanic-GraphQL: GraphQL integration with Sanic starfork
  • Sanic-RestPlus: A port of Flask-RestPlus for Sanic. Full-featured REST API with SwaggerUI generation. starfork
  • Sanic-Transmute: A Sanic extension that generates APIs from python function and classes, and also generates Swagger UI/documentation automatically. starfork
  • Sanic-OpenAPI3e: A Sanic extension that allows you to decorate your routes and configure your OpenAPI spec v3.0 and swagger. Very high spec compliance, customisable. starfork
  • Sanic-REST-Framework: API rapid development framework for SANIC, Inspired by Django REST Framework, Has complete authority verification, authentication, serializer components, CBV suite, Depends on the tortoise ORM, Used together with srf_app_helper and tortoise-orm, You can get a smooth development experience like Django starfork

Authentication

  • Sanic-JWT: Authentication extension for JSON Web Tokens (JWT). starfork
  • Sanic-JWT-Extended: Port of flask-jwt-extended, provides access/refresh token with fresh, easy custom claim insertion, and role-based access control starfork
  • Sanic-OAuth: OAuth Library with many provider and OAuth1/OAuth2 support. starfork
  • Sanic-Token-Auth: Simple token-based authentication. starfork
  • Sanic-HTTPAuth: Fork of Flask-HTTPAuth, provides Basic, Digest and Token HTTP authentication for Sanic routes starfork
  • sanic-security: A powerful, simple, and async security library for Sanic. starfork
  • SanicApiKey: Simple api key based authentication. starfork
  • Sanic-Auth: A tiny extension provide a decorator @auth.login_required, without Authentication algorithm & Session manage (sanic-session can work togather). starfork
  • Sanic-Beskar: Strong, Simple, and Precise security for Sanic APIs. starfork

Development

Frontend

  • sanja: This module aims to make bringing Jinja templates to Sanic easy. starfork
  • Jinja2-sanic: a jinja2 template renderer for Sanic. starfork
  • Sanic-Babel: Adds i18n/l10n support to Sanic applications with the help of the Babel library starfork
  • Sanic-CORS: A port of flask-cors. starfork
  • Sanic-Jinja2: Support for Jinja2 template. starfork
  • Sanic-Sass: Compile Sass & SCSS to CSS for Sanic. starfork

Monitoring

ORM

  • GINO: A lightweight asynchronous ORM based on SQLAlchemy core, with asyncpg dialect and Sanic extension. starfork
  • Tortoise ORM: an easy-to-use asyncio orm like Django starfork
  • Sanic-Motor: Simple motor wrapper. starfork
  • Sanic-mongodb-extension: Extension for MongoDB with μMongo ODM support for Sanic framework starfork
  • Mayim: The NOT ORM Python hydrator starfork

Requests and Responses

  • Webargs-Sanic: Sanic integration with Webargs. Parse & validate request arguments: headers, arguments, cookies, files, json, etc. starfork
  • Python-Sanicargs: Parse query args in Sanic using type annotations and a decorator. starfork
  • Sanic Brogz: Allows you to easily gzip Sanic responses. A port of Flask-Compress. starfork
  • Sanic Gzip: Add compression to your Sanic endpoints with a decorator starfork
  • Sanic-Limiter: Rate limiting for sanic. starfork
  • Sanic-UserAgent: Add user_agent to request starfork
  • Sanic-SSLify: Forces SSL on your Sanic app. A port of Flask-SSLify. starfork
  • TuSanic: TuSanic is a tus.io (simple resumable uploads) server-side implementation for sanic starfork

Caching

Tracing

Queues

Scaffolding

  • Cookiecutter-Sanic: Get your sanic application up and running in a matter of second in a well defined project structure. Batteries included for deployment, unit testing, automated release management and changelog generation. starfork

Session

  • Sanic Sessions: Session support for humans. Works with different backends Redis, Mongodb, memcache or an in memory store. starfork

Utils

  • Python-Paginate: Simple pagination support. starfork
  • Sanic-Dispatch: A dispatcher inspired by DispatcherMiddleware in werkzeug. Can act as a Sanic-to-WSGI adapter. starfork
  • Sanic-EnvConfig: Pull environment variables into your sanic config. starfork
  • sanic-sse: Server-Sent Events implementation for Sanic. starfork
  • Sanic-CamelCase-Middleware: Middleware for camelizing request and response bodies for sanic. starfork
  • Sanic-Pydantic: A library for parsing and validating http requests for sanic web-framework using pydantic library. starfork
  • sanic-dantic: a sanic request parameter check plugin based on pydantic. support FBV and CBV starfork
  • sanic-fire: An extension for Sanic that adds support for writing external commands to your application. starfork

Resources

Examples

Tutorials

Books

Videos and Podcasts

Built with Sanic

The following is a list of Sanic in production use.