An async python wrapper to interact with the Steam API and its CMs

Overview

steam.py

A modern, easy to use, and async ready package to interact with the Steam API. Heavily inspired by discord.py and borrowing functionality from ValvePython/steam.

Supports Version License GitHub issues GitHub stars Discord Documentation Status

Key Features

  • Modern Pythonic API using async/await syntax
  • Command extension to aid with bot creation
  • Easy to use with an object-oriented design
  • Fully typed hinted for faster development

Installation

Python 3.7 or higher is required

To install the library just run either of the following commands:

# Linux/macOS
python3 -m pip install -U steamio
# Windows
py -m pip install -U steamio

Or for the development version.

# Linux/macOS
python3 -m pip install -U "steamio @ git+https://github.com/Gobot1234/steam.py@main"
# Windows
py -m pip install -U "steamio @ git+https://github.com/Gobot1234/steam.py@main"

Quick Example

import steam


class MyClient(steam.Client):
    async def on_ready(self) -> None:
        print("Logged in as", self.user)

    async def on_trade_receive(self, trade: steam.TradeOffer) -> None:
        await trade.partner.send("Thank you for your trade")
        print(f"Received trade: #{trade.id}")
        print("Trade partner is:", trade.partner)
        print("We would send:", len(trade.items_to_send), "items")
        print("We would receive:", len(trade.items_to_receive), "items")

        if trade.is_gift():
            print("Accepting the trade as it is a gift")
            await trade.accept()


client = MyClient()
client.run("username", "password")

Bot Example

from steam.ext import commands

bot = commands.Bot(command_prefix="!")


@bot.command
async def ping(ctx: commands.Context) -> None:
    await ctx.send("Pong!")


bot.run("username", "password")

Links

Comments
  • Sometimes trade events are not triggered

    Sometimes trade events are not triggered

    Summary

    Trade events are not triggered sometimes

    Reproduction Steps

    import json
    import steam
    
    bot = steam.Client(state=steam.PersonaState.Invisible)
    
    @bot.event
    async def on_ready():
        print('Client is ready!')
    
    @bot.event
    async def on_trade_receive(trade: steam.TradeOffer):
        print('New trade offer received')
    
    @bot.event
    async def on_trade_accept(trade: steam.TradeOffer):
        print('Trade offer accepted')
    
    @bot.event
    async def on_trade_decline(trade: steam.TradeOffer):
        print('Trade offer declined')
    
    with open('credentials.json') as f:
        credentials = json.load(f)
    
    bot.run(**credentials)
    

    File "credentials.json" contains valid username, password, secret and shared keys

    Expected Results

    New trade offer received or Trade offer accepted or Trade offer declined

    Actual Results

    Nothing

    System Information

    python version: 3.8.12 steam.py version: 0.8.6 aiohttp version: 3.8.1 betterproto version: 2.0.0b4 operating system info: Windows-10-10.0.19044-SP0

    Checklist

    • [X] I have searched the issues for duplicates.
    • [X] I have shown the entire traceback, if possible.
    • [X] I have removed my username/password/secrets from display, if visible.
    bug 
    opened by lnfecteDru 17
  • Occassionally getting 401s when interacting with the API

    Occassionally getting 401s when interacting with the API

    Summary

    user.send(trade=trade) result in an error

    Reproduction Steps

    1. Fetch a user from steam id 64
    2. Fetch bot inventory
    3. Get item from class_id
    4. Construct a trade from this item and trade token
    5. Send a trade to the user
    6. Decline the trade on the client side
    7. Repeat 2, 3, 4, 5 steps
    8. Got an error 401 Unauthorized image

    Expected Results

    Successfully sent trade offet

    Actual Results

    Error 401

    System Information

    python 3.8 Ubuntu 20 Version of the library 0.8.5

    Checklist

    • [X] I have searched the issues for duplicates.
    • [X] I have shown the entire traceback, if possible.
    • [X] I have removed my username/password/secrets from display, if visible.
    bug no-repro 
    opened by TrixiS 14
  • on_trade_accept

    on_trade_accept

    Summary

    on_trade_accept is not called when partner accepts the trade. So its called only when client accepts the trade and when it accepts some trade, it fires this event for the trade that was accepted by the partner and then for the trade accepted by the client

    Reproduction Steps

    1. Send trade on client side
    2. Accept it on partner side
    3. No on_trade_accept event after partner accept the trade
    4. Send a trade to client from partner side
    5. Accept the trade on client side
    6. See the message about client accepted the trade and the message about partner accepted the previous trade

    Expected Results

    on_trade_accept should be fired when partnter accepts the trade sent by client

    Actual Results

    No on_trade_accept is fired after partner trade accept

    System Information

    Started a steam client using bot.run like in examples

    Checklist

    • [X] I have searched the issues for duplicates.
    • [X] I have shown the entire traceback, if possible.
    • [X] I have removed my username/password/secrets from display, if visible.
    bug 
    opened by TrixiS 11
  • New release

    New release

    Summary

    New release with fixing some bugs

    What is the feature request for?

    The core library

    The Problem

    gateway.send_gc_message and client._handle_ready raises AttributeError when call client.user.inventrory(CSGO)

    The Ideal Solution

    Actually, problem in typos and fxed already, but fix not in release. So creating new release will be good option

    The Current Solution

    No response

    opened by somespecialone 6
  • 500 Server Internal Error on trade send

    500 Server Internal Error on trade send

    Summary

    Sending a trade offer to a user results in an error

    Reproduction Steps

    I have just updated the library to the version of 0.8.5. And now I can't send trades =)

    1. Fetch a user from steam id64 e. g. await client.fetch_user(id)
    2. Create a steam.TradeOffer object from token and an item (I used only one item that was taken from inventory directly) trade_offer = steam.TradeOffer(token=trade_token, items_to_send=[item])
    3. await user.send(trade=trade_offer)
    4. user.send method raises exception
    5. I've tried to send a trade to a non-friend (errors) and then add a partner to the friend list (didn't help me)

    Expected Results

    Successfully sent trade offer as it was in the previous versions of the library

    Actual Results

    Exception

    System Information

    Python 3.8 Library version 0.8.5 (from github)

    Checklist

    • [X] I have searched the issues for duplicates.
    • [X] I have shown the entire traceback, if possible.
    • [X] I have removed my username/password/secrets from display, if visible.
    invalid 
    opened by TrixiS 6
  • [docs] Update the docs and some workflows

    [docs] Update the docs and some workflows

    Summary

    Testing some stuff

    Checklist

    • [ ] If code changes were made then they have been tested.
      • [ ] I have updated the documentation to reflect the changes.
    • [ ] This PR fixes an issue.
    • [ ] This PR adds something new (e.g. new method or parameters).
    • [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
    • [x] This PR is not a code change (e.g. documentation, README, ...)
    opened by Gobot1234 4
  • Looking to decrypt encrypted application tickets

    Looking to decrypt encrypted application tickets

    Hi,

    I'm looking for help decrypting encrypted application tickets.

    Using ValvePython's Steam library (pip install steam)

    ` data = "CAEQ8IrOxw0YBCA+KnAsX1ZReXWSFz1IHPQ6sBSTBK3hj2co79vrystWUrqUyOz9ueLpMy59R0WAirzid93gVGyT7wb3Ptwmdtqhb+UtqIupxHQ7n5k6HCCAh4Us3jC3a64hhJ9XjEEzorxzciVbSgQmMASYBGCtBjRV7f1R" data = base64.b64decode(data) keyx = key.encode() decrypted_data = crypto.symmetric_decrypt(crypto.pad(data), keyx)

    import struct
    s = struct.unpack_from("IIQIIIINNhIhhhxx", decrypted_data[:64])`
    

    I wonder if your library can accomplish it instead as I've hit a wall using Py Steam, probably have the struct all wrong. How can I contact you by the way? Do you do consultations?

    invalid 
    opened by ryan1336 4
  • Fix to 'Make steam.utils.parse_trade_url return a rich object'

    Fix to 'Make steam.utils.parse_trade_url return a rich object'

    …Tuple'

    Summary

    A Fix to 'Make steam.utils.parse_trade_url return a proper Tuple

    Checklist

    • [x] If code changes were made then they have been tested.
      • [x] I have updated the documentation to reflect the changes. (Needs to be checked)
    • [x] This PR fixes an issue.
    • [ ] This PR adds something new (e.g. new method or parameters).
    • [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed)
    • [ ] This PR is not a code change (e.g. documentation, README, ...)
    opened by ibn-icena 3
  • Bump sphinx from 3.4.3 to 3.5.0

    Bump sphinx from 3.4.3 to 3.5.0

    Bumps sphinx from 3.4.3 to 3.5.0.

    Changelog

    Sourced from sphinx's changelog.

    Release 3.5.0 (released Feb 14, 2021)

    Dependencies

    • LaTeX: multicol (it is anyhow a required part of the official latex2e base distribution)

    Incompatible changes

    • Update Underscore.js to 1.12.0
    • #6550: html: The config variable html_add_permalinks is replaced by :confval:html_permalinks and :confval:html_permalinks_icon

    Deprecated

    • pending_xref node for viewcode extension
    • sphinx.builders.linkcheck.CheckExternalLinksBuilder.anchors_ignore
    • sphinx.builders.linkcheck.CheckExternalLinksBuilder.auth
    • sphinx.builders.linkcheck.CheckExternalLinksBuilder.broken
    • sphinx.builders.linkcheck.CheckExternalLinksBuilder.good
    • sphinx.builders.linkcheck.CheckExternalLinksBuilder.redirected
    • sphinx.builders.linkcheck.CheckExternalLinksBuilder.rqueue
    • sphinx.builders.linkcheck.CheckExternalLinksBuilder.to_ignore
    • sphinx.builders.linkcheck.CheckExternalLinksBuilder.workers
    • sphinx.builders.linkcheck.CheckExternalLinksBuilder.wqueue
    • sphinx.builders.linkcheck.node_line_or_0()
    • sphinx.ext.autodoc.AttributeDocumenter.isinstanceattribute()
    • sphinx.ext.autodoc.directive.DocumenterBridge.reporter
    • sphinx.ext.autodoc.importer.get_module_members()
    • sphinx.ext.autosummary.generate._simple_info()
    • sphinx.ext.autosummary.generate._simple_warn()
    • sphinx.writers.html.HTMLTranslator.permalink_text
    • sphinx.writers.html5.HTML5Translator.permalink_text

    Features added

    • #8022: autodoc: autodata and autoattribute directives does not show right-hand value of the variable if docstring contains :meta hide-value: in info-field-list
    • #8514: autodoc: Default values of overloaded functions are taken from actual implementation if they're ellipsis
    • #8775: autodoc: Support type union operator (PEP-604) in Python 3.10 or above
    • #8297: autodoc: Allow to extend :confval:autodoc_default_options via directive options
    • #8619: html: kbd role generates customizable HTML tags for compound keys

    ... (truncated)

    Commits
    • 32dad69 Bump to 3.5.0 final
    • ae16211 Update CHANGES for PR #8867
    • 52b5509 Merge pull request #8867 from mitya57/update-stemmer-js
    • a148909 Merge pull request #8877 from jfbu/latex_better_fix_8838
    • bb81973 language_data.js_t: Move endif to the right place
    • 34553dc Embed stemmer code into language_data.js by reading it from minified-js files
    • 5abbb40 Remove old minified versions of JS code, embedded in Python files
    • 4ad6dd7 Add minified versions of libstemmer JS files
    • d9bf73d Update non-minified-js to the latest version from snowball v2.1.0
    • be6391f Merge pull request #8876 from jakobandersen/c_cpp_alias
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
    • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

    Additionally, you can set the following in your Dependabot dashboard:

    • Update frequency (including time of day and day of week)
    • Pull request limits (per update run and/or open at any time)
    • Out-of-range updates (receive only lockfile updates, if desired)
    • Security updates (receive only security updates, if desired)
    dependencies 
    opened by dependabot-preview[bot] 3
  • Implement more of the API

    Implement more of the API

    The Problem

    Currently there are large feature sets still to implement, this is somewhat in order:

    • [x] Clans (everything after getAllGroupAnnouncements).
    • [ ] User profiles (everything after postProfileStatus).
    • [ ] Invites in chats.
    • [x] Roles and Permissions.

    The Ideal Solution

    It would be nice to see these implemented at some point, I have a few ideas for some of them mainly the Clan and User posts API but these should be discussed in the discord guild.

    Summary

    I am now much happier to see feature implementation PRs as things are finally at a point where the library is stable. I also plan to add more of these as I find them. I should be work on these at some point but they will be going on the back burner for now.

    enhancement help wanted 
    opened by Gobot1234 3
  • Implement anonymous login

    Implement anonymous login

    Summary

    Anonymous login for the steam client commands that support it

    What is the feature request for?

    The core library

    The Problem

    Some commands like fetch_product_info don't really require login. As it is currently in this library, those functions don't work if you don't login

    The Ideal Solution

    Either make the methods work without login or add an anonymous_login() function like in the other steam libs

    The Current Solution

    No response

    enhancement 
    opened by Polsaker 2
  • Implement Game Coordinator Clients

    Implement Game Coordinator Clients

    The Problem

    Currently there is no way to interact with the Game Coordinator (GC).

    The Ideal Solution

    At the moment there are extensions being worked on to allow for this these include:

    • [x] https://github.com/Gobot1234/steam-ext-tf2
    • [ ] https://github.com/Gobot1234/steam-ext-dota2
    • [x] https://github.com/Gobot1234/steam-ext-csgo

    These will allow for communication between the GC and the client, they will likely be bundled with the main repo at some point, however before they can be released I will need to improve https://github.com/Gobot1234/vdf3 and the APIs will need to be more refined.

    The implementations for these modules will be loosely based off of:

    • https://github.com/DoctorMcKay/node-tf2
    • https://github.com/ValvePython/dota2 & https://github.com/Arcana/node-dota2
    • https://github.com/ValvePython/csgo & https://github.com/DoctorMcKay/node-globaloffensive

    Summary

    Implement GC connection. This should hopefully be done in a few weeks at least for the tf2 extension, the others some time after that.

    enhancement 
    opened by Gobot1234 4
Releases(V.0.9.6)
  • V.0.9.6(Dec 25, 2022)

    Version 0.9.6 Changelog:

    Features:

    • Backport trade confirmation code from the main branch.

    Full Changelog: https://github.com/Gobot1234/steam.py/compare/V.0.9.5...V.0.9.6

    Source code(tar.gz)
    Source code(zip)
  • V.0.9.5(Nov 14, 2022)

    Version 0.9.5 Changelog:

    Bug Fixes:

    • Fix more missing slots for non-premium accounts

    Full Changelog: https://github.com/Gobot1234/steam.py/compare/V.0.9.4...V.0.9.5

    Source code(tar.gz)
    Source code(zip)
  • V0.9.4(Nov 13, 2022)

    Version 0.9.4 Changelog:

    Bug Fixes:

    • Fix missing slots for non-premium accounts
    • Paginate inventory fetching into chunks of 2000

    Full Changelog: https://github.com/Gobot1234/steam.py/compare/V.0.9.3...V.0.9.4

    Source code(tar.gz)
    Source code(zip)
  • V0.9.3(Oct 21, 2022)

    Version 0.9.3 Changelog:

    Bug Fixes:

    • Fix AssertionError when generating confirmation codes.

    Full Changelog: https://github.com/Gobot1234/steam.py/compare/V.0.9.2...V.0.9.3

    Source code(tar.gz)
    Source code(zip)
  • V.0.9.2(Oct 10, 2022)

    Version 0.9.2 Changelog:

    Bug Fixes:

    • Fix TypeError in Client.login when [transfer_parameters][steamid] wasn't an int for non-premium accounts.

    Full Changelog: https://github.com/Gobot1234/steam.py/compare/V.0.9.1...V.0.9.2

    Source code(tar.gz)
    Source code(zip)
  • V.0.9.1(Sep 17, 2022)

    Version 0.9.1 Changelog:

    Bug Fixes:

    • Fix TypeError in Client.fetch_trade #134

    Full Changelog: https://github.com/Gobot1234/steam.py/compare/V.0.9.0...V.0.9.1

    Source code(tar.gz)
    Source code(zip)
  • V.0.9.0(Aug 11, 2022)

    Version 0.9.0 Changelog:

    A new version; 0.9.0 has been pushed to PyPi, thank you everyone for your patience with this release. https://steam-py.github.io/docs/V.0.9.0/api

    Changes

    • Implement ChatGroups, saving a lot of duplication between Clan and Group. This allowed me to implement a members list, and better chat handling and will allow future features like create_channel and invites.
    • Implement Friends. on_friend_add & on_friend_remove.
    • Implement Reviews. StatefulGame.reviews(), User.reviews(), User.fetch_review(s)()
    • Implement Manifests,ManifestInfo, ManifestPath, Branch, Depot, GameInfo and PackageInfo.
    • Implement Package, StatefulPackage, FetchedPackage, License, StatefulGame.packages().
    • Implement Awards, Emoticons and Stickers and ways to add reactions to messages.
    • Implement PublishedFiles, fetched using Client.fetch_published_file(...), BaseUser.published_files or StatefulGame.published_files().
    • Implement ProfileShowcases, fetched using BaseUser.profile_customisation_info().
    • Implement a speedups group for the library to unsurprisingly speed up the library a little bit. Install with pip install -U "steamio[speedups]".
    • Implement support for fetching objects in different languages.
    • Implement DLC and StatefulGame.dlc().
    • Various other StatefulGame methods.
    • Fix BaseUser.games() KeyErroring after steam removed logo_url and add last_played_at.
    • Add BaseUser.rich_presence.
    • Add the rest of the members to InstanceFlag and unify ChatInstanceFlag and InstanceFlag.
    • Implement Query.region.
    • Improve error message when sent & received items are the wrong way round.
    • Use tomllib if it's present.
    • Make polling trades much less intensive for high throughput bots.
    • Implement TradeOffer.url and Asset.url.
    • Make UserBadges a Sequence subclass.
    • Implement User.profile_customisation_info().
    • Add a default list of CMs for when the web API is down but WS still works.
    • Implement __eq__ & __hash__ for Asset, Message and Game.
    • Rewrite Client.trade_history() to not be broken and to construct MovedItems as the items_to_send/receive.

    Bug Fixes

    • Fix items not being included in trades.
    • Fx TradeOffer.cancel & decline API methods being removed
    • Fix Clan.mods & admins being empty.
    • Fix trade polling for multiple different instances of Client.
    • Fix Game.name being None even if the app id was in the known values.
    • Fix memory leaks with the user cache.
    • Fix various trade offer bugs.
    • Fix KeyErrors on potentially missing keys in BaseEvent.__init__.
    • Add a lock to confirmations to make sure we never exceed 1 confirmation type a second.
    • Rewrite AsyncIterator to be an async iterator.
    • Fix various __slots__ around the library.

    Deprecations

    • Deprecated Asset.asset_id, use Asset.id instead (same goes for MovedItem.new_asset_id, use MovedItem.new_id).
    • Deprecated Inventory.get_item, use utils.get instead.
    • Deprecated Inventory.filter_items use a list comprehension instead.

    Breaking Changes

    • ClientUser.friends is now a coroutine function, the underlying implementation here hasn't changed, I just wanted to have compatibility with User.friends, you can also use ClientUser.get_friend if you want to get a Friend by ID64.
    • Use UTC-aware datetimes everywhere.
    • Rename Event attributes and parameters to be more consistent.
    • Rename TradeOfferReceiptItem to MovedItem.
    • Asset.__eq__ only takes the id and game into account when comparing instances.
    • TradeOffer.__eq__ works for trades that aren't yet sent by comparing items_to_send and items_to_recieve.
    • Renamed FetchedGame.dlc & GameInfo.dlc to partial_dlc.
    • Make Client.fetch_servers limit keyword-only .

    Contributions

    • Add Item.owner_descriptions by @markov-avl in https://github.com/Gobot1234/steam.py/pull/108
    • Fix _cancel_user_trade() not passing sessionid by @hashdashme in https://github.com/Gobot1234/steam.py/pull/114
    • Fix NameError with JSON_DUMPS by @ibn-icena in https://github.com/Gobot1234/steam.py/pull/119
    • Get the small icon URL instead of None in Item by @pstryczke in https://github.com/Gobot1234/steam.py/pull/122
    • Fix trades_last_fetched occasionally being incorrect by @lnfecteDru in https://github.com/Gobot1234/steam.py/commit/8c587975f4fc1b80417a7696e7eaddc0ccffa5ed
    • Fix various documentation issues by @ibn-icena https://github.com/Gobot1234/steam.py/commit/5477ecfbc8b70a4f783907854ef7975ebc81cb8c

    Full Changelog: https://github.com/Gobot1234/steam.py/compare/0.8.9...V.0.9.0

    Thank you to all the contributors who helped with this release :)

    The next full version will be V1 the full list of features I'm planning to release is here, https://github.com/users/Gobot1234/projects/3, contributions implementing these features are very welcome. Feel free to ping me in the Discord server if you want any help or want a bit of extra clarification, although, there may be a bit more info than GitHub initially lets on (try clicking on it).

    Source code(tar.gz)
    Source code(zip)
  • V.0.8.9(May 12, 2022)

    Version 0.8.9 Changelog:

    Bug Fixes:

    • Make an API call when creating announcements and events.
    • Fix TradeOffer.cancel/decline API methods being removed. (Thanks Steam)

    Full Changelog: https://github.com/Gobot1234/steam.py/compare/V.0.8.8...V.0.8.9

    Source code(tar.gz)
    Source code(zip)
  • V.0.8.8(Mar 15, 2022)

    Version 0.8.8 Changelog:

    Bug Fixes:

    • Fix AttributeError when accesing weakref.WeakValueDict.
    • Fix StatefulGame.friends_who_own() to not raise.
    Source code(tar.gz)
    Source code(zip)
  • V.0.8.7(Mar 15, 2022)

    Version 0.8.7 Changelog:

    Bug Fixes:

    • Fix memory leaks when Users aren't evicted from internal user cache.
    • Fix trade events not being triggered as the trade notification was the same as the previous.
    Source code(tar.gz)
    Source code(zip)
  • V.0.8.6(Jan 27, 2022)

  • V.0.8.5(Dec 27, 2021)

  • V.0.8.4(Dec 25, 2021)

    Version 0.8.4 Change log:

    Changes

    • Add TradeOffer.receipt().
    • Add Asset.owner.
    • Make Asset.game a StatefulGame and a cached_slot_property so that it's lazily evaluated.
    • Add Item.action.
    • Make Inventory a TypeAlias so that a type hierarchy for extension modules' Backpacks are able to be subclasses of Inventory.

    Bug Fixes

    • Trading is much more stable.
      • Fix potential KeyErrors when polling trades.
      • Fix a ValueError when trying to remove a trade that somehow wasn't in the trade queue.
      • Fix an issue where on_trade_accept wasn't dispatched.

    Contributions

    • Add action attr to Item @SomeSpecialOne in https://github.com/Gobot1234/steam.py/pull/86
    Source code(tar.gz)
    Source code(zip)
  • V.0.8.3(Nov 15, 2021)

    Version 0.8.3 Change log:

    Changes

    • Bump dependencies.

    Bug fixes

    • Fix TradeOffer.partner always being a SteamID.
    • Fix trades that are confirmed before we are ready raising an AttributeError.
    Source code(tar.gz)
    Source code(zip)
  • V.0.8.2(Oct 25, 2021)

    Version 0.8.2 Change log:

    Changes

    • Speed up login for people who pass a shared_secret to Client.login.
    • Implement Commentable.fetch_comment.

    Bug fixes

    • Fix ClanInvite.accept/decline.
    • Properly fix the sending of Images.
    Source code(tar.gz)
    Source code(zip)
  • V.0.8.1(Oct 17, 2021)

  • V.0.8.0(Oct 17, 2021)

    Version 0.8.0 Change log:

    https://steam-py.github.io/docs/V.0.8.0/api

    Changes

    • Trade improvements:
      • Trades after being sent should be fully resolved and you can avoid calling Client.wait_for to get the info on them.
      • Trades should be polled less frequently.
    • Commentable improvements:
      • Posting and fetching comments is now done using the websocket.
      • Events and Announcements have been implemented which are both commentable. You can get them using Clan.fetch_event/announcement(), Clan.create_event/announcement() and Clan.events/announcements().
      • You can now fetch comments with the oldest comments first.
    • Groups now have statically accessible members.
    • Groups and Clans now have static access to their respective channels.
    • StatefulGame provides a general way to request info about a game, you can construct one using Client.get_game(). As all the old Games with state subclass this, this has added some new methods: game.clan(), game.fetch(), game.player_count() and game.friends_who_own() see the documentation for what these do https://steam-py.github.io/docs/latest/api/#steam.game.StatefulGame
    • User.profile() functions.
    • User.primary_clan is now awaitable to get extra info on the clan.
    • Logging in should be faster thanks to transferring cookies without making requests (#68)
    • enums.Flags are now used to remove PersonaFlags.components among other things.
    • Reconnection to CMs are now throttled appropriately along with automatically reconnecting if the CM doesn't respond within 60 seconds.
    • Lots of new/newly documented events for user/group/clan updates and invites.

    Breaking changes

    • The flag argument to both Client.__init__ and Client.change_presence has been removed.
    • Remove the argument active_only from Client.trade_history as if you need only active trades find them in Client.trades.

    Depreciations

    • Depreciated Clan.icon_url and Clan.description in favour of Clan.avatar_url and Clan.content.

    Documentation

    Documentation has been updated to a new URL (https://steam-py.github.io/docs/latest/api), it also uses discord.py's attributetable domain, a to top button, more correct types and is now easier for new people to contribute to as some files are in the more beginner friendly markdown file type.

    Bug Fixes

    • Make the error message parser handle more situations.
    • Concurrent calls to ClientUser.inventory() would raise a HTTPException, this has been fixed using a lock.
    • Fix trade state updates (#72).
    • Cogs listener's not being removed after being ejected.
    • Fix AttributeError: 'HTTPException' object has no attribute 'message' occasionally happening

    Contributions

    • Fix trade offers and cancellation by @smtp639 in https://github.com/Gobot1234/steam.py/pull/62
    • Transfer cookies without making requests by @Hexiro in https://github.com/Gobot1234/steam.py/pull/68
    • Fix send() trade by @hashdashme in https://github.com/Gobot1234/steam.py/pull/72
    • Update readme documentation link by @Art-em1s in https://github.com/Gobot1234/steam.py/pull/75

    Thank you to everyone who contributed to this version :)

    Full Changelog: https://github.com/Gobot1234/steam.py/compare/0.7.0...V.0.8.0

    Source code(tar.gz)
    Source code(zip)
  • V.0.7.2(Jul 13, 2021)

  • V.0.7.1(Jun 25, 2021)

  • V.0.7.0(Jun 21, 2021)

    Version 0.7.0 Change log:

    Changes

    • Add 3 new Game subclasses (removed Game.total_play_time Game.icon_url etc., these are still available for User.games, it just returns one of the new subclasses) for type checking purposes.
    • Add Client.fetch_game.
    • Add User.wishlist.
    • Add Game.url.
    • Switch to poetry for development.
    • Allow sent trades to be cancelled after being sent using the original trade object.
    • Change some types of Command attributes:
      • Command.clean_params -> dict
      • Command.parents -> list
      • GroupMixin.children -> list
    • Update protobufs.
    • Add ReviewType enum.
    • Add hooks for gc_message_send/receive
    • Make Messageable.send return the sent message.
    • Rename GroupCommand -> Group.
    • Remove support for type hints in if TYPE_CHECKING blocks for Command signatures.
    • Implement GameServers (#46).
    • Make trade polling much less intensive.
    • Make ClientUser.edit less liable to break.
    • Remove AsyncIterator.__await__.
    • Make the set statuses/ui_mode in Client.__init__ be kept on reconnect.
    • Update utils.contains_bbcode list.
    • Support non-zero seeked Images.

    Bug Fixes:

    • Make Client.trade_history make less requests.
    • Make SteamID.from_url a staticmethod.
    • Make steam.__main__ use module's __version__ attributes.
    • Add default limit to Inventory.filter_items (None).
    • Fix a potential couple of regex bugs.
    • Fix a few attribute errors, and trade offer issues (#62).

    Deprecations

    • E prefixed enums, e.g. EResult -> Result or EType -> Type. (The old ones still work for now.)
    Source code(tar.gz)
    Source code(zip)
  • V.0.6.2(Jan 31, 2021)

  • V.0.6.1(Dec 31, 2020)

    Version 0.6.1 Change log:

    Changes

    • Simplify Enum creation slightly.
    • Simplify Inventory updating/parsing.

    Bug Fixes:

    • Fix for UserConverter's mention parsing in DMs.
    • Fix for an UnboundLocalError in Command.invoke.
    Source code(tar.gz)
    Source code(zip)
  • V.0.6.0(Dec 24, 2020)

    V.0.6.0 Change log:

    Changes

    • Add support for non-premium steam accounts with a more limited feature set, this will however log a warning and is done automatically if no API key can be generated.
    • Parse a message's clean_content for commands. Makes things a lot easier to understand and parse.
    • Implement Channel.history and Context.history.
    • Implement Message.mentions.
    • Check GroupCommand's clean_params at runtime.
    • Move Bot.invoke's heavy processing for GroupCommands to its invoke method.
    • Add GroupMixin.all_commands.
    • Typing improvements.
    • Select best CMs even if they're not in your current cell id.
    • steam.Game takes only keyword arguments.
    • Bump betterproto dependency to 2.0.0b2 fixes a lot of bugs and issues when decoding messages.
    • Update ext.commands.help.__all__ to include DefaultHelpCommand.
    • Don't make Inventory.filter/get_items remove the item from the inventory.
    • Make TradeOffer.escrow a timedelta.
    • Type hint all examples.
    • Add proxy support for requests.

    Bug Fixes:

    • Fix for Cog.command_attrs and GroupCommands.
    • Fixes for empty Bot command_prefixes.
    • Fixes for Commands with decorator methods in Cogs.
    • Command.can_run no longer interferes with cooldowns.
    • Handle ConnectionResetError in SteamWebSocket.send
    • Fix bug with Inventory.filter_items and limits.
    • Fix a bug with __future__.annotations and commands.Greedy
    • Fix a lot of bugs for GC extension modules.

    Merry Christmas 🎄 .

    Source code(tar.gz)
    Source code(zip)
  • V.0.5.2(Nov 1, 2020)

    V.0.5.2 Change log:

    Bug fix patch.

    Changes

    • Updates for ext-tf2 with steam.protobufs.GCMsg and steam.protobufs.GCMsgProto.
    • Add support for a typing.Literal converter.
    • Add support for using URLs with commands.ClanConverter and commands.UserConverter
    • Make DMChannel.typing a contextlib.asynccontextmanager, rather than a separate class.
    • Bump aiohttp version to allow for 3.7.
    • Flatten and recursively commands.Greedys.
    • Runtime checking of whether a command's parameters are valid.

    Bug Fixes:

    • HTTPClient.accept_user_trade ValueError fix.
    • Confirmation AttributeError fixes.
    • Client.change_presence with games fix.
    • Commentable.copy fix.
    • Patch asyncio.run to use asyncio.get_event_loop to stop Client.wait_until_ready being broken.
    • Reverse the CMServerList.queueto give better servers.
    • Make a commands.Command have Cog.command_attrs set when subclassed rather than when injected.
    • Disallow people from accessing other steam.Clan's/steam.Group's channels inside of commands.ChannelConverter
    Source code(tar.gz)
    Source code(zip)
  • V.0.5.1(Oct 22, 2020)

    V.0.5.1 Change log:

    Bug fix patches.

    Bug Fixes

    • Add in the missing bot param for callable commands.Bot.command_prefixes.
    • Make steam.Clan's created_at attribute more lenient for other date formats.
    • Fix commands.Cooldown to work in concurrent environments.
    • Fix an undetected command parsing bug when too many arguments are passed.
    Source code(tar.gz)
    Source code(zip)
  • V.0.5.0(Oct 16, 2020)

    V.0.5.0 Change log:

    Changes

    • Rework command parsing to be more resilient and invocation simpler.
    • Make some decorators potentially callable e.g. steam.Client.event and commands.command, these are marked with |maybecallabledeco| in their documentation.
    • Implement commands.Cog.__repr__ as <Cog 'filename.class_name'>
    • Rework how passing **kwargs to a command's signature works to be more inline with normal functions. This will also raise a custom error when a duplicate keyword argument or unmatched key value pairs are parsed.
    • Implement commands.Context.invoke to handle invocation of a context's command.
    • Implement Context.invoked_without_command properly.
    • Make Game.total_play_time a datetime.timedelta.
    • Rename commands.HelpCommand to commands.DefaultHelpCommand, HelpCommand is now an abc which is meant to be subclassed for special behaviour.
    • Implement commands.Cog.listeners.
    • Implement more checks as well as before and after hooks.

    commands.Converters changes

    commands.Converter has been reworked to be better for type checkers and generally a better API by making Converter generic:

    class MyConverter(commands.Converter[MyType]):  # the type to register
    	async def convert(self, ctx: commands.Context, argument: str) -> MyType:	
    		... # do some processing
    		return MyType(my_variable)
    
    @bot.command
    async def my_command(
    	ctx: commands.Context, my_type: MyType  # this then calls `MyConverter` when invoked
    ) -> None:
    	await ctx.send(f"That is one cool {my_type}")
    

    The main reason behind this change was to make this easier for type checkers as you don't have to use converters as the type-hint, this allows for similar behaviour to the builtin types like steam.User or steam.Clan.

    • Implement commands.converter_for as the recommended to mark a function as a converter for a certain type.
    • Implement commands.Converter.register as a way to mark a converter as a local converter for a command.
    • Implement commands.Bot.converters as a way read-only mapping of the currently loaded converters.

    Depreciations The following are scheduled for removal in V.1:

    • Client ignores the loop argument passed and the loop used for the bot is now fetched in steam.Client.start to allow for all of the event loop to be handled by asyncio.run.
    • Subclassing commands.Convertersnon-generically.

    Bug Fixes

    • Make consume rest arguments read the rest of the string.
    Source code(tar.gz)
    Source code(zip)
  • V.0.4.2(Sep 20, 2020)

    V.0.4.2 Change log:

    Hot fix Patch. Bug fixes

    • Confirmations being broken and add __slots__.
    • Allow Bot.reload_extension to take a pathlib.Path
    Source code(tar.gz)
    Source code(zip)
  • 0.4.1(Sep 19, 2020)

    V.0.4.1 Change log:

    Changes

    • Use __future__.annotations along with built in generics over typings as they are going to be deprecated past Python 3.9.
    • Shlex improvements along with some basic tests.
    • Enum creation speedups and register members to the actual class.
    • Add abc.Commentable to handle all User/Clan.comments and User/Clan.comment along with a comment_path attribute which holds either "Profile" or "Clan".
    • Remove enums.pyi using some TYPE_CHECKING magic (https://github.com/Gobot1234/steam.py/blob/cde4f8032571c8f88b460b6c1f450f3195dc7684/steam/enums.py#L171-L183).
    • Make it so we don't have to detect which events are loaded at runtime.
    • Add support for Bot.load/unload_extension to take pathlib.Paths. However this is only relative to the current working directory otherwise you'll have to provide the path yourself.
    • Add back Game.__eq__ and make it comparable to ints and other Game instances.
    • Add Cog.commands which is similar to Bot.commands.

    Bug Fixes:

    • Game.__init__ fixes for overloaded arguments and then .
    • Passing command_attrs to a cog being broken/not working as expected.
    • GroupCommand parsing being broken.
    • Fix commands.Greedy not working with strings.
    Source code(tar.gz)
    Source code(zip)
  • V.0.4.0(Sep 6, 2020)

    V.0.4.0 Change log:

    This one has been in the oven for quite some time compared to other releases so hopefully should be of a higher quality.

    Changes

    • Better commands support (more like discord.py's).
      • comands.Greedy, typing.Optional/Union support.
    • TradeOffer.id's are updated after they are sent.
    • Reworks to SteamID and make_id64
    • Implement user_invite_accept/clan_invite_accept.
    • Remove events at when Client/Bot.__init__ is called.
    • Game.app_id renamed to Game.id.
    • Rework utils.parse_trade_token_url to parse_trade_url.
    • Improve typings:
      • enums.pyi and py.typed are sent to pip installed copies of the lib.
      • Add more typings to more functions.
    • Do ABCs better.
    • Context only now takes **attrs
    • commands.Converter/commands.Default now are decorated with @typing.runtime_checkable and convert/default have been implemented as abstract methods.
    • Added commands.utils to house utils functions for ext.commands.
    • Added backports of:
      • functools.cached_property
      • asyncio.to_thread
    • Added utils.async_property
    • Removed logging, NamedTuple and VersionInfo from steam..
    • User.flagsis now a list of resolved flags using EPersonaStateFlag.components.
    • Flesh out the group API a bit more.
    • Inventory.filter_items can now take a list of names to filter.

    Bug Fixes:

    • Cog bug fixes when reload_extension is called.
    • Fix ChannelConverter.
    • Probably a lot more.

    GitHub Stuff

    • I've added https://restyled.io to reformat incorrectly formatted PRs to make developing features for the library for newer users.
    • Reworked requirements into a separate folder, default.txt is now where any normal requirements are.
    • Added dependabot.
    Source code(tar.gz)
    Source code(zip)
  • V.0.3.3(Jul 25, 2020)

    V.0.3.3 changelog

    Changes

    • Presences can be set on connect by passing the same arguments as Client.change_presence.
    • Bot listeners are correctly dispatched in subclasses and un-subclassed events are removed at run time.
    • Bot.help_command has a setter where re-registration can be handled.
    • Renamed ext/commands/command -> commands.
    • Game objects can be compared to ints using their app_id
    • Add a backport of asyncio.to_thread.
    • Bot.commands is now a set.
    • Bot listeners are now shown as dispatched in logs.

    Bug Fixes:

    • Email auth logging in issues.
    • Changing your status would cause the bot to reconnect and not change your status.
    Source code(tar.gz)
    Source code(zip)
Async ready API wrapper for Revolt API written in Python.

Mutiny Async ready API wrapper for Revolt API written in Python. Installation Python 3.9 or higher is required To install the library, you can just ru

null 16 Mar 29, 2022
YARSAW is an Async Python API Wrapper for the Random Stuff API.

Yet Another Random Stuff API Wrapper - YARSAW YARSAW is an Async Python API Wrapper for the Random Stuff API. This module makes it simpler for you to

Bruce 6 Mar 27, 2022
Discord bot to monitor collection of mods on the Steam Workshop and notify on update to selected discord server via Nextcordbot API.

Steam-Workshop-Monitor Discord bot to monitor collection of mods on the Steam Workshop and notify on update to selected Discord channel via Nextcordbo

null 7 Nov 3, 2022
Mixcloud API wrapper for Python and Async IO

aiomixcloud Mixcloud API wrapper for Python and Async IO aiomixcloud is a wrapper library for the HTTP API of Mixcloud. It supports asynchronous opera

Aristotelis Mikropoulos 26 Dec 31, 2022
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.

A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using async and await

Senpai Development 4 Nov 5, 2021
A modern,feature-rich, and async ready API wrapper for Discord written in Python

discord.io A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using asyn

Vincent 18 Jan 2, 2023
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.

disfork A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using async a

null 2 Feb 9, 2022
A modern, easy to use, feature-rich, and async ready API wrapper improved and revived from original discord.py.

A Python API wrapper that is improved and revived from the original discord.py

Orion 19 Nov 6, 2021
An async-ready Python wrapper around FerrisChat's API.

FerrisWheel An async-ready Python wrapper around FerrisChat's API. Installation Instructions Linux: $ python3.9 -m pip install -U ferriswheel Python 3

FerrisChat 8 Feb 8, 2022
This is a simple unofficial async Api-wrapper for tio.run

Async-Tio This is a simple unofficial async Api-wrapper for tio.run

Tom-the-Bomb 7 Oct 28, 2022
Python script to extract all Humble Bundle keys and redeem them on Steam automagically.

humble-steam-key-redeemer Python script to extract all Humble keys and redeem them on Steam automagically. This is primarily designed to be a set-it-a

null 74 Jan 8, 2023
An simple python script for remove rockstar account for fivem, very useful for cheating or change account for unban from an server, remember change steam account.

This tool is used for be unbanned from servers, u need disconnect the discord, use other steam account and uninstall xbox for be unbanned 100%, it only work for unban in server, not global

MiguDEV 4 Oct 10, 2022
A Discord bot to combat phishing links for Steam trades and Discord gifts.

delink-bot A Discord bot to combat phishing links for Steam trades and Discord gifts. Requirement python3 -m pip install -U discord.py python3 -m pip

hugonun 15 Dec 9, 2022
Zaid Vc Player Allows u to steam Songs/music on vc chat

ᴢᴀɪᴅ ᴠᴄ ᴘʟᴀʏᴇʀ ?? SORRY FOR OUR PROJECTS DELETED BY GITHUB FLAGGED ᴢᴀɪᴅ ᴠᴄ ᴘʟᴀᴇʀ ɪꜱ ᴀ ᴛᴇʟᴇɢʀᴀᴍ ᴘʀᴏᴊᴇᴄᴛ ʙᴀꜱᴇᴅ ᴏɴ ᴘʏʀᴏɢʀᴀᴍ ꜰᴏʀ ᴘʟᴀʏ ᴍᴜꜱɪᴄꜱ ɪɴ ᴠᴄ ᴄʜᴀᴛꜱ..

Zaid 117 Dec 29, 2022
🚀 An asynchronous python API wrapper meant to replace discord.py - Snappy discord api wrapper written with aiohttp & websockets

Pincer An asynchronous python API wrapper meant to replace discord.py ❗ The package is currently within the planning phase ?? Links |Join the discord

Pincer 125 Dec 26, 2022
Async wrapper over hentaichan.live

hentai-chan-api-async is a small asynchronous parser library that will allow you to easily use manga from https://hentaichan.live Recommended to use python3.7+

null 7 Dec 15, 2022
Python API to interact with Uwazi

Python Uwazi API Quick Start To use the API install the requirements pip3 install -r requirements.txt and use it like this: uwazi_adapter = UwaziAdap

HURIDOCS 2 Dec 16, 2021
A python library to interact with the EarnApp API

EarnApp.py Table of contents General info Documentation Setup General info A python library to interact with the EarnApp API. Documentation First, imp

null 3 Dec 14, 2022
A small bot to interact with the reddit API. Get top viewers and update the sidebar widget.

LiveStream_Reddit_Bot Get top twitch and facebook stream viewers for a game and update the sidebar widget and old reddit sidebar to show your communit

Tristan Wise 1 Nov 21, 2021