Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/woctezuma/steamspypi
SteamSpyPI: an API for SteamSpy. Available on PyPI.
https://github.com/woctezuma/steamspypi
steam steamspy steamspy-api
Last synced: 20 days ago
JSON representation
SteamSpyPI: an API for SteamSpy. Available on PyPI.
- Host: GitHub
- URL: https://github.com/woctezuma/steamspypi
- Owner: woctezuma
- License: mit
- Created: 2018-05-15T08:34:50.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-14T22:34:53.000Z (10 months ago)
- Last Synced: 2024-03-14T23:30:35.024Z (10 months ago)
- Topics: steam, steamspy, steamspy-api
- Language: Python
- Homepage: https://pypi.org/project/steamspypi/
- Size: 4.09 MB
- Stars: 23
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SteamSpyPI: an API for SteamSpy
[![PyPI status][pypi-image]][pypi]
[![Build status][build-image]][build]
[![Code coverage][codecov-image]][codecov]
[![Code Quality][codacy-image]][codacy]
This repository contains Python code to download data through [SteamSpy API][steamspy-api-docs].## Installation
The code is packaged for [PyPI][steamspy-pypi], so that the installation consists in running:
```bash
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.```python
import steamspypidata_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.
```python
import steamspypidata = steamspypi.load()
```### Returns details for all of the games.
Please refer to [this for-loop][github-gist-download-all] to accomodate recent API rate-limits.
Alternatively, if you know the exact number of pages, e.g. 44 as of March 29, 2021:
```python
import steamspypidata = steamspypi.download_all_pages(num_pages=44)
```### Returns details for a given application.
```python
import steamspypidata_request = dict()
data_request['request'] = 'appdetails'
data_request['appid'] = '730'data = steamspypi.download(data_request)
```### Returns all games in a given genre.
```python
import steamspypidata_request = dict()
data_request['request'] = 'genre'
data_request['genre'] = 'Early Access'data = steamspypi.download(data_request)
```### Returns all games with a given tag.
```python
import steamspypidata_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.
```python
import steamspypidata_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.
```python
import steamspypidata_request = dict()
data_request['request'] = 'top100forever'data = steamspypi.download(data_request)
```### Returns Top 100 games, with respect to the estimated number of owners.
```python
import steamspypidata_request = dict()
data_request['request'] = 'top100owned'data = steamspypi.download(data_request)
```## References
- [`gamedatacrunch`][gamedatacrunch-api]@[PyPI][gamedatacrunch-pypi]: an API to download data through [GameDataCrunch API][gamedatacrunch].
[gamedatacrunch]:
[steamspy-api]:
[steam-api]:[steamspy-api-docs]:
[steamspy-pypi]:
[gamedatacrunch-api]:
[gamedatacrunch-pypi]:[github-gist-download-all]:
[pypi]:
[pypi-image]:[build]:
[build-image]:
[publish-image]:[pyup]:
[dependency-image]:
[python3-image]:[codecov]:
[codecov-image]:[codacy]:
[codacy-image]: