A professional Python client for Steam Web API and Steam Community flows.
Project description
SteamCommunityKit
SteamCommunityKit is a Python library for real Steam user workflows:
- public Steam Web API reads with a normal
steamcommunity.com/devkey - public no-key community reads such as profile XML, market data, inventory URLs, and group URLs
- logged-in Steam Community actions such as profile edits, privacy updates, avatar upload, trade URL management, and group creation checks
- session persistence helpers for refresh tokens, cookies, JSON bundles, and external
requests.Sessionreuse
This package is built around the workflows normal users can actually use. It does not try to wrap Steamworks publisher-only administration endpoints that require partner permissions.
Install
Install from GitHub:
pip install git+https://github.com/ja7den2006/SteamCommunityKit.git
Install from a local checkout:
pip install -e .[dev]
Choose The Right Mode
Use no key when you only need public community data:
from steamcommunitykit import SteamClient
client = SteamClient()
print(client.resolve_steam_id("gaben"))
print(client.get_player_summary("https://steamcommunity.com/id/gaben/"))
print(client.get_market_price_overview(730, "AK-47 | Redline (Field-Tested)"))
Use a normal Steam Web API key when you need Web API calls:
from steamcommunitykit import SteamClient
client = SteamClient(api_key="YOUR_WEB_API_KEY")
summary = client.get_player_summary("gaben")
games = client.get_owned_games_for_user("https://steamcommunity.com/id/gaben/")
news = client.get_news_summary(570, count=2)
print(summary["personaname"])
print(games["game_count"])
print(news["items"][0]["title"])
Use community login when you need account-backed actions:
from steamcommunitykit import SteamClient
client = SteamClient()
client.login_to_community("YOUR_USERNAME", "YOUR_PASSWORD")
print(client.get_account_info())
print(client.get_trade_offer_url())
print(client.get_group_membership_state("Valve"))
If Steam Guard is required, the credential login flow prompts automatically in an interactive terminal. You can still pass steam_guard_code="12345" explicitly for non-interactive runs.
Verified Workflow Examples
Save and restore a logged-in session
from steamcommunitykit import SteamClient
client = SteamClient()
client.login_to_community("YOUR_USERNAME", "YOUR_PASSWORD")
client.save_community_session_bundle("steam_session.json")
restored = SteamClient()
restored.load_community_session_bundle("steam_session.json")
print(restored.get_community_session_state())
Reuse Steam Community auth with raw requests
from steamcommunitykit import SteamClient
client = SteamClient()
client.login_to_community("YOUR_USERNAME", "YOUR_PASSWORD")
session = client.build_community_requests_session()
response = session.get("https://steamcommunity.com/my/edit/")
print(response.status_code)
Market snapshot from a full listing URL
from steamcommunitykit import SteamClient
client = SteamClient()
snapshot = client.get_market_price_snapshot_by_url(
"https://steamcommunity.com/market/listings/730/AK-47%20%7C%20Redline%20%28Field-Tested%29"
)
print(snapshot["price_overview"]["lowest_price"])
print(snapshot["listing_summary"]["listing_count"])
Major Features
Authentication and session management
- credential login with Steam Guard support
- refresh-token login reuse
- cookie string, cookie mapping, and JSON bundle import/export
- file-based session save/load helpers
- ready-to-use authenticated
requests.Session
Community account features
- account/profile bundle reads
- profile edits for persona name, vanity URL, summary, real name, and location
- privacy reads and writes
- avatar upload
- trade offer URL read/rotate
- Web API key status page parsing
Groups
- name, URL, and tag availability checks
- group details, members, and multi-page member aggregation
- group member summaries and indexed maps
- group membership state parsing for the logged-in account
- group creation with validation and clear limited-account errors
Market
- search, normalized results, and exact-match helpers
- price overview
- listing summaries, maps, filtered lookups, and multi-page aggregation
- item name ID, order histogram, order summary, and price history
- one-shot market snapshots
- full URL-based helper variants
Inventory
- raw and normalized inventory reads
- full pagination helpers
- item search/filtering
- item counts, asset ID lookup, and URL-based inventory helpers
Workshop and collections
- published file detail helpers
- collection details and child item helpers
- query helpers with cursor pagination
- normalized maps and exact-match finders
- full workshop URL helper variants
Web API reads
- users, friends, bans, owned games, recently played games, badges, levels
- apps, news, user stats, trade/econ summaries, store searches, and utility endpoints
Documentation
- Installation Guide
- Authentication Guide
- Community Guide
- Groups Guide
- Market Guide
- Inventory Guide
- Workshop Guide
- Web API Guide
- Testing Guide
- Security Policy
Testing
Run the unit suite:
python -m pytest -q
Run the public smoke suite with an API key:
python examples/smoke_test.py --api-key YOUR_WEB_API_KEY --public-only
Run the community smoke suite with a Steam account:
python examples/smoke_test.py --username YOUR_USERNAME --password YOUR_PASSWORD --community-only
Notes
- Some Web API features require a normal Steam Web API key.
- Some community features require a logged-in session.
- Some actions are restricted by Steam account state, such as limited accounts, Family View, or profile privacy.
- When a feature requires more auth than the current client state provides, the package raises explicit
SteamAuthenticationErrororSteamValidationErrormessages instead of failing silently.
Disclaimer
This project is not affiliated with Valve or Steam. Steam pages and response shapes can change over time, so some community-backed helpers may need maintenance if Steam updates its HTML or request flows.
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 steamcommunitykit-0.1.0.tar.gz.
File metadata
- Download URL: steamcommunitykit-0.1.0.tar.gz
- Upload date:
- Size: 70.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7ffdf0e93dad7db55a0db1e11988c049d962fa85b9263602196d7d15fe82212
|
|
| MD5 |
7d1ae82ea5dd818380264fb2cc0b8750
|
|
| BLAKE2b-256 |
11576d908a8089ebc53e5b4888ff7ca904cd2a61e077ebfc3975955fe0421a7f
|
Provenance
The following attestation bundles were made for steamcommunitykit-0.1.0.tar.gz:
Publisher:
publish.yml on SteamCommunityKit/SteamCommunityKit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
steamcommunitykit-0.1.0.tar.gz -
Subject digest:
b7ffdf0e93dad7db55a0db1e11988c049d962fa85b9263602196d7d15fe82212 - Sigstore transparency entry: 1819991952
- Sigstore integration time:
-
Permalink:
SteamCommunityKit/SteamCommunityKit@d7194ec4ccc0b076f2bdf48b359941589b8c447e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/SteamCommunityKit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d7194ec4ccc0b076f2bdf48b359941589b8c447e -
Trigger Event:
release
-
Statement type:
File details
Details for the file steamcommunitykit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: steamcommunitykit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 57.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d400fa46a4898733e128f7fa4a1ce16f63817f3f00724e1e449a7952bac67357
|
|
| MD5 |
4d2ccd8a7c50e019109e03a70b153894
|
|
| BLAKE2b-256 |
70ac4ab8e28d0fedf1cd2b17c9e9dbc3cea6992283ada08b0262de92af664199
|
Provenance
The following attestation bundles were made for steamcommunitykit-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on SteamCommunityKit/SteamCommunityKit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
steamcommunitykit-0.1.0-py3-none-any.whl -
Subject digest:
d400fa46a4898733e128f7fa4a1ce16f63817f3f00724e1e449a7952bac67357 - Sigstore transparency entry: 1819992002
- Sigstore integration time:
-
Permalink:
SteamCommunityKit/SteamCommunityKit@d7194ec4ccc0b076f2bdf48b359941589b8c447e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/SteamCommunityKit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d7194ec4ccc0b076f2bdf48b359941589b8c447e -
Trigger Event:
release
-
Statement type: