Skip to content

Instantly share code, notes, and snippets.

@hownowstephen
Created December 1, 2011 01:59
Show Gist options
  • Save hownowstephen/1412753 to your computer and use it in GitHub Desktop.
Save hownowstephen/1412753 to your computer and use it in GitHub Desktop.
Sample APY server
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