-
-
Notifications
You must be signed in to change notification settings - Fork 277
/
Copy path__init__.py
118 lines (85 loc) · 2.61 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
"""
.. _GeneralFunctions:
General Functions - :mod:`fastf1`
=================================
.. currentmodule:: fastf1
Accessing Events and Sessions
-----------------------------
When using FastF1, you usually start by loading an event or a
session. This can be done with one of the following functions:
.. autosummary::
fastf1.get_session
fastf1.get_testing_session
fastf1.get_event
fastf1.get_events_remaining
fastf1.get_testing_session
fastf1.get_event_schedule
.. _requests-and-caching:
Requests and Caching
--------------------
.. automodule::
fastf1.req
.. currentmodule:: fastf1
General Functions - API Reference
---------------------------------
Event and Session API
.....................
.. autofunction:: get_session
.. autofunction:: get_testing_session
.. autofunction:: get_event
.. autofunction:: get_events_remaining
.. autofunction:: get_testing_event
.. autofunction:: get_event_schedule
Cache API
.........
.. autoclass:: Cache
:members:
enable_cache,
clear_cache,
get_cache_info,
disabled,
set_disabled,
set_enabled,
offline_mode
:autosummary:
.. autoclass:: RateLimitExceededError
Configure Logging Verbosity
...........................
All parts of FastF1 generally log at the log level 'INFO'.
The reason for this is that many data loading processes take multiple
seconds to complete. Logging is used to give progress information here as well
as for showing warnings and non-terminal errors.
The logging level for FastF1 can be easily customized::
import fastf1
fastf1.set_log_level('WARNING')
# ... your code here ... #
The available levels are (in order of increasing severity): DEBUG, INFO,
WARNING, ERROR and CRITICAL.
.. autofunction:: set_log_level
For more information see :ref:`logging`.
"""
try:
from . import _version
except ImportError:
_version = None
__version__ = getattr(_version, 'version', '0.0+UNKNOWN')
__version_tuple__ = getattr(_version, 'version_tuple', (0, 0, '+UNKNOWN'))
if __version_tuple__:
# create a short version containing only the public version
__version_short__ = ".".join(str(digit) for digit in __version_tuple__
if str(digit).isnumeric())
else:
__version_short__ = __version__
from fastf1.events import get_session # noqa: F401
from fastf1.events import ( # noqa: F401
get_event,
get_event_schedule,
get_events_remaining,
get_testing_event,
get_testing_session
)
from fastf1.logger import set_log_level # noqa: F401
from fastf1.req import ( # noqa: F401
Cache,
RateLimitExceededError
)