Skip to main content

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 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.

Metadata

Release files for SteamPlayerCharts 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for SteamPlayerCharts 0.2
File Interpreter ABI Platform Actions
SteamPlayerCharts-0.2-py3-none-any.whl Python 3 none any Details for SteamPlayerCharts-0.2-py3-none-any.whl

Release files / SteamPlayerCharts-0.2-py3-none-any.whl

Download URL SteamPlayerCharts-0.2-py3-none-any.whl
Size 1.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
200e23c9df80ba5216a1fbacdf47f1f33bb9148b094d15616ea2374deecccc02
BLAKE2b-256 checksum
How to use checksums
4032959808976fb06e964da461c8d8457bb4dcf77bee3c02dd46b36073508ba4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Security for SteamPlayerCharts 0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page