This repository has been archived on 2022-08-24. You can view files and clone it, but cannot push or open issues or pull requests.
ergast-py/ergast_py/models/circuit.py
2022-06-01 14:31:52 +01:00

26 lines
839 B
Python

from dataclasses import dataclass
from ergast_py.models.location import Location
@dataclass
class Circuit:
"""
Representation of a Formula One Circuit
Circuits may contain:
circuitId: String
url: String
circuitName: String
location: Location
"""
def __init__(self, circuitId: str, url: str, circuitName: str, location: Location) -> None:
self.circuitId = circuitId
self.url = url
self.circuitName = circuitName
self.location = location
pass
def __str__(self):
return f"Circuit(circuitId={self.circuitId}, url={self.url}, circuitName={self.circuitName}, location={self.location})"
def __repr__(self):
return f"Circuit(circuitId={self.circuitId}, url={self.url}, circuitName={self.circuitName}, location={self.location})"