Created
August 10, 2021 20:55
-
-
Save jachane99/60540dd95142e6af3be786a2e636bdcc to your computer and use it in GitHub Desktop.
sample project with fastapi
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
import logging | |
import os | |
import sys | |
import fastapi | |
import sentry_sdk | |
import uvicorn | |
def main(): | |
"""Run the service.""" | |
try: | |
uvicorn.run(app, host=0.0.0.0, port=8000) | |
except Exception: | |
logging.exception('failed to start app') |
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
[tool.poetry] | |
name = "fastapitestservice" | |
version = "1" | |
authors = ["chau <chau@gmail.com>"] | |
[tool.poetry.dependencies] | |
python = "^3.9.5" | |
ujson = "*" | |
prometheus-client = "*" | |
fastapi = "*" | |
uvicorn = "*" | |
requests = "*" | |
python-dotenv = "*" | |
starlette = "*" | |
sentry-sdk = "*" | |
[tool.poetry.dev-dependencies] | |
commitizen = "*" | |
pytest-asyncio = "*" | |
pytest = "*" | |
pre-commit = "*" | |
pydocstyle = "*" | |
[build-system] | |
requires = ["poetry-core>=1.0.0"] | |
build-backend = "poetry.core.masonry.api" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment