Skip to main content

Python Client wrapper for Steam Web API

Project description

Description


This project is entirely based on the Steam Web API. You can find all the API information in the "all_api_info" folder, which includes both the APIs that require an API key and the ones that can be called without an API key. However, to ensure smooth usage, it is recommended that you apply for an API key. Currently, the project has only implemented a portion of the API functionalities that I deemed useful.

Get start

pip install py-steam-web-api

basic

from py_steam_web_api.api import SteamApi

s = SteamApi(key="xxxxxxxxxxxxxxxxxxxx")

get user info

u = s.user.get_user_info(steamid=76561198155349454)
print(u.steamid, u.personaname)

# 76561198155349454 nike

get friends

# def get_friends(self, steamid: str) -> list[User]
u = s.user.get_friends(steamid=76561198155349454)
for i in u:
    print(i.steamid, i.personaname)

# 76561198098262862 nike
# 76561198400723672 aplay
# 76561198417914571 Π

get level

# def get_level(self, steamid: int) -> int:
a = s.user.get_level(steamid=76561198155349454)
print(a)

# 45

get recent played games

#def get_recent_played_games(self, steamid: int) -> list[Game]:
a = s.game.get_recent_played_games(steamid=76561198155349454)
for i in a:
    print(i.appid)

# 271590
# 1260320
# 436150
# 322330

all

#user
def get_user_info(self, steamid: int) -> User:
def get_friends(self, steamid: int) -> list[User]:
def get_badges(self, steamid: int) -> list[Badge]:
def get_level(self, steamid: int) -> int:

#game
def get_recent_played_games(self, steamid: int) -> list[Game]:
def get_owned_games(self, steamid: int, include_appinfo=True) -> list[Game]:
def get_game_list(self, max_results=10000) -> list[Game]:

#stats
def get_number_of_current_players(self, appid: int) -> dict:
def get_player_achievements(self, appid: int, steamid: int) -> dict:
def get_schema_for_game(self, appid: int) -> dict:
def get_user_stats_for_game(self, appid: int, steamid: int) -> dict:

Project details


Release history Release notifications | RSS feed

This version

0.2

Download files

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

Source Distribution

py-steam-web-api-0.2.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

py_steam_web_api-0.2-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file py-steam-web-api-0.2.tar.gz.

File metadata

  • Download URL: py-steam-web-api-0.2.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for py-steam-web-api-0.2.tar.gz
Algorithm Hash digest
SHA256 6c1ddcc94efd732fdecefbe9948476ed0be41b9eb97c0d23bf0265b16d7a5f0b
MD5 cbaade3cacccb44698e39a099bf3420c
BLAKE2b-256 986f41dcd1cba4deab85e45a77a63099de0f0ea2d71edaa68e0639c866d1b28b

See more details on using hashes here.

File details

Details for the file py_steam_web_api-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for py_steam_web_api-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d8e3b3d7a607b0bad98ff81f26d1abc58bb4b581cde675bb97cc48d0853531f2
MD5 a1ec098bb3693d9dfec61a1357dca98c
BLAKE2b-256 d92b0a8e38bd513dcfcad25bb25967ff0799e3de6747b9daa5a5806e39a772d5

See more details on using hashes here.

Supported by

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