Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

SteamSpy API on PyPI

Project description

SteamSpyPI: an API for SteamSpy

PyPI status ![Build status][build-image] Updates Python 3 Code coverage Code Quality

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

[build-image]: <https://github.com/woctezuma/steamspypi/workflows/Python package/badge.svg?branch=master> [publish-image]: <https://github.com/woctezuma/steamspypi/workflows/Upload Python Package/badge.svg?branch=master>

Project details


Download files

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

Files for steamspypi, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size steamspypi-1.1.0-py3-none-any.whl (10.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size steamspypi-1.1.0.tar.gz (8.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page