CorePost 0.0.8
A Twisted Web REST micro-framework
Latest Version: 0.0.16
Based on Flask API, with integrated multiprocessing support for full usage of all CPUs. Provides a more Flask/Sinatra-style API on top of the core twisted.web APIs. Integrates FormEncode for path, form and query argument validation.
The simplest possible twisted.web CorePost REST application:
from corepost.web import CorePost, route
from corepost.enums import Http
class RestApp(CorePost):
@route("/",Http.GET)
def root(self,request,**kwargs):
return request.path
@route("/test",Http.GET)
def test(self,request,**kwargs):
return request.path
@route("/test/<int:numericid>",Http.GET)
def test_get_resources(self,request,numericid,**kwargs):
return "%s" % numericid
if __name__ == '__main__':
app = RestApp()
app.run()
Links
Changelog
- 0.0.8:
- support for serializing of classes to JSON,XML,YAML based on caller's Accept header
- separate routing functionality from CorePost Resource object, in preparation for future multicore support
- 0.0.7:
- automatic parsing of incoming content (JSON, YAML, XML)
- routing by incoming content type
- automatic response conversion based on caller's Accept header (JSON/YAML
- support for defer.returnValue() in @inlineCallbacks route methods
0.0.6 - redesigned API around classes and methods, rather than functions and global objects (after feedback from Twisted devs)
0.0.5 - added FormEncode validation for arguments
0.0.4 - path argument extraction, mandatory argument error checking
| File | Type | Py Version | Uploaded on | Size | # downloads |
|---|---|---|---|---|---|
| CorePost-0.0.8.tar.gz (md5) | Source | 2011-11-21 | 8KB | 377 | |
- Author: Jacek Furmankiewicz
- Home Page: https://github.com/jacek99/corepost
- Keywords: twisted rest flask sinatra get post put delete web
- License: BSD
-
Categories
- Development Status :: 3 - Alpha
- Environment :: Web Environment
- Intended Audience :: Developers
- License :: OSI Approved :: BSD License
- Operating System :: OS Independent
- Programming Language :: Python
- Topic :: Internet :: WWW/HTTP :: Dynamic Content
- Topic :: Software Development :: Libraries :: Python Modules
- Package Index Owner: jfurmankiewicz
- DOAP record: CorePost-0.0.8.xml
