Public Steam app and achievement data in a sqlite database
The database and deployments are updated automatically through GitHub actions.
SQLite3 File | database.db ⬇️ |
Datasette deployment | https://steam-to-sqlite.fly.dev/ |
GraphQL interface | https://steam-to-sqlite.fly.dev/graphql |
To preview what's included in the database schema, you can view models.py, which contains the SQLModel representation, or just explore on Datasette.
The following are some plots generated from the data. Follow the Datasette links to view what's most recent.
-
Steam games over time (and you thought your Steam library was large!)
-
Games per genre (who knew there were so many indie games?!)
-
Games with full controller support (stand-in for Steam Deck support)
Hopefully these inspire you to explore the data. If you find something you want to highlight, PRs are welcome!
To install the project locally:
- Ensure you have Python >= 3.10. pyenv recommended
- Create and activate a virtual environment:
python -m venv .venv && . .venv/bin/activate
- Install:
pip install -r requirements.txt
- With dev. dependencies:
pip install -r requirements.txt -r dev-requirements.txt
- Install package:
pip install -e .
or w/ dev dependenciespip install -e ".[dev]"
-
install/upgrade uv:
pipx install uv
-
Create lock files with:
uv pip compile -o requirements.txt pyproject.toml --quiet && \ uv pip compile --extra dev -c requirements.txt -o dev-requirements.txt pyproject.toml --quiet
-
Upgrade a package:
uv pip compile -o requirements.txt pyproject.toml --quiet --upgrade-package PACKAGE && \ uv pip compile --extra dev -c requirements.txt -o dev-requirements.txt pyproject.toml --quiet
-
Upgrade all packages with:
uv pip compile -o requirements.txt pyproject.toml --quiet --upgrade && \ uv pip compile --extra dev -c requirements.txt -o dev-requirements.txt pyproject.toml --quiet --upgrade
More here: https://github.com/astral-sh/uv
Download a copy of the database and save locally to database.db
To verify installation:
python steam2sqlite/main.py --help
usage: main.py [-h] [-l [LIMIT]]
options:
-h, --help show this help message and exit
-l [LIMIT], --limit [LIMIT]
limit runtime (minutes)
To run:
python steam2sqlite/main.py
Due to rate limits on the public Steam api, the program will take several days to iterate over all the Steam apps in the Steam catalog.
Limit the runtime in minutes with the -l
or --limit
argument:
python steam2sqlite/main.py --limit 1
Will run for 1 minutes and then (hopefully) exit cleanly with a database partially updated.
To upgrade db to current migration/revision
alembic upgrade head
Generate a migration/revision
alembic revision --autogenerate -m "MESSAGE"
Examine generated file in migrations/versions
. Pay attention to table/column renames (they will be dropped/created in migration file).
The deployment runs automatically with GitHub actions. To manually deploy:
-
install flyctl
-
flyctl auth login
-
Deploy:
datasette publish fly database.db \ --install datasette-graphql --install datasette-vega \ --app steam-to-sqlite \ --metadata datasette-data/metadata.json