SteamSpyPI: an API for SteamSpy
This repository contains Python code to download data through SteamSpy API.
Installation
The code is packaged for PyPI, so that the installation consists in running:
pip install steamspypi
Usage
Returns details for 1000 games. Data is sorted by decreasing number of owners.
A page parameter is now required for all requests, starting at page=0.
You will be able to retrieve 1000 games per all request.
Moreover, the API rate is now heavily limited for all requests.
You will be able to issue 1 all request per minute.
import steamspypi
data_request = dict()
data_request['request'] = 'all'
data_request['page'] = '0'
data = steamspypi.download(data_request)
Returns details for 1000 games. This time, data is cached locally for offline reuse.
In this case, page is forcibly set to 0, without any access to this parameter for the end-user.
Local cache is in data/%Y%m%d_steamspy.json, without mentioning page in the file name for backward compatibility.
import steamspypi
data = steamspypi.load()
Returns details for all of the games.
Please refer to this for-loop to accomodate recent API rate-limits.
Alternatively, if you know the exact number of pages, e.g. 44 as of March 29, 2021:
import steamspypi
data = steamspypi.download_all_pages(num_pages=44)
Returns details for a given application.
import steamspypi
data_request = dict()
data_request['request'] = 'appdetails'
data_request['appid'] = '730'
data = steamspypi.download(data_request)
Returns all games in a given genre.
import steamspypi
data_request = dict()
data_request['request'] = 'genre'
data_request['genre'] = 'Early Access'
data = steamspypi.download(data_request)
Returns all games with a given tag.
import steamspypi
data_request = dict()
data_request['request'] = 'tag'
data_request['tag'] = 'Early Access'
data = steamspypi.download(data_request)
Returns Top 100 games, with respect to the number of players in the last two weeks.
import steamspypi
data_request = dict()
data_request['request'] = 'top100in2weeks'
data = steamspypi.download(data_request)
Returns Top 100 games, with respect to the number of players since March 2009.
import steamspypi
data_request = dict()
data_request['request'] = 'top100forever'
data = steamspypi.download(data_request)
Returns Top 100 games, with respect to the estimated number of owners.
import steamspypi
data_request = dict()
data_request['request'] = 'top100owned'
data = steamspypi.download(data_request)
References
gamedatacrunch@PyPI: an API to download data through GameDataCrunch API.
Metadata
Release files for steamspypi 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| steamspypi-1.1.1.tar.gz | 8.9 kB | Without provenance | Details for steamspypi-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| steamspypi-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for steamspypi-1.1.1-py3-none-any.whl |
Total release size: 20.2 kB
Release files / steamspypi-1.1.1.tar.gz
| Download URL | steamspypi-1.1.1.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
abb27c7840fd5cc41daf4939c528af2d73499b063b7be08366376eed628f6480
|
|
BLAKE2b-256 checksum How to use checksums |
848a446e7294569b668cc54b341d81c37f0eeffc5ad617fadc7c82f54909a37d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.9.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Release files / steamspypi-1.1.1-py3-none-any.whl
| Download URL | steamspypi-1.1.1-py3-none-any.whl |
|---|---|
| Size | 11.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee98e4a1b8f9135d54264a8d73b50f94922f4818201ac77eea589b07b0cf79e3
|
|
BLAKE2b-256 checksum How to use checksums |
300b13869df8eb3b6545839e5f551e33e5a9eb00807f6ccce6e08ae954b25496
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.9.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
|
Security for steamspypi 1.1.1
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.