Skip to main content

A Python wrapper for SteamCharts

Reason this release was yanked:

Wrong README

Project description

SteamCharts

This module makes it possible to get the player count of a game on Steam using the Steamcharts website. It uses aiohttp, BeautifulSoup and http modules.

Installation

pip install SteamPlayerCharts

Example

import asyncio
import SteamPlayerCharts as SteamCharts

async def main():
	steamgameID = "4000"
	player_count = await SteamCharts.playercount(steamgameID)
	print(player_count)
	try:
		current_players = player_count['Current Players']
		day_peak = player_count['Peak Players 24h']
		all_time_peak = player_count['Peak Players All Time']
	except:
		error_code = player_count['error']['code']
		error_message = player_count['error']['message']

asyncio.run(main())

The playercount function returns a Python dict containing the current player counts, as well as the peak values for the last 24 hours and all time.

If the query fails, an error dict is returned that contains the HTTP error code and message.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

SteamPlayerCharts-0.2.1-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

Details for the file SteamPlayerCharts-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for SteamPlayerCharts-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a4480f92bd3ef6b6dd0e060e826935e2d584c68e29080df0064f4b4406aee40c
MD5 6476d50ca95fdf47393406b321ad6ae0
BLAKE2b-256 7cd47602ee79eb829348f27cb3b035d285bd7728b20989637f866e2987bf1695

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