Formula1Py
Ergast API Python Wrapper
Install
pip install formula1py
Usage
import json
from formula1py import F1
# no args
f1 = F1()
# http[s]
f1 = F1(secure=True)
# the api supports an offset and a limit
f1 = F1(secure=False, offset=20, limit=20)
# defaults to text/xml
f1.current_schedule().json
f1.all_drivers().json
f1.all_circuits().xml
# adding season to some endpoints
f1.season_schedule(season=2004).json
f1.race_standings(season=2020).json
f1.constructor_standings(season=2013).xml
# just the url
f1.driver_season(season=2020).url
# also supports random
print(json.dumps(f1.random(season=2020).json, indent=2)
>> > from formula1py import F1
>> > f1 = F1(secure=True)
>> > f1_season = f1.driver_season(season=2002)
>> > print(f1_season.url)
>> > print(f1_season.json)
Example Response
{
"season": "2021",
"round": "1",
"url": "https://en.wikipedia.org/wiki/2021_Bahrain_Grand_Prix",
"raceName": "Bahrain Grand Prix",
"Circuit": {
"circuitId": "bahrain",
"url": "http://en.wikipedia.org/wiki/Bahrain_International_Circuit",
"circuitName": "Bahrain International Circuit",
"Location": {
"lat": "26.0325",
"long": "50.5106",
"locality": "Sakhir",
"country": "Bahrain"
}
},
"date": "2021-03-28",
"time": "15:00:00Z"
}
Dev
make deps
make test
ToDo
- More Tests
- More Endpoints
Metadata
Release files for formula1py 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| formula1py-0.10.0.tar.gz | 14.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| formula1py-0.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.0 kB
Release files / formula1py-0.10.0.tar.gz
| Download URL | formula1py-0.10.0.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bda1927b644b70ad140e2cc214e5dd940d3c2bf5b3d22898972e997e67cedb35
|
|
BLAKE2b-256 checksum How to use checksums |
645362367ea77c5ca9f56ffe0189a7637ab6c4f135062aac7d507c03090893c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.26.0
|
Release files / formula1py-0.10.0-py3-none-any.whl
| Download URL | formula1py-0.10.0-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c51f4a30e0ad576e94a19428355a01d8226bf46c95a5ea5cbe9d1e49aee5ea06
|
|
BLAKE2b-256 checksum How to use checksums |
c879885da6d15a9d831b1e2d3492f1b1345f07c3c1f13e4427a33714d179a13f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.26.0
|
Security for formula1py 0.10.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.