Skip to main content

A Python Client for the GameBench API

Build Status Coverage Quality Gate Status BCH compliance Gitter

Please check out our ZenHub Board for open issues and feature requests.

Repository: GitHub

For full documentation, go to the ReadtheDocs page.

PyPi

Overview

To install, run pip install GameBenchAPI-PyClient-BigFish

The GameBench API Client library supplies a high-level object-oriented interface to the GameBench API. It is built in Python 3.7 and uses the Requests library and Pandas data frames to easily integrate into data analysis software.

The library has two main architectural components; the models and API packages. The API package is responsible for URL requests and dealing with the responses. The models are the objects representing the data returned. A mediator provides the glue between the api and the models.

As a user of the library, you should only ever need to interact with the models creator class and the model objects it can return.

Right now, the models are very thin. They only contain a property that has the data frame assigned. Over time we would like to add common functionality, like aggregates, to these classes.

The Basics

To make a request, import the ModelCreator class. Instantiating the ModelCreator requires two arguments. The first is a CamelCase style 'model' named after the metric that you are looking for; the model is dynamically imported based on this name. The second argument is a dictionary that must include specific key/value pairs for querying the GameBench API.

from gamebench_api_client.models.creator.model_creator import ModelCreator



time_series_request = {
    'session_id': '66d926f47ff5a7a5d853d1058c6305614e1ae6a5'
}

creator = ModelCreator('Cpu', time_series_request)
cpu_time_series = creator.get_model()

results = cpu_time_series.data

print(results)

"""
      appUsage  daemonUsage    gbUsage  timestamp  totalCpuUsage
0  1372571.375            0  12.658228       5257      39.688461
"""

Release files for GameBenchAPI-PyClient-BigFish 1.0.3

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

Source distribution (sdist)

Source distribution for GameBenchAPI-PyClient-BigFish 1.0.3
File Size Uploaded
GameBenchAPI-PyClient-BigFish-1.0.3.tar.gz 24.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for GameBenchAPI-PyClient-BigFish 1.0.3
File Interpreter ABI Platform
GameBenchAPI_PyClient_BigFish-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 78.6 kB

Release files / GameBenchAPI-PyClient-BigFish-1.0.3.tar.gz

Download URL GameBenchAPI-PyClient-BigFish-1.0.3.tar.gz
Size 24.8 kB
Tags Source
SHA-256 checksum
How to use checksums
62b2d5f3ba41faf6cbb614600a50cc42c2777b8a971bf582b8d1e6c9a693f0ec
BLAKE2b-256 checksum
How to use checksums
932f150f8e2f76c28c0f8a2f28d4a0fb5004ec689a871a216c99df0ca52f2d00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.1

Release files / GameBenchAPI_PyClient_BigFish-1.0.3-py3-none-any.whl

Download URL GameBenchAPI_PyClient_BigFish-1.0.3-py3-none-any.whl
Size 53.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20b9ae75567ba1146535db76bbcac7628279793f5c79df26d9c06a7cfabcc592
BLAKE2b-256 checksum
How to use checksums
2f5705f02edafcae63a323d06d96db4aa162b99a3d397519cb6a5bedac33d259
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.1

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.20

2 release files

0.1.19

2 release files

0.1.18

2 release files

0.1.17

2 release files

0.1.16

2 release files

0.1.15

2 release files

0.1.14

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

1 release file

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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