Added License to README
This commit is contained in:
parent
73b4953dd7
commit
e44046729e
@ -3,8 +3,10 @@
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/github/stars/Samuel-Roach/ergast-py?color=purple&style=for-the-badge"/>
|
||||
<img src="https://img.shields.io/github/languages/code-size/Samuel-Roach/ergast-py?style=for-the-badge"/>
|
||||
<img src="https://img.shields.io/github/commit-activity/m/Samuel-Roach/ergast-py?color=orange&style=for-the-badge"/>
|
||||
<img src="https://img.shields.io/pypi/v/ergast-py?color=green&style=for-the-badge"/>
|
||||
<img src="https://img.shields.io/github/commit-activity/m/Samuel-Roach/ergast-py?color=green&style=for-the-badge"/>
|
||||
<br>
|
||||
<img src="https://img.shields.io/pypi/v/ergast-py?color=yellow&style=for-the-badge"/>
|
||||
<img alt="GitHub" src="https://img.shields.io/github/license/Samuel-roach/Ergast-py?color=orange&style=for-the-badge">
|
||||
</p>
|
||||
|
||||
A comprehensive Python wrapper for the Ergast API. Built for easy use and functionality, Ergast-py aims to bring the Ergast API into the Python network as seemlessly as possible.
|
||||
|
@ -26,28 +26,22 @@ and a better understanding visit http://ergast.com/mrd/
|
||||
|
||||
"""
|
||||
|
||||
from ergast_py.ergast import Ergast
|
||||
from ergast_py.models.average_speed import AverageSpeed
|
||||
from ergast_py.models.circuit import Circuit
|
||||
from ergast_py.models.constructor import Constructor
|
||||
from ergast_py.models.constructor_standing import ConstructorStanding
|
||||
from ergast_py.models.driver import Driver
|
||||
from ergast_py.models.driver_standing import DriverStanding
|
||||
from ergast_py.models.fastest_lap import FastestLap
|
||||
from ergast_py.models.lap import Lap
|
||||
from ergast_py.models.location import Location
|
||||
from ergast_py.models.circuit import Circuit
|
||||
from ergast_py.models.constructor import Constructor
|
||||
from ergast_py.models.pit_stop import PitStop
|
||||
from ergast_py.models.race import Race
|
||||
from ergast_py.models.result import Result
|
||||
from ergast_py.helpers import Helpers
|
||||
from ergast_py.constants.status_type import StatusType
|
||||
from ergast_py.models.season import Season
|
||||
from ergast_py.models.standings_list import StandingsList
|
||||
from ergast_py.models.status import Status
|
||||
from ergast_py.models.timing import Timing
|
||||
from ergast_py.constants.expected import Expected
|
||||
from ergast_py.requester import Requester
|
||||
from ergast_py.type_constructor import TypeConstructor
|
||||
from ergast_py.ergast import Ergast
|
||||
|
||||
|
||||
__version__ = '0.1.0'
|
||||
|
@ -1,18 +1,19 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Callable
|
||||
|
||||
from ergast_py.models.driver import Driver
|
||||
from ergast_py.constants.status_type import StatusType
|
||||
from ergast_py.models.circuit import Circuit
|
||||
from ergast_py.models.constructor import Constructor
|
||||
from ergast_py.models.driver import Driver
|
||||
from ergast_py.models.race import Race
|
||||
from ergast_py.models.season import Season
|
||||
from ergast_py.models.standings_list import StandingsList
|
||||
from ergast_py.models.status import Status
|
||||
from ergast_py.constants.status_type import StatusType
|
||||
from ergast_py.models.season import Season
|
||||
from ergast_py.models.race import Race
|
||||
|
||||
from ergast_py.requester import Requester
|
||||
from ergast_py.type_constructor import TypeConstructor
|
||||
|
||||
|
||||
class Ergast():
|
||||
"""
|
||||
Class for querying the Ergast API
|
||||
|
@ -1,6 +1,5 @@
|
||||
import datetime
|
||||
|
||||
from ergast_py.constants.status_type import StatusType
|
||||
|
||||
class Helpers:
|
||||
def construct_datetime_str(self, date: str, time: str) -> datetime.datetime:
|
||||
|
@ -3,8 +3,8 @@ import requests
|
||||
|
||||
from uritemplate import URITemplate
|
||||
|
||||
host = 'https://ergast.com/api'
|
||||
series = 'f1'
|
||||
HOST = 'https://ergast.com/api'
|
||||
SERIES = 'f1'
|
||||
|
||||
class Requester():
|
||||
"""
|
||||
@ -124,7 +124,7 @@ class Requester():
|
||||
""" Takes values to run the request and return a dict """
|
||||
url_tmpl = URITemplate('https://ergast.com/api{/series}{/season}{/round}'
|
||||
'{/criteria*}{/resource}{/value}.json{?limit,offset}')
|
||||
url = url_tmpl.expand(host=host, series=series,
|
||||
url = url_tmpl.expand(host=HOST, series=SERIES,
|
||||
season=season, round=round,
|
||||
criteria=criteria, resource=resource,
|
||||
value=value, limit=limit, offset=offset)
|
||||
|
Reference in New Issue
Block a user