Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.
/ corkscrew Public archive

Expose your peewee model through a JSONAPI compatible API.

Notifications You must be signed in to change notification settings

privatwolke/corkscrew

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

corkscrew

This is a python module that should eventually allow you to expose your peewee models through a JSON API compliant interface to HTTP clients. For now it is under development and does not comply with all aspects of the specification.

Installation

Use pip install corkscrew to pull the module into your project. It depends on peewee and bottle.

Usage

from corkscrew import BottleApplication
from corkscrew.handlers import PeeweeHandlerFactory as PHF
from peewee import Model, PrimaryKeyField, CharField, SqliteDatabase

class Friends(Model):
  id = PrimaryKeyField()
  name = CharField()

  class Meta:
    database = SqliteDatabase(":memory:")

Friends.create_table()

application = BottleApplication(PHF)
application.register(Friends)

if __name__ == "__main__":
  application.run()

About

Expose your peewee model through a JSONAPI compatible API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published