Skip to content
Create a gist now

Instantly share code, notes, and snippets.

@mekarpeles /main.py
Last active

An basic example implementing an application in Waltz
#!/usr/bin/env Python
import waltz
from waltz import track, db, render, session
urls = ('/session', 'Session',
'/analytics', 'Analytics',
'/', 'Index')
sessions = {'cart': waltz.Cart()}
app = waltz.setup.dancefloor(urls, globals(), sessions=sessions)
class Index:
@track
def GET(self):
return render().index()
class Session:
def GET(self):
return session()
class Analytics:
def GET(self):
return db().get('analytics')
if __name__ == "__main__":
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.