Skip to main content

granturismo-stats

Statistics for Gran Turismo online events

GitHub PyPI Travis (.com) branch Coveralls github branch PyPI - Downloads Code Climate maintainability

Purpose

I started this project because I wanted to see how my qualifying times for the Gran Turismo Sport daily races compare to other drivers with similar driver and sportsmanship rating.

This is a work in progress. Currently, it is possible to do exactly what my original goal included: get the complete qualifying leaderboard and compute some basic statistics.
If you have suggestions what information to add feel free to open an issue and I will see if it is a) possible and b) I find it interesting as well. ;)

Examples

If you would like to see example code, look at the examples directory on github.

Limitations

Performance

The performance is not the best. While there are probably a few things that can be done on my side of the code, the main limiting factor when retrieving the qualification leaderboards is the Gran Turismo Sport API itself which limits the number of entries that can be obtained in a single request and takes quite some time to respond. With several ten thousand qualification entries for each race it can easily take 10 seconds or longer to obtain them all. Just be patient! :)

Region

There is currently no option to change the region for which you want to retrieve the results. The code uses the API URL for Germany and thus the results are all for the EMEA region. However, this is something I'd like to change in the future (see issue #1).

Further remarks

Bear in mind that in order to retrieve a full leaderboard somewhat in the region of 50 requests will be sent concurrently to the GT Sport API. Use this library responsibly. Querying the leaderboard every now and then should be totally fine, but doing so over and over again without a pause in an endless loop will generate a lot of traffic on the server side.
I intend to implement a caching mechanism so that executing a script multiple times will become faster on the one hand and produce less traffic on the other. Until then, check out the get_leaderboard function of gtsport_test_drive.py in the examples directory how to do it yourself.

Kudos

The unofficial GT Sport API documentation from Alex Persian made the whole process a lot easier: https://github.com/alexpersian/gt7sp-api

Metadata

Release files for granturismo-stats 0.3.0

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

Source distribution (sdist)

Source distribution for granturismo-stats 0.3.0
File Size Uploaded
granturismo-stats-0.3.0.tar.gz 173.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for granturismo-stats 0.3.0
File Interpreter ABI Platform
granturismo_stats-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 185.8 kB

Release files / granturismo-stats-0.3.0.tar.gz

Download URL granturismo-stats-0.3.0.tar.gz
Size 173.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9cf1ff8aa95c5fcfc6bd5b21a7c0ee3b51726fb9e0ccfef88b53649293b88be6
BLAKE2b-256 checksum
How to use checksums
8d693e165d972d4816d90be0888cc4959bb4623d61154d44ca037e20eb7040e6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.3

Release files / granturismo_stats-0.3.0-py3-none-any.whl

Download URL granturismo_stats-0.3.0-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c18c9caf2594feb6d51884fbf120e6d4bba5a5f40b899e8dc079731a79d2daf3
BLAKE2b-256 checksum
How to use checksums
d54848ae5d3a62308f1da3118b44d84ed82cb5b32ab4de5515e24133fefc5162
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.3

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.3

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

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