示例#1
0
from os.path import abspath, dirname, join
import sys

sys.path.insert(0, join(abspath(dirname(__file__)), '..'))

from plush import Plush

app = Plush(__name__)

@app.get('/')
def index(request):
    request.send('Hello World!')

app.run()
示例#2
0
'''
pygmentize.me
~~~~~~~~~~~~~

pygmentize.me is a highlighting service based on the awesome pygments library.
'''

from __future__ import absolute_import

from os.path import join, abspath, dirname
import yaml

from plush import Plush
from plush.decorators import asynchronous

with open(join(abspath(dirname(__file__)), 'formatters.yaml')) as file:
    FORMATTERS = yaml.load(file)

del file

app = Plush(__name__)
app.use('decorator', asynchronous)

# Import time side effect. Populates the app with routes.
from . import views
示例#3
0
'''
pygmentize.me
~~~~~~~~~~~~~

pygmentize.me is a highlighting service based on the awesome pygments library.
'''

from __future__ import absolute_import

from os.path import join, abspath, dirname
import yaml

from plush import Plush
from plush.decorators import asynchronous


with open(join(abspath(dirname(__file__)), 'formatters.yaml')) as file:
    FORMATTERS = yaml.load(file)

del file

app = Plush(__name__)
app.use('decorator', asynchronous)

# Import time side effect. Populates the app with routes.
from . import views
示例#4
0
from os.path import abspath, dirname, join
import sys

sys.path.insert(0, join(abspath(dirname(__file__)), '..'))

from plush import Plush

app = Plush(__name__)


@app.get('/')
def index(request):
    request.send('Hello World!')


app.run()