blitz_api/pyproject.toml
fusion44 4e038e8fc7 feat: fetch app status via a celery task
This is a feature that allows to fetch the app status via a celery
task which stores the result in the Redis database and notifies the API
of the change. The API sends a notification to connected clients via the
SSE mechanism.

Using a background task allows to avoid crashing the whole API if the
script call fails.

The by default the cache is refreshed every 30 minutes. This can be
changed by setting the `BAPI_APP_STATUS_UPDATE_INTERVAL_MIN` environment
variable.

refs #123
2025-05-06 09:16:46 +02:00

102 lines
2.3 KiB
TOML

[tool.poetry]
name = "blitz_api"
version = "0.5.1"
description = "A backend for the Raspiblitz project"
authors = ["fusion44 <some.fusion@gmail.com>"]
license = "MIT"
packages = [
{ include = "app" },
]
[tool.poetry.dependencies]
python = "^3.12 | ^3.11"
fastapi = {extras = ["standard"], version = "^0.115.8"}
fastapi-plugins = "^0.13.1"
anyio = "^4.8.0"
redis = "^4.6.0"
aioredis = "^2.0.1"
pydantic = "^2.10.6"
uvicorn = {extras = ["standard"], version = "^0.34.0"}
pyjwt = "^2.10.1"
python-decouple = "^3.8"
psutil = "^6.1.1"
requests = "^2.32.3"
pyzmq = "^26.2.1"
aiohttp = "^3.11.12"
grpcio = "^1.70.0"
grpcio-tools = "^1.70.0"
googleapis-common-protos = "^1.66.0"
protobuf = "^5.29.3"
deepdiff = "^8.2.0"
loguru = "^0.7.2"
celery = {extras = ["redis"], version = "^5.4.0"}
[tool.poetry.group.dev.dependencies]
black = "^25.1.0"
pytest = "^8.3.4"
pytest-asyncio = "^0.25.3"
coverage = "^7.6.10"
isort = "^6.0.0"
ruff = "^0.9.5"
ruff-lsp = "^0.0.61"
debugpy = "^1.8.12"
click = "^8.1.8"
watchfiles = "^0.24.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.isort]
profile = "black"
[tool.ruff]
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
select = ["E", "F"]
ignore = []
# Allow auto fix for all enabled rules (when `--fix`) is provided.
fixable = ["A", "B", "C", "D", "E", "F", "G", "I", "N", "Q", "S", "T", "W", "ANN", "ARG", "BLE", "COM", "DJ", "DTZ", "EM", "ERA", "EXE", "FBT", "ICN", "INP", "ISC", "NPY", "PD", "PGH", "PIE", "PL", "PT", "PTH", "PYI", "RET", "RSE", "RUF", "SIM", "SLF", "TCH", "TID", "TRY", "UP", "YTT"]
unfixable = []
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"app/lightning/impl/protos/*"
]
# Same as Black.
line-length = 88
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Assume Python 3.9.
target-version = "py39"
[tool.ruff.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.poetry.scripts]
api = "app.server:main"