Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
corepost
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
nexlab
corepost
Commits
0f9085ef
Commit
0f9085ef
authored
Aug 25, 2011
by
Jacek Furmankiewicz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
setup.py
parent
c24140fa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
README.md
README.md
+4
-4
No files found.
README.md
View file @
0f9085ef
...
@@ -7,7 +7,7 @@ Provides a more Flask/Sinatra-style API on top of the core *twisted.web* APIs.
...
@@ -7,7 +7,7 @@ Provides a more Flask/Sinatra-style API on top of the core *twisted.web* APIs.
Geared towards creating REST-oriented server platforms (e.g. as a source of data for a Javascript MVC app).
Geared towards creating REST-oriented server platforms (e.g. as a source of data for a Javascript MVC app).
Tested exclusively on PyPy for maximum performance.
Tested exclusively on PyPy for maximum performance.
Example
:
Example
-------
-------
from corepost.server import CorePost
from corepost.server import CorePost
...
@@ -16,11 +16,11 @@ Example:
...
@@ -16,11 +16,11 @@ Example:
app = CorePost()
app = CorePost()
@app.route("/",Http.GET)
@app.route("/",Http.GET)
def root(request):
def root(request
,
**
kwargs
):
return request.path
return request.path
@app.route("/test",Http.GET)
@app.route("/test",Http.GET)
def test(request):
def test(request
,
**
kwargs
):
return request.path
return request.path
@app.route("/test/
<int:numericid>
/test2/
<stringid>
",Http.GET)
@app.route("/test/
<int:numericid>
/test2/
<stringid>
",Http.GET)
...
@@ -37,7 +37,7 @@ If you want a deferred async method, just complete the request yourself, instead
...
@@ -37,7 +37,7 @@ If you want a deferred async method, just complete the request yourself, instead
@app.route("/",Http.GET)
@app.route("/",Http.GET)
@defer.inlineCallbacks
@defer.inlineCallbacks
def root(request):
def root(request
,**kwargs
):
val = yield db.query("SELECT ....")
val = yield db.query("SELECT ....")
request.write(val)
request.write(val)
request.finish()
request.finish()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment