Skip to main content

A REST API framework for building CRUD APIs using Sanic and peewee

Project description

Build Status PyPI PyPI version

sanic_crud is a REST API framework for creating a CRUD (Create/Retrieve/Update/Delete) API using Sanic and PeeWee You can use sanic_crud to automatically create an API from your PeeWee models, see how it works in the Documentation Contributions to the repository are welcome!


from peewee import CharField, DateTimeField, SqliteDatabase, Model
import datetime
from sanic import Sanic
from sanic_crud import generate_crud

db = SqliteDatabase('my_app.db')

class BaseModel(Model):
    class Meta:
        database = db

class Person(BaseModel):
    name = CharField()
    email = CharField()
    create_datetime = DateTimeField(, null=True)


app = Sanic(__name__)
generate_crud(app, [Person])"", port=8000, debug=True)


  • python -m pip install sanic-crud


Documentation can be found in the docs directory.


Project details

Download files

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

Source Distribution

sanic_crud-0.2.4.tar.gz (6.5 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page