[Twisted-web] CorePost - a tiny Flask-style REST microframework for twisted.web

Jacek Furmankiewicz jacek99 at gmail.com
Sat Sep 3 23:28:29 EDT 2011

Hi, I just uploaded CorePost 0.0.5 to PyPi.

CorePost is a REST microframework built on top of the core twisted.web APIs,
providing a Flask-inspired API for building REST applications.

Version 0.0.5 integrates FormEncode for integrated path/form/query argument
similar to the way Pylons/TurboGears use it.


from corepost.web import CorePost, validate
from corepost.enums import Http
from formencode import Schema, validators

app = CorePost()

class TestSchema(Schema):
    allow_extra_fields = True
    childId = validators.Regex(regex="^value1|value2$")

def postValidateSchema(request,rootId,childId,**kwargs):
    '''Validate using a common schema'''
    return "%s - %s - %s" % (rootId,childId,kwargs)

def postValidateCustom(request,rootId,childId,**kwargs):
    '''Validate using argument-specific validators'
    return "%s - %s - %s" % (rootId,childId,kwargs)

More docs on our site:

Any feedback is welcome

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-web/attachments/20110903/5c946d4f/attachment.htm 

More information about the Twisted-web mailing list