App factory, data model, initial migration and HTTP metrics
- Flask app factory with env-driven config (.env loaded at import) - SQLAlchemy models: users, API apps, UI tokens, Last.fm auth tokens, sessions, scrobbles (deduplicated) and now-playing - Initial Alembic migration; CI checks migrations match the models - Prometheus metric definitions, per-endpoint RED hooks with bounded labels, and a standalone metrics server - docker compose Postgres with a test database; CI test job runs against a Postgres service container Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
606348800b
commit
98c8f2e824
21 files changed
+1777
-6
No files matched your search
+19
-1
@@ -3,7 +3,17 @@ name = "scrobbler"
|
||||
version = "0.1.0"
|
||||
description = "Self-hosted, Last.fm-compatible music scrobbling service"
|
||||
requires-python = ">=3.13"
|
||||
dependencies = []
|
||||
dependencies = [
|
||||
"flask>=3.1.3",
|
||||
"flask-cors>=6.0.5",
|
||||
"flask-migrate>=4.1.0",
|
||||
"flask-smorest>=0.47.0",
|
||||
"flask-sqlalchemy>=3.1.1",
|
||||
"gunicorn>=26.2.0",
|
||||
"prometheus-client>=0.26.0",
|
||||
"psycopg[binary]>=3.3.6",
|
||||
"python-dotenv>=1.2.3",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
@@ -26,6 +36,14 @@ select = ["E", "F", "W", "I", "B", "UP", "SIM"]
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"openapi-spec-validator>=0.9.0",
|
||||
"pylast>=7.1.0",
|
||||
"pytest>=9.1.1",
|
||||
"ruff>=0.16.9",
|
||||
]
|
||||
|
||||
[tool.ruff.format]
|
||||
exclude = ["src/scrobbler/migrations/**"]
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"src/scrobbler/migrations/**" = ["E501", "I", "UP", "W"]
|
||||
Reference in new issue
Block a user