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.

This long_description field provides a brief overview of the MikeRacingF1 package, and includes an example of how to use it to retrieve data from the F1Stats API. It also includes a section on how to install the package, and a note about the license.

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.4.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mikeracingf1-0.0.4-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mikeracingf1-0.0.4.tar.gz
  • Upload date:
  • Size: 3.3 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.4.tar.gz
Algorithm Hash digest
SHA256 5d83e52ca356375fd84789e53d1b7686406185060b2d823d4bea39d4d899b756
MD5 f2c724ee85a17f2ab0982fbb3a1c48e7
BLAKE2b-256 e96b698efa79d3f31a6b86b2a66ab3bb11ca3fe4d6dd70aef9aae66141a1a282

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mikeracingf1-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.6 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 13d7f2fb58e2b9cb75288552c9242670640fd1535dc17219f2f48ffc8263009e
MD5 335d8360a7b1c91661be74929807ac7f
BLAKE2b-256 e49339f8f338d2ebe50eda087cbb2ddc071be8184732ae6d30079fd235b91487

See more details on using hashes here.

Supported by

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