Created
August 26, 2017 14:58
-
-
Save dgonzo/b96fda0ae32054869ce9812093ce8bf9 to your computer and use it in GitHub Desktop.
WSGI Apistar
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 apistar import Include, Route | |
from apistar.frameworks.wsgi import WSGIApp as App | |
from apistar.handlers import docs_urls, static_urls | |
def welcome(name=None): | |
if name is None: | |
return {'message': 'Welcome to API Star!'} | |
return {'message': 'Welcome to API Star, %s!' % name} | |
routes = [ | |
Route('/', 'GET', welcome), | |
Include('/docs', docs_urls), | |
Include('/static', static_urls) | |
] | |
app = App(routes=routes) | |
if __name__ == '__main__': | |
app.main() |
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
apistar==0.2.1 | |
argcomplete==1.8.2 | |
base58==0.2.4 | |
boto3==1.4.5 | |
botocore==1.5.40 | |
certifi==2017.7.27.1 | |
chardet==3.0.4 | |
click==6.7 | |
coreapi==2.3.1 | |
coreschema==0.0.4 | |
docutils==0.14 | |
durationpy==0.5 | |
future==0.16.0 | |
futures==3.1.1 | |
hjson==3.0.0 | |
idna==2.6 | |
itypes==1.1.0 | |
Jinja2==2.9.6 | |
jmespath==0.9.3 | |
kappa==0.6.0 | |
lambda-packages==0.16.1 | |
MarkupSafe==1.0 | |
placebo==0.8.1 | |
py==1.4.34 | |
pytest==3.2.1 | |
python-dateutil==2.6.1 | |
python-slugify==1.2.4 | |
PyYAML==3.12 | |
requests==2.18.4 | |
s3transfer==0.1.10 | |
six==1.10.0 | |
toml==0.9.2 | |
tqdm==4.15.0 | |
troposphere==1.9.5 | |
Unidecode==0.4.21 | |
uritemplate==3.0.0 | |
urllib3==1.22 | |
Werkzeug==0.12 | |
whitenoise==3.3.0 | |
wsgi-request-logger==0.4.6 | |
zappa==0.43.2 |
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
{ | |
"dev": { | |
"app_function": "app.app", | |
"aws_region": "us-east-1", | |
"profile_name": "zappadeploy", | |
"s3_bucket": "zappa-wpg2qiveb" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment