A small collection of classes for deserializing data from the OpenGameData File API.
Project description
opengamedata-api-files
This is the OpenGameData dataset/file repository API.
Its primary use is for getting information about what data is available from the fileserver used by opengamedata.fielddaylab.wisc.edu, but could be used for any repository of datasets using the OpenGameData pipeline.
API endpoints
The latest release of the API supports the endpoints listed below.
Broadly speaking, the file API has a 3-level hierarchy for retrieving information about games and their datasets.
- Games: The top-level entity is a game. Each game has an ID and is associated with one or more datasets.
- Datasets: The term "dataset" refers to all data for a specific month of play from a specific game. For any given dataset, the actual data in that "set" may include game events, post-hoc "detector" events, session-level features, player-level features, or population-level features.
- Files: A "file" contains actual data of one type from a dataset.
Game-Level Endpoints
-
/gamesRetrieve a list of all games for which at least one dataset exists.
Example:
curl https://ogd-staging.fielddaylab.wisc.edu/apis/files/main/games{ "type": "GET", "val": { "game_ids": ["AQUALAB", "BACTERIA", "BALLOON", ...] }, "msg": "SUCCESS: Retrieved list of games with available datasets" }
-
/games/<game_id>Retrieve a summary of the game and its datasets
Example:
curl https://ogd-staging.fielddaylab.wisc.edu/apis/files/main/games/AQUALABresponse = { "type": "GET", "val": { "game_id": "AQUALAB", "dataset_count": 57, "session_average": 1234, "initial_dataset": "2021-04-11 00:00:00" }, "msg": "SUCCESS: Retrieved monthly game usage" }
-
/games/detailsRetrieve summaries of all games for which at least one dataset exists.
Example:
curl https://ogd-staging.fielddaylab.wisc.edu/apis/files/main/games/detailsresponse = { "type": "GET", "val": { "AQUALAB": { "game_id": "AQUALAB", "dataset_count": 57, "session_average": 1234, "initial_dataset": "2021-04-11 00:00:00" }, "AQUALAB": { "game_id": "BACTERIA", "dataset_count": 42, "session_average": 543, "initial_dataset": "2021-01-10 00:00:00" }, }, "msg": "SUCCESS: Retrieved list of games with available datasets" }
Dataset-Level Endpoints
-
/games/<game_id>/datasetsRetrieve a list of datasets and associated session counts for a specific game.
Approximately equivalent to the
/MonthlyGameUsagelegacy endpoint. However, the legacy endpoint includes additional entries for non-existent datasets that lie within the range of all extant datasets, with the session counts set to 0.Example:
curl https://ogd-staging.fielddaylab.wisc.edu/apis/files/main/games/AQUALAB/datasetsresponse = { "type": "GET", "val": { "game_id": "AQUALAB", "datasets": [ ... {"year": 2025, "month": 9, "total_sessions": 4908, "sessions_file": ..., "players_file": ..., "population_file": ...}, {"year": 2025, "month": 10, "total_sessions": 4763, ...}, {"year": 2025, "month": 11, "total_sessions": 5339, ...} ] }, "msg": "SUCCESS: Retrieved monthly game usage" }
-
/games/<game_id>/datasets/<year>Retrieve a list of datasets and associated session counts for a specific game within a specific month. Roughly equivalent to the
/games/<game_id>/datasets/endpoint, but scoped to a single year.Example:
curl https://ogd-staging.fielddaylab.wisc.edu/apis/files/main/games/AQUALAB/datasets/2023response = { "type": "GET", "val": { "game_id": "AQUALAB", "datasets": [ {"year": 2023, "month": 1, "total_sessions": 2013, "sessions_file": ..., "players_file": ..., "population_file": ...}, {"year": 2023, "month": 2, "total_sessions": 17, ...}, {"year": 2023, "month": 3, "total_sessions": 8605, ...} ... ] }, "msg": "SUCCESS: Retrieved monthly game usage" }
-
/games/<game_id>/datasets/<year>/<month>Get detailed info on the files and other resources that are available for a specific dataset. This is roughly equivalent to the
/getGameFileInfoByMonthlegacy endpoint.Example:
curl https://ogd-staging.fielddaylab.wisc.edu/apis/files/main/games/AQUALAB/datasets/2023/01 -
/games/<game_id>/datasets/<year>/<month>/manifest(experimental)Get a full "dataset manifest" for the given dataset. This includes details about events and features included in the dataset.
Example:
curl https://ogd-staging.fielddaylab.wisc.edu/apis/files/main/games/AQUALAB/datasets/2023/01/manifest
File-Level Endpoints
-
/games/<game_id>/datasets/<month>/<year>/<file_type>Retrieve the contents of a specific dataset file. Valid
file_types arepopulation,player, andsession.This is only recommended for applications that need direct access to dataset file contents. Local downloads should be obtained through the URLs provided in the other dataset endpoints.
Future releases may add support for requesting event file contents.
Example:
curl https://ogd-staging.fielddaylab.wisc.edu/apis/files/main/games/AQUALAB/datasets/2023/01/player
Developer Instructions
Running the app locally via the development Flask server
Steps to run:
- Ensure you have Python and pip installed in your development environment.
- (optional) From the project root folder, run
python -m venv .venvto create the.venvdirectory that will contain the virtual environment. - (optional) Activate the environment with
source .venv/bin/activateon Mac/Linux, or.venv/Scripts/activateon Windows. - From the app's root directory run
pip install -r requirements.txtto ensure you have Flask and other dependencies installed for the app.- If you are performing local development, you should instead run
pip install -e ./
- If you are performing local development, you should instead run
- Copy
config/config.py.templatetosrc/config.pyto create a config. Updateconfig.pyconfiguration values as needed. - Enter the source folder with
cd srcand then runpython -m flask run, or optionally include the--debugflag. - A web server should begin running at http://localhost:5000
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opengamedata_api_files-2.2.0b2.tar.gz.
File metadata
- Download URL: opengamedata_api_files-2.2.0b2.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4791fcdad67a9fe64e08c70cde6a12267976beb7a73a8e12e295e83b018df558
|
|
| MD5 |
466f7a680ff3189e494be377ff86215e
|
|
| BLAKE2b-256 |
f332ebf467981e7341ae9f5d9e1b74730877729febf122c5fd1c85a015ac9a20
|
Provenance
The following attestation bundles were made for opengamedata_api_files-2.2.0b2.tar.gz:
Publisher:
RELEASE_FileAPI.yml on opengamedata/ogd-api-files
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opengamedata_api_files-2.2.0b2.tar.gz -
Subject digest:
4791fcdad67a9fe64e08c70cde6a12267976beb7a73a8e12e295e83b018df558 - Sigstore transparency entry: 1854730027
- Sigstore integration time:
-
Permalink:
opengamedata/ogd-api-files@840987f8c77d94348c3424964441e8da148c0892 -
Branch / Tag:
refs/tags/v2.2.0-beta2 - Owner: https://github.com/opengamedata
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
RELEASE_FileAPI.yml@840987f8c77d94348c3424964441e8da148c0892 -
Trigger Event:
release
-
Statement type:
File details
Details for the file opengamedata_api_files-2.2.0b2-py3-none-any.whl.
File metadata
- Download URL: opengamedata_api_files-2.2.0b2-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0ef58fcb6d4008934fd85f539955fd3c4b30e139586e07af1843e4707bc67d1
|
|
| MD5 |
51cae4f1d9d4a315f09e71018a7d8c77
|
|
| BLAKE2b-256 |
6713730d5e4c4238c1db0fe8218a4b98ea4461af45c18359e5e2c77ea8a0011a
|
Provenance
The following attestation bundles were made for opengamedata_api_files-2.2.0b2-py3-none-any.whl:
Publisher:
RELEASE_FileAPI.yml on opengamedata/ogd-api-files
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opengamedata_api_files-2.2.0b2-py3-none-any.whl -
Subject digest:
b0ef58fcb6d4008934fd85f539955fd3c4b30e139586e07af1843e4707bc67d1 - Sigstore transparency entry: 1854730031
- Sigstore integration time:
-
Permalink:
opengamedata/ogd-api-files@840987f8c77d94348c3424964441e8da148c0892 -
Branch / Tag:
refs/tags/v2.2.0-beta2 - Owner: https://github.com/opengamedata
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
RELEASE_FileAPI.yml@840987f8c77d94348c3424964441e8da148c0892 -
Trigger Event:
release
-
Statement type: