Skip to content

Instantly share code, notes, and snippets.

@jachane99
Created August 10, 2021 20:55
Show Gist options
  • Save jachane99/60540dd95142e6af3be786a2e636bdcc to your computer and use it in GitHub Desktop.
Save jachane99/60540dd95142e6af3be786a2e636bdcc to your computer and use it in GitHub Desktop.
sample project with fastapi
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')
[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