A python project to get the stats of your Steam account and display them in your GitHub profile.
Project description
Steam Stats📶
A GitHub Action and Docker container to generate Steam user stats cards (PNG) for your README using the official Steam Web API and web scraping for Workshop stats.
Badges
Workflow Status
Code Quality & Coverage
Packaging & Deployment
Environments
Documentation & Repo
License & Security
Time Tracking
From one Passionate Gamer to Another 🍻
Full Documentation now available: nicconike.github.io/Steam-Stats/
Browse detailed guides on:
- Getting Started (API Keys, setup, README integration)
- Usage & Configuration: User Guide
- Automated Examples & Feature Flags
- API Reference (developer-level docs)
- Developer Guide (contributing, testing, local setup)
Found missing info or want to improve these docs? Open a documentation issue or PR!
Prerequisites
- Steam Web API Key: API key is important to fetch your account details and for that you will require a key which you can create for your account here
- Markdown Comments: Update the markdown file by adding the comments where the Steam Stats will be embedded to. Refer here to learn more.
- Steam ID: You can get your 64-bit Steam id (SteamID64 - 17 digit number) by clicking on your profile name in the top right corner in steam desktop client, select "Account Details" and your Steam ID will be displayed directly under your account name
- Steam Custom ID: Open the Steam desktop application, click on your profile name in the top right corner. Select View Profile and your custom URL will be displayed in the URL bar. From this url you will know your Steam Custom ID
The Github Actions is set to run on every Monday 12 AM IST (UTC+5:30) which you can modify to your own time as per your liking by updating it in the workflow file
schedule:
- cron: "30 18 * * 0"
[!IMPORTANT] Please don't forget any of the steps mentioned in the prerequisites else the Github Action will not work. Also, make sure that you have set the country correctly in your Steam Account.
You can refer the Steam Stats Wiki if you have any questions related to any of the steps mentioned in Prerequisites.
Samples (From my Steam Account)
Example for Steam User Stats
Example for Steam Workshop Stats
Update README
- Add below comment in your markdown file for Steam User Stats
<!-- Steam-Stats start --> <!-- Steam-Stats end -->
- Add below comment for Steam Workshop Stats (Optional)
<!-- Steam-Workshop start --> <!-- Steam-Workshop end -->
- Don't forget to add these comments in your readme file or wherever you want to display your steam stats, because without the comments the readme will not get updated
[!CAUTION] The
Steam-Statsmarker should be placed before theSteam-Workshopmarkers if you are using both.
Features
- Steam Player Summary (Note: Steam Web API doesn't support Web Sockets, so the profile status cannot be updated in real time.)
- Recently Played Games from Steam in the Last 2 Weeks
- Steam Workshop Stats (If Applicable)
Feature Flags
- Steam User Stats (Required | Default)
- Steam Player Summary
- Steam's Recently Played Games in the last 2 weeks
-
The Graph plot for recently played games is by default implemented in a fixed linear scale but if you want you can update it to be in a logarithmic scale by using this flag in your workflow:
LOG_SCALE: True -
When
LOG_SCALEisFalse -
When
LOG_SCALEisTrue
-
- Steam Workshop Stats (Optional)
- Workshop Stats Module can be used by adding this flag in your workflow file in the environment variables:
WORKSHOP_STATS: True - This module displays the total number of Unique Visitors, Subscribers and Favorites for your Steam Workshop Items
- Workshop Stats Module can be used by adding this flag in your workflow file in the environment variables:
Setup with Example
After completing the steps mentioned in the Prerequisites, you have to save all the mentioned keys(except markdown comments) like Steam API Key, Steam-ID, Custom-ID as Secrets in your Github repo's settings.
Repo Settings -> Security -> Secrets and Variables -> Actions -> Add in Repository Secrets
If you are new to Github Secrets then you can checkout this official doc here.
Sample Workflow File
steam-stats.yml
name: Steam Stats
on:
push:
branches: master
schedule:
# Runs every Monday at 12AM IST (UTC+5:30)
- cron: "30 18 * * 0"
workflow_dispatch:
jobs:
steam-stats:
name: Steam Stats
runs-on: ubuntu-latest
steps:
- uses: nicconike/steam-stats@master
with:
STEAM_API_KEY: ${{ secrets.STEAM_API_KEY }} # Created Steam API key env var
STEAM_ID: ${{ vars.STEAM_ID }} # Steam ID env var
STEAM_CUSTOM_ID: ${{ vars.STEAM_CUSTOM_ID }} # Custom ID env var
WORKSHOP_STATS: True # Optional
LOG_SCALE: True # Optional
Checkout this real time usage example in a github repo from here and also the github actions workflow file.
Contributions
Star⭐ and Fork🍴 the Repo to start with your feature request(or bug) and experiment with the project to implement whatever Idea you might have and sent the Pull Request through 🤙
Please refer Contributing.md to get to know how to contribute to this project. And thank you for considering to contribute.
Credits
Support💙
If you are using this project and are really happy with it, then there are few ways to support me so that I can keep doing what I like doing:
- Credit in your readme where you use this action
- Drop a follow!😁
- Starring and Sharing the project
- Donations through GitHub Sponsers or whichever platform you like. So, that I can create more projects like these and play more games🎮🎧
Thanks!🫡
Created with 🐍 & ❤️ by Nicco
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file steam_stats-1.4.0.tar.gz.
File metadata
- Download URL: steam_stats-1.4.0.tar.gz
- Upload date:
- Size: 29.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f0d1b7061df58486dabac3e35191d08c6b0aad53316945393beefea2a67efc2
|
|
| MD5 |
2682e87bb6ee46675cfe95af6d110ad6
|
|
| BLAKE2b-256 |
7b27705e5775b44cf6e2eea8881c5ffb8ccf1bdedbe70fb3b1a4dfce706d8ffc
|
Provenance
The following attestation bundles were made for steam_stats-1.4.0.tar.gz:
Publisher:
release.yml on Nicconike/Steam-Stats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
steam_stats-1.4.0.tar.gz -
Subject digest:
5f0d1b7061df58486dabac3e35191d08c6b0aad53316945393beefea2a67efc2 - Sigstore transparency entry: 564664225
- Sigstore integration time:
-
Permalink:
Nicconike/Steam-Stats@72341c02d11252942fe7fa92a6bb859daa274e92 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Nicconike
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@72341c02d11252942fe7fa92a6bb859daa274e92 -
Trigger Event:
push
-
Statement type:
File details
Details for the file steam_stats-1.4.0-py3-none-any.whl.
File metadata
- Download URL: steam_stats-1.4.0-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8b36de3f290915c6d03e0db8e7fa7673715601e6a924fe5d5a85f5eb07e1d4b
|
|
| MD5 |
345c3608e7f0ac618e03d342365a0e0b
|
|
| BLAKE2b-256 |
785779e69ad845140815965c32c65224a5b2b2c09e432debb3feda956f3ffed0
|
Provenance
The following attestation bundles were made for steam_stats-1.4.0-py3-none-any.whl:
Publisher:
release.yml on Nicconike/Steam-Stats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
steam_stats-1.4.0-py3-none-any.whl -
Subject digest:
a8b36de3f290915c6d03e0db8e7fa7673715601e6a924fe5d5a85f5eb07e1d4b - Sigstore transparency entry: 564664231
- Sigstore integration time:
-
Permalink:
Nicconike/Steam-Stats@72341c02d11252942fe7fa92a6bb859daa274e92 -
Branch / Tag:
refs/heads/master - Owner: https://github.com/Nicconike
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@72341c02d11252942fe7fa92a6bb859daa274e92 -
Trigger Event:
push
-
Statement type: