Created
December 1, 2011 01:59
-
-
Save hownowstephen/1412753 to your computer and use it in GitHub Desktop.
Sample APY server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from apy import Endpoint, app | |
@Endpoint('/main') | |
class MainEndpoint: | |
def get(*args,**kwargs): | |
return {'response': ['hello','world']} | |
def post(*args,**kwargs): | |
return {'response': ['you','posted']} | |
def put(*args,**kwargs): | |
return {'response': ['you','put']} | |
def delete(*args,**kwargs): | |
return {'response': ['you','deleted']} | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment