File: manage-couchy.py

package info (click to toggle)
python-werkzeug 0.9.6%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 3,096 kB
  • sloc: python: 17,930; makefile: 149; pascal: 60; xml: 16
file content (17 lines) | stat: -rwxr-xr-x 438 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python
from werkzeug import script

def make_app():
    from couchy.application import Couchy
    return Couchy('http://localhost:5984')

def make_shell():
    from couchy import models, utils
    application = make_app()
    return locals()

action_runserver = script.make_runserver(make_app, use_reloader=True)
action_shell = script.make_shell(make_shell)
action_initdb = lambda: make_app().init_database()

script.run()