A professional Python client for Steam Web API and Steam Community flows.
Project description
SteamCommunityKit
SteamCommunityKit is a Python client for real Steam user workflows. It covers public Steam Web API reads, no-key Steam Community reads, and authenticated community actions such as profile management, privacy updates, trade URL helpers, market lookups, inventory helpers, and group workflows.
The library is built around features normal users can actually access. It intentionally avoids Steamworks publisher-only administration endpoints that require partner permissions.
Installation
Install from PyPI:
python -m pip install SteamCommunityKit
Upgrade an existing installation:
python -m pip install --upgrade SteamCommunityKit
Install from a local checkout for development:
python -m pip install -e .[dev]
Python 3.8+ is supported.
Quick Start
Use the client without login or API keys for public community data:
from steamcommunitykit import SteamClient
client = SteamClient()
steam_id = client.resolve_steam_id("gaben")
summary = client.get_player_summary("https://steamcommunity.com/id/gaben/")
price = client.get_market_price_overview(730, "AK-47 | Redline (Field-Tested)")
print(steam_id)
print(summary["personaname"])
print(price["lowest_price"])
Provide a normal steamcommunity.com/dev key when you need Web API methods:
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.get("game_count"))
print(news["items"][0]["title"])
Login only when you need account-backed community 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, interactive terminal logins prompt automatically. For non-interactive environments, you can still pass a steam_guard_code explicitly.
Common Workflows
Save and restore a logged-in community 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 the authenticated session with raw requests calls:
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)
Build a 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"])
Feature Overview
Authentication and sessions
- Username and password login with Steam Guard support
- Refresh-token reuse helpers
- Cookie string, cookie dict, and JSON session import/export
- File-based session save and restore helpers
- Authenticated
requests.Sessionhandoff for custom workflows
Community account tools
- Account and profile state reads
- Profile edits for persona name, vanity URL, summary, real name, and location
- Privacy reads and updates
- Avatar upload
- Trade offer URL read and rotation helpers
- Web API key status parsing
Groups
- Group name, URL, and tag availability checks
- Group detail and member reads
- Multi-page member aggregation helpers
- Logged-in membership state parsing
- Group creation with validation and limited-account error handling
Market
- Market search and exact-match helpers
- Price overview and listing summaries
- Item name ID, order histogram, order summary, and price history
- Multi-page aggregation helpers
- Full URL-based helper variants
Inventory
- Raw and normalized inventory reads
- Pagination helpers
- Item search and filtering helpers
- Asset ID lookups and URL-based inventory helpers
Workshop and collections
- Published file detail helpers
- Collection detail and child item helpers
- Query helpers with cursor pagination
- Exact-match and normalized map helpers
Steam Web API
- Users, friends, bans, badges, and levels
- Owned games and recently played games
- App, news, and utility endpoints
- Trade and econ summary helpers that work with normal user-accessible keys
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 public smoke tests with an API key:
python examples/smoke_test.py --api-key YOUR_WEB_API_KEY --public-only
Run community smoke tests with a Steam account:
python examples/smoke_test.py --username YOUR_USERNAME --password YOUR_PASSWORD --community-only
Notes
- Web API methods require a normal Steam Web API key from
steamcommunity.com/dev. - Community write actions require a logged-in Steam session.
- Some actions depend on Steam account state, including limited accounts, Family View, and privacy restrictions.
- When authentication or input requirements are missing, the library raises explicit errors instead of silently failing.
Disclaimer
This project is not affiliated with Valve or Steam. Steam pages and community response shapes can change over time, so community-backed helpers may require maintenance when Steam updates its web 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.1.tar.gz.
File metadata
- Download URL: steamcommunitykit-0.1.1.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 |
aecf31fdfb7e8ce0d32d22c5cd3cfc1790c3eb3177b25d3b77934838a38f15a1
|
|
| MD5 |
d11d37e790787a38d2db4d9db4df5267
|
|
| BLAKE2b-256 |
39e9d71736b29ef56edbe6c199bf6aa546d5c4de71ddf451766ebbef0d02c0fc
|
Provenance
The following attestation bundles were made for steamcommunitykit-0.1.1.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.1.tar.gz -
Subject digest:
aecf31fdfb7e8ce0d32d22c5cd3cfc1790c3eb3177b25d3b77934838a38f15a1 - Sigstore transparency entry: 1820057408
- Sigstore integration time:
-
Permalink:
SteamCommunityKit/SteamCommunityKit@d9bf2171e61b49dfa45a3b75ed082c1e5b5a3e34 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/SteamCommunityKit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d9bf2171e61b49dfa45a3b75ed082c1e5b5a3e34 -
Trigger Event:
release
-
Statement type:
File details
Details for the file steamcommunitykit-0.1.1-py3-none-any.whl.
File metadata
- Download URL: steamcommunitykit-0.1.1-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 |
e8cb70ffbba0b7241231a2b5a2e0c8093baf98a8ad5f060e56fb053212dbb233
|
|
| MD5 |
4cff06ca1a3daa69d9fd74329a21a665
|
|
| BLAKE2b-256 |
afbaec25b48f5b3a521d082b5ea53765b1f73bfc81fdafc46b775db8c73fac93
|
Provenance
The following attestation bundles were made for steamcommunitykit-0.1.1-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.1-py3-none-any.whl -
Subject digest:
e8cb70ffbba0b7241231a2b5a2e0c8093baf98a8ad5f060e56fb053212dbb233 - Sigstore transparency entry: 1820057447
- Sigstore integration time:
-
Permalink:
SteamCommunityKit/SteamCommunityKit@d9bf2171e61b49dfa45a3b75ed082c1e5b5a3e34 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/SteamCommunityKit
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d9bf2171e61b49dfa45a3b75ed082c1e5b5a3e34 -
Trigger Event:
release
-
Statement type: