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 and borrowing functionality from ValvePython/steam.

Supports Version License Codacy GitHub issues GitHub stars Discord

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.

git clone https://github.com/Gobot1234/steam.py
cd steam.py
python3 -m pip install -U ".[dev]"

Quick Example

import steam


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

    async def on_trade_receive(self, trade):
        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):
    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-0.5.2.tar.gz (155.0 kB view details)

Uploaded Source

Built Distribution

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

steamio-0.5.2-py3-none-any.whl (196.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: steamio-0.5.2.tar.gz
  • Upload date:
  • Size: 155.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for steamio-0.5.2.tar.gz
Algorithm Hash digest
SHA256 dfe7358fe216f335d798d7f8f1a53218d24dc92b8ac772a27ddb75cc689dfa05
MD5 f7e2487986d10c6f7864015733cdaea1
BLAKE2b-256 8ec5cf89b6e816f6925ac9234243f9e740eb0ecfccd491a86371f9528c86009f

See more details on using hashes here.

File details

Details for the file steamio-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: steamio-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 196.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for steamio-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 52ca31404c31961d360b66fb472e4c8aabc2a84106639918e46503e125e5a55c
MD5 bee54ed913a4b58febd229a12c1c1db1
BLAKE2b-256 e8142e153337598dd1a687071a0d0c0f7a0bc46cb02dc5fb782dd622dbc46055

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