{"id":21714341,"url":"https://github.com/somespecialone/aiosteampy","last_synced_at":"2026-04-10T21:22:21.165Z","repository":{"id":37984914,"uuid":"461351628","full_name":"somespecialone/aiosteampy","owner":"somespecialone","description":"Trade and interact with steam market, webapi, guard","archived":false,"fork":false,"pushed_at":"2025-11-24T21:03:21.000Z","size":855,"stargazers_count":75,"open_issues_count":8,"forks_count":11,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-11-28T08:33:10.465Z","etag":null,"topics":["aiohttp","asyncio","python","steam","steam-trade-offers","trade"],"latest_commit_sha":null,"homepage":"https://aiosteampy.somespecial.one/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/somespecialone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-02-20T00:59:17.000Z","updated_at":"2025-11-24T21:03:24.000Z","dependencies_parsed_at":"2023-07-15T08:00:30.927Z","dependency_job_id":"4b5fb16a-0d47-437a-a350-0206425b53d5","html_url":"https://github.com/somespecialone/aiosteampy","commit_stats":{"total_commits":45,"total_committers":3,"mean_commits":15.0,"dds":"0.28888888888888886","last_synced_commit":"e2086b18abc4b2e93008625d4a43d605469d0e3e"},"previous_names":["somespecialone/asyncsteampy"],"tags_count":44,"template":false,"template_full_name":null,"purl":"pkg:github/somespecialone/aiosteampy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somespecialone%2Faiosteampy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somespecialone%2Faiosteampy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somespecialone%2Faiosteampy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somespecialone%2Faiosteampy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/somespecialone","download_url":"https://codeload.github.com/somespecialone/aiosteampy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somespecialone%2Faiosteampy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27707672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-13T02:00:09.769Z","response_time":147,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aiohttp","asyncio","python","steam","steam-trade-offers","trade"],"created_at":"2024-11-26T00:34:24.488Z","updated_at":"2026-04-10T21:22:21.155Z","avatar_url":"https://github.com/somespecialone.png","language":"Python","funding_links":[],"categories":["Packages"],"sub_categories":["Python"],"readme":"\u003c!--header-start--\u003e\n\n# AIOSTEAMPY\n\n[![Made in Ukraine](https://img.shields.io/badge/made_in-ukraine-ffd700.svg?labelColor=0057b7)](https://stand-with-ukraine.pp.ua)\n[![steam](https://shields.io/badge/steam-1b2838?logo=steam)](https://store.steampowered.com/)\n[![license](https://img.shields.io/github/license/somespecialone/aiosteampy)](https://github.com/somespecialone/aiosteampy/blob/main/LICENSE)\n[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![Snyk Badge](https://img.shields.io/badge/Snyk-4C4A73?logo=snyk\u0026logoColor=fff\u0026style=flat)](https://security.snyk.io/package/pip/aiosteampy)\n[![pypi](https://img.shields.io/pypi/v/aiosteampy)](https://pypi.org/project/aiosteampy)\n[![Release](https://github.com/somespecialone/aiosteampy/actions/workflows/release.yml/badge.svg)](https://github.com/somespecialone/aiosteampy/actions/workflows/release.yml)\n[![Docs](https://github.com/somespecialone/aiosteampy/actions/workflows/docs.yml/badge.svg)](https://github.com/somespecialone/aiosteampy/actions/workflows/docs.yml)\n[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/somespecialone/aiosteampy)\n\nManage Steam sessions, Guard, Market, trade offers and more.\n\n---\n\n[![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner-direct-single.svg)](https://stand-with-ukraine.pp.ua)\n\n\u003c!--header-end--\u003e\n\n\u003e [!IMPORTANT]\n\u003e The project is heading toward `1.0.0` and there can be some changes until stable release\n\u003e but library design as a whole with most API will stay.\n\n## Documentation\n\n- 📖 Project documentation is available at [aiosteampy.somespecial.one](https://aiosteampy.somespecial.one).\n- 🧠 Generated [DeepWiki](https://deepwiki.com/somespecialone/aiosteampy).\n\n\u003c!--install-start--\u003e\n\n## Installation\n\nProject published on [PyPI](https://pypi.org/) under [aiosteampy](https://pypi.org/project/aiosteampy/) name\nso can be installed with:\n\n```sh\npip install aiosteampy\npoetry add aiosteampy\nuv add aiosteampy\n```\n\n### Prereleases\n\nTo install _prerelease_ versions (alpha, beta, release candidates),\nconsider allowing the package manager to do it:\n\n```sh\npip install --pre aiosteampy\npoetry add --allow-prereleases aiosteampy\nuv add --prerelease aiosteampy\n```\n\n### Extras\n\nExtras can be installed with `aiosteampy[\u003cextra\u003e]` install target.\n\nProject uses [aiohttp](https://github.com/aio-libs/aiohttp) as default _HTTP transport_ with all its\ncapabilities and limitations.\n\n- `socks` - enable **socks** type web proxy support for **default** _HTTP transport_.\n- `wreq` - [wreq-python](https://github.com/0x676e67/wreq-python) _HTTP transport_ implementation.\n  Supports *proxies, HTTP/2, and browser impersonification*. Will be **used automatically** once installed.\n\n\u003c!--install-end--\u003e\n\u003c!--usage-start--\u003e\n\n## Quick start\n\nPackage separated into *main modules* which can be imported from ``aiosteampy`` namespace:\n\n- `session` - `Steam Session` management and auth tokens negotiation.\n- `guard` - `Steam Guard/Mobile Authenticator` (2FA) functionality.\n- `client` - abstract container for `Steam` domains implementations (`Market`, `Trade Offers`, etc.).\n\n### Session\n\nSimple demonstrative example of using `SteamSession` to log in into account\nwith credentials and then print `access` and `refresh` tokens:\n\n```python\nimport asyncio\nimport json\n\nfrom aiosteampy.session import SteamSession, GuardConfirmationRequired\n\n\nasync def login_with_credentials():\n    session = SteamSession()\n\n    account_name = input(\"Input login: \")\n    password = input(\"Input password: \")\n\n    try:\n        await session.with_credentials(account_name, password)\n    except GuardConfirmationRequired as e:\n        if e.email_code:\n            code = input(\"Code from Steam has been sent to your email. Paste it here: \")\n            await session.submit_auth_code(code, \"email\")\n        elif e.device_code:\n            code = input(\"Input code from Mobile Device Authenticator: \")\n            await session.submit_auth_code(code, \"device\")\n        else:\n            input(\n                (\"Steam requests device or email confirmation. \"\n                 \"Click on the link from email or mobile application and press enter.\")\n            )\n\n    await session.finalize()\n\n    print(\"Access token: \", session.access_token.raw)\n    print(\"Refresh token: \", session.refresh_token.raw)\n\n    await session.transport.close()\n\n\nasyncio.run(login_with_credentials())\n```\n\n### Guard\n\nUsing `SteamGuard` to enable `Steam Mobile Auhtenticator`\n(similar to using [SDA](https://github.com/Jessecar96/SteamDesktopAuthenticator) functionality)\nand dump `SteamGuardAccount` data into a file:\n\n```python\nimport json\nimport asyncio\n\nfrom aiosteampy.session import SteamSession\nfrom aiosteampy.guard import SteamGuard, SmsConfirmationRequired, EmailConfirmationRequired\n\n\nasync def enable_two_fa():\n    session = SteamSession(...)  # authenticated session\n\n    guard = SteamGuard(session)\n\n    try:\n        guard.enable()\n    except SmsConfirmationRequired as e:\n        code = input(f\"Guard activation code has been sent to your phone ({e.phone_hint}). Paste it here: \")\n    except EmailConfirmationRequired:\n        code = input(\"Guard activation code has been sent to your email. Paste it here: \")\n\n    await guard.finalize(code)\n\n    # Exported guard account contains secrets that cannot be retrieved once more\n    # therefore, data must be saved ASAP to prevent loss of access to a user's Steam account\n    guard_account = guard.export_account()\n    with open(f\"./{session.account_name}.guard.json\", \"w\") as f:\n        json.dump(guard_account.serialize(), f)\n\n    await session.transport.close()\n\n\nasyncio.run(enable_two_fa())\n```\n\n### Client\n\nUsing `SteamClient` with authenticated `SteamSession` to get _current user inventory items_:\n\n```python\nimport asyncio\n\nfrom aiosteampy.session import SteamSession\nfrom aiosteampy.client import SteamClient, AppContext, App\n\n\nasync def get_inventory():\n    session = SteamSession(...)  # authenticated session\n\n    client = SteamClient(session)\n\n    cs2_default = await client.inventory.get(AppContext.CS2)\n    print(\"CS2 items: \", cs2_default.items)\n\n    cs2_trade_protected = await client.inventory.get(AppContext.CS2_PROTECTED)\n    print(\"CS2 items in hold: \", cs2_trade_protected.items)\n\n    # create new App and AppContext\n    BongoCatApp = App(3419430, \"Bongo Cat\")\n    BongoCatDefault = AppContext(BongoCatApp, 2)\n\n    bongo_cat = await client.inventory.get(BongoCatDefault)\n    print(\"Bongo Cat items: \", bongo_cat.items)\n\n    await session.transport.close()\n\n\nasyncio.run(get_inventory())\n```\n\n\u003c!--usage-end--\u003e\n\u003c!--intro-start--\u003e\n\n## Key features ✨\n\n- **Stateful**: Manages user sessions state throughout the lifecycle.\n- **Declarative**: There are models for ~~almost~~ every data.\n- **Typed**: High-end support with extensive typing.\n- **Friendly**: Intuitive and straightforward API.\n- **Flexible**: Custom _HTTP transport_ layer can be implemented to fit user needs.\n- **Asynchronous**: Fully async implementation using `asyncio`.\n\n### What I can do with this\n\n- Login using credentials and QR, obtain auth web cookies.\n- Operate `Trade Offers`: send, accept, decline, and counter.\n- Place and cancel buy/sell orders, purchase listings directly on `Steam Market`.\n- Dump \u0026 Load tokens and cookies to enable `Session` persistence.\n- De/serialize `Client` state reducing boilerplate and unnecessary work.\n- Accept, deny, and retrieve `Steam Mobile Device` confirmations.\n- Enable `Steam Mobile Authenticator` for user account and save secrets.\n- Import secrets from famous `SDA` format (`maFile`).\n- Setup, edit information of user `Steam` profile.\n- Get user account wallet balance, redeem `Wallet` or `Gift` codes.\n- Lost access to a user account by denying guidelines and warnings\n  while being unvigilant.\n- And more!\n\n### What I can't do\n\n- Buy app and their package on `Steam Store`.\n- `WebSocket` connection to `Steam` servers.\n- Interact with game servers (inspect `CS2` items, find game match, etc.).\n- Social interaction like groups, clans, and chat.\n- Get confused with the complexity of usage.\n\n\u003c!--intro-end--\u003e\n\u003c!--footer-start--\u003e\n\n## Contribution 💛\n\n\u003e Feedback, suggestions, and bug reports are welcome!\n\nPlease **keep project style and code quality** while contributing, thanks.\nUse formatter (currently [Ruff](https://github.com/astral-sh/ruff))\nwhenever possible respecting configuration in `pyproject.toml`.\nRemove unrelated code changes from PR and generally be concise, thanks again.\n\n## Credits\n\nSources of inspiration and ideas, concepts, and general knowledge:\n\n- [DoctorMcKay/node-steam-session](https://github.com/DoctorMcKay/node-steam-session)\n- [DoctorMcKay/node-steamcommunity](https://github.com/DoctorMcKay/node-steamcommunity)\n- [dyc3/steamguard-cli](https://github.com/dyc3/steamguard-cli)\n- [SteamRE/SteamKit](https://github.com/SteamRE/SteamKit)\n- [DoctorMcKay/node-steamstore](https://github.com/DoctorMcKay/node-steamstore)\n- [DoctorMcKay/node-steam-totp](https://github.com/DoctorMcKay/node-steam-totp)\n- [SteamTracking/Protobufs](https://github.com/SteamTracking/Protobufs)\n- [Gobot1234/steam.py](https://github.com/Gobot1234/steam.py)\n- [steamapi.xpaw.me](https://steamapi.xpaw.me/)\n- [bukson/steampy](https://github.com/bukson/steampy)\n\n### Helpful links\n\n- [Steam Market id's storage repo](https://github.com/somespecialone/steam-item-name-ids)\n- [Jessecar96/SteamDesktopAuthenticator](https://github.com/Jessecar96/SteamDesktopAuthenticator)\n- [achiez/NebulaAuth-Steam-Desktop-Authenticator](https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies/)\n- [Identifying Steam items](https://dev.doctormckay.com/topic/332-identifying-steam-items/)\n- [CS2 Items Schema](https://github.com/somespecialone/cs2-items-schema)\n\n\u003c!--footer-end--\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomespecialone%2Faiosteampy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsomespecialone%2Faiosteampy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomespecialone%2Faiosteampy/lists"}