Skip to content

Repository files navigation

Bundesliga Analytics (FastAPI + HTMX)

Public portfolio site showing statistics for the 2023–24 Bundesliga season.

Stack: FastAPI, HTMX, Jinja2, Pandas, SQLAlchemy, SQLite

Run locally

pip install -r requirements.txt
python main.py

Open http://127.0.0.1:8000/

Deploy on Render (free, public URL)

The app uses the bundled my_database.db in the repo (read-only). No separate database service is required.

Deployment uses Docker (Dockerfile) so Python 3.12 is fixed — Render’s default (3.14) breaks older pandas builds.

  1. Sign in at render.com and connect GitHub (grant access to W-ren-P/bundesliga-analytics-fastapi-htmx).
  2. New → Blueprint → repo bundesliga-analytics-fastapi-htmx (uses render.yaml),
    or New → Web Service → same repo → set Language to Docker.
  3. If an existing service still uses “Python” runtime: Settings → Runtime → Docker, or delete and recreate from the Blueprint.
  4. Sync Blueprint after pulls if you use Blueprint.
  5. Deploy. Use the https://….onrender.com URL on your CV/LinkedIn.

If you must use Render’s native Python runtime (not Docker), add environment variable PYTHON_VERSION = 3.12.8 in the service Environment tab and redeploy.

Free tier services sleep after ~15 minutes of no traffic; the first visit after that may take 30–60 seconds to wake up.

Database setup (rebuild from CSVs)

See docs/DB.md. Sample data is in sample_data/.

Legacy

Original Flask + PythonAnywhere version: bundesliga-analytics

About

A site displaying stats for the 2023-24 Bundesliga season, created using FastAPI + HTMX.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages