This commit is contained in:
parent
2454a6d5e8
commit
c5cf6bb28d
@ -12,6 +12,8 @@ from ics.alarm import DisplayAlarm
|
||||
from oauthlib.oauth2 import TokenExpiredError
|
||||
from quart import Quart, redirect, render_template, request, session, url_for
|
||||
from requests_oauthlib import OAuth2Session # type: ignore
|
||||
import sentry_sdk
|
||||
from sentry_sdk.integrations.quart import QuartIntegration
|
||||
from uvicorn.middleware.proxy_headers import ProxyHeadersMiddleware # type: ignore
|
||||
|
||||
|
||||
@ -31,6 +33,10 @@ QUART_DEBUG = getenv("QUART_DEBUG", False)
|
||||
if QUART_DEBUG:
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
SENTRY_DSN = getenv("SENTRY_DSN")
|
||||
if SENTRY_DSN:
|
||||
sentry_sdk.init(SENTRY_DSN, integrations=[QuartIntegration()])
|
||||
|
||||
API_BASE_URL = getenv("API_BASE_URL", "https://discordapp.com/api")
|
||||
AUTHORIZATION_BASE_URL = f"{API_BASE_URL}/oauth2/authorize"
|
||||
TOKEN_URL = f"{API_BASE_URL}/oauth2/token"
|
||||
|
50
poetry.lock
generated
50
poetry.lock
generated
@ -723,14 +723,14 @@ files = [
|
||||
|
||||
[[package]]
|
||||
name = "importlib-metadata"
|
||||
version = "6.1.0"
|
||||
version = "6.3.0"
|
||||
description = "Read metadata from Python packages"
|
||||
category = "main"
|
||||
optional = false
|
||||
python-versions = ">=3.7"
|
||||
files = [
|
||||
{file = "importlib_metadata-6.1.0-py3-none-any.whl", hash = "sha256:ff80f3b5394912eb1b108fcfd444dc78b7f1f3e16b16188054bd01cb9cb86f09"},
|
||||
{file = "importlib_metadata-6.1.0.tar.gz", hash = "sha256:43ce9281e097583d758c2c708c4376371261a02c34682491a8e98352365aad20"},
|
||||
{file = "importlib_metadata-6.3.0-py3-none-any.whl", hash = "sha256:8f8bd2af397cf33bd344d35cfe7f489219b7d14fc79a3f854b75b8417e9226b0"},
|
||||
{file = "importlib_metadata-6.3.0.tar.gz", hash = "sha256:23c2bcae4762dfb0bbe072d358faec24957901d75b6c4ab11172c0c982532402"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
@ -1327,6 +1327,48 @@ requests = ">=2.0.0"
|
||||
[package.extras]
|
||||
rsa = ["oauthlib[signedtoken] (>=3.0.0)"]
|
||||
|
||||
[[package]]
|
||||
name = "sentry-sdk"
|
||||
version = "1.19.1"
|
||||
description = "Python client for Sentry (https://sentry.io)"
|
||||
category = "main"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
files = [
|
||||
{file = "sentry-sdk-1.19.1.tar.gz", hash = "sha256:7ae78bd921981a5010ab540d6bdf3b793659a4db8cccf7f16180702d48a80d84"},
|
||||
{file = "sentry_sdk-1.19.1-py2.py3-none-any.whl", hash = "sha256:885a11c69df23e53eb281d003b9ff15a5bdfa43d8a2a53589be52104a1b4582f"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
certifi = "*"
|
||||
urllib3 = {version = ">=1.26.11", markers = "python_version >= \"3.6\""}
|
||||
|
||||
[package.extras]
|
||||
aiohttp = ["aiohttp (>=3.5)"]
|
||||
arq = ["arq (>=0.23)"]
|
||||
beam = ["apache-beam (>=2.12)"]
|
||||
bottle = ["bottle (>=0.12.13)"]
|
||||
celery = ["celery (>=3)"]
|
||||
chalice = ["chalice (>=1.16.0)"]
|
||||
django = ["django (>=1.8)"]
|
||||
falcon = ["falcon (>=1.4)"]
|
||||
fastapi = ["fastapi (>=0.79.0)"]
|
||||
flask = ["blinker (>=1.1)", "flask (>=0.11)"]
|
||||
grpcio = ["grpcio (>=1.21.1)"]
|
||||
httpx = ["httpx (>=0.16.0)"]
|
||||
huey = ["huey (>=2)"]
|
||||
opentelemetry = ["opentelemetry-distro (>=0.35b0)"]
|
||||
pure-eval = ["asttokens", "executing", "pure-eval"]
|
||||
pymongo = ["pymongo (>=3.1)"]
|
||||
pyspark = ["pyspark (>=2.4.4)"]
|
||||
quart = ["blinker (>=1.1)", "quart (>=0.16.1)"]
|
||||
rq = ["rq (>=0.6)"]
|
||||
sanic = ["sanic (>=0.8)"]
|
||||
sqlalchemy = ["sqlalchemy (>=1.2)"]
|
||||
starlette = ["starlette (>=0.19.1)"]
|
||||
starlite = ["starlite (>=1.48)"]
|
||||
tornado = ["tornado (>=5)"]
|
||||
|
||||
[[package]]
|
||||
name = "six"
|
||||
version = "1.16.0"
|
||||
@ -1599,4 +1641,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more
|
||||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = "^3.8.1"
|
||||
content-hash = "5d4bcb06612b5d722a32923c80051c313a543b5f778ec845ff75542557d7facd"
|
||||
content-hash = "3c12cb82d2b1f10d22faca915ff0329321ed3c8613837cd1f7637c8cf6333d21"
|
||||
|
@ -18,6 +18,7 @@ ics = "0.8.0.dev0"
|
||||
python-dotenv = "^1.0.0"
|
||||
quart = "^0.18.3"
|
||||
requests-oauthlib = "^1.3.1"
|
||||
sentry-sdk = "^1.19.1"
|
||||
uvicorn = "^0.21.1"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
|
Loading…
Reference in New Issue
Block a user