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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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