Skip to main content

A package for get Formula One Data

Project description

MikeRacingF1 Package

The MikeRacingF1 package is a Python package that provides a simple and easy-to-use interface to the F1Stats API. The F1Stats API provides data about Formula 1 races, circuits, constructors, drivers, and more.

Installation

pip install mikeracingf1

Usage

To use the MikeRacingF1 package, you first need to import the MikeRacingF1 class:

from MikeRacingF1 import MikeRacingF1

You can then create a new instance of the MikeRacingF1 class, which provides methods for accessing the F1Stats API:

f1stats = MikeRacingF1()

The MikeRacingF1 class provides the following methods:

get_circuits(year): Returns information about F1 circuits for the given year.

get_constructor_results(year): Returns results for F1 constructors for the given year.

get_constructor_list(): Returns a list of F1 constructors.

get_constructorstandings(): Returns standings for F1 constructors.

get_driversinfo(year): Returns information about F1 drivers for the given year.

get_driverstandings(year): Returns standings for F1 drivers for the given year.

get_races(year): Returns information about F1 races for the given year.

get_results(year, round): Returns results for an F1 race for the given year and round.

Each method sends a GET request to the corresponding endpoint of the F1Stats API, and returns the JSON response as a Python object.

Here's an example of how to use the MikeRacingF1 class to retrieve information about F1 races and circuits:

from MikeRacingF1 import MikeRacingF1

f1stats = MikeRacingF1()

# Retrieve information about F1 circuits for the year 2023
circuits = f1stats.get_circuits(2023)
print("Circuits:")
print(circuits)
print()

# Retrieve information about F1 races for the year 2023
races = f1stats.get_races(2023)
print("Races:")
print(races)
print()
    

This code creates a new instance of the MikeRacingF1 class, and calls its get_circuits and get_races methods with the year 2023. It then prints the JSON responses from the F1Stats API.

License This package is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mikeracingf1-0.0.5.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

mikeracingf1-0.0.5-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file mikeracingf1-0.0.5.tar.gz.

File metadata

  • Download URL: mikeracingf1-0.0.5.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for mikeracingf1-0.0.5.tar.gz
Algorithm Hash digest
SHA256 e5cd4a44875e91ab2e6607c979c260ed4e5a8c0b329d7dadd7f09d5e711cd2de
MD5 3922720413035f58be8ccd45e7d421e9
BLAKE2b-256 27a55ed6a28a60e5e6bd992000347c74b24bb64133627a167b73be45bac6f8d6

See more details on using hashes here.

File details

Details for the file mikeracingf1-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: mikeracingf1-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for mikeracingf1-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 bf72278c0177990d986e98a598ca759b6d2e109ba662de1512ac8f35192c530f
MD5 8bad1ad1422240a90912acd2a58ef694
BLAKE2b-256 73977ed6bdb3b7797255f4b8483c1fd2d8cce5ae7321e94fe4d05b5dbdae27c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page