Skip to main content

A Python wrapper for the Steam API

Project description

steam.py

A modern, easy to use, and async ready package to interact with the Steam API. Heavily inspired by discord.py.

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.10 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(self, trade: steam.TradeOffer) -> None:
        if not trade.is_our_offer():
            await trade.user.send("Thank you for your trade")
            print(f"Received trade: #{trade.id}")
            print("Trade partner is:", trade.user)
            print("We would send:", len(trade.sending), "items")
            print("We would receive:", len(trade.receiving), "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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

steamio-1.1.3.tar.gz (361.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

steamio-1.1.3-cp312-cp312-macosx_15_0_arm64.whl (420.1 kB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

File details

Details for the file steamio-1.1.3.tar.gz.

File metadata

  • Download URL: steamio-1.1.3.tar.gz
  • Upload date:
  • Size: 361.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.2 Darwin/24.4.0

File hashes

Hashes for steamio-1.1.3.tar.gz
Algorithm Hash digest
SHA256 ff453ede7d3a8a7030425abe6c357ac72c6a50a054aad7eec0b6fabad1428db9
MD5 cf2b8d05a2c6968bf41e6f492567acff
BLAKE2b-256 1e867dd27641f921d4a71dd96c1ce122da95fa02af79f9947789c5e85443b32c

See more details on using hashes here.

File details

Details for the file steamio-1.1.3-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

  • Download URL: steamio-1.1.3-cp312-cp312-macosx_15_0_arm64.whl
  • Upload date:
  • Size: 420.1 kB
  • Tags: CPython 3.12, macOS 15.0+ ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.13.2 Darwin/24.4.0

File hashes

Hashes for steamio-1.1.3-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b405053b8261f74d5bede49aaf0b62f213eb917d498648fb9cf80dfcc39dff6a
MD5 2eb89b6b6d753f2b2b316a373b9ca861
BLAKE2b-256 b5557a9149586a4eeaf99f4d07852ae3fd8521d34ec2acc1ad901dede0da59fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page