f1-dash 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,183 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # PyCharm
156
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
+ # be added to the global gitignore or merged into this project gitignore. For a PyCharm
158
+ # project, it is recommended to ignore entire .idea directory.
159
+ .idea/
160
+
161
+ # FastF1 cache directory
162
+ fastf1_cache/
163
+ cache/
164
+
165
+ # OS generated files
166
+ .DS_Store
167
+ .DS_Store?
168
+ ._*
169
+ .Spotlight-V100
170
+ .Trashes
171
+ ehthumbs.db
172
+ Thumbs.db
173
+
174
+ # VS Code
175
+ .vscode/
176
+
177
+ # Temporary files
178
+ *.tmp
179
+ *.temp
180
+ *~
181
+
182
+ # Log files
183
+ *.log
f1_dash-0.2.0/PKG-INFO ADDED
@@ -0,0 +1,143 @@
1
+ Metadata-Version: 2.4
2
+ Name: f1-dash
3
+ Version: 0.2.0
4
+ Summary: An enhanced F1 Live Position Dashboard with telemetry data
5
+ Home-page: https://github.com/yourusername/f1-dash
6
+ Author: Your Name
7
+ Author-email: Your Name <your.email@example.com>
8
+ License: MIT
9
+ Project-URL: Homepage, https://github.com/yourusername/f1-dash
10
+ Project-URL: Repository, https://github.com/yourusername/f1-dash
11
+ Project-URL: Bug Tracker, https://github.com/yourusername/f1-dash/issues
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Requires-Python: >=3.8
22
+ Description-Content-Type: text/markdown
23
+ Requires-Dist: fastf1>=3.0.0
24
+ Requires-Dist: textual>=0.40.0
25
+ Requires-Dist: pandas>=1.5.0
26
+ Requires-Dist: rich>=13.0.0
27
+ Requires-Dist: matplotlib>=3.5.0
28
+ Requires-Dist: aioredis>=2.0.0
29
+ Requires-Dist: redis>=4.0.0
30
+ Dynamic: author
31
+ Dynamic: home-page
32
+ Dynamic: requires-python
33
+
34
+ # F1 Dashboard
35
+
36
+ An enhanced F1 Live Position Dashboard with SQLite persistence, Redis caching, and telemetry data visualization.
37
+
38
+ ## Features
39
+
40
+ - **Season Selection**: Choose from seasons 2021-2026
41
+ - **Session Types**: View FP1, FP2, FP3, Sprint, Qualifying, and Race sessions
42
+ - **SQLite Persistence**: Offline data storage for previously loaded sessions
43
+ - **Redis Caching**: Fast data retrieval with cache-aside pattern
44
+ - **Lazy-loading Telemetry**: RAM-optimized telemetry viewing for selected drivers
45
+ - **Interactive TUI**: Built with Textual for a modern terminal interface
46
+
47
+ ## Installation
48
+
49
+ ### From PyPI (Recommended)
50
+
51
+ ```bash
52
+ pip install f1-dash
53
+ ```
54
+
55
+ ### From Source
56
+
57
+ ```bash
58
+ git clone https://github.com/yourusername/f1-dash.git
59
+ cd f1-dash
60
+ pip install .
61
+ ```
62
+
63
+ ## Usage
64
+
65
+ Run the dashboard:
66
+
67
+ ```bash
68
+ f1-dash
69
+ ```
70
+
71
+ ### Controls
72
+
73
+ - **q** - Quit the application
74
+ - **r** - Refresh data
75
+ - **Tab** - Switch between Positions and Telemetry tabs
76
+
77
+ ### Features
78
+
79
+ 1. **Select Season**: Choose a season from 2021-2026
80
+ 2. **Select Event**: Pick a Grand Prix from the dropdown
81
+ 3. **Select Session**: Choose from available sessions (Practice, Qualifying, Race)
82
+ 4. **View Telemetry**: Go to Telemetry tab, select a driver, and click "Load Telemetry"
83
+
84
+ ## Environment Variables
85
+
86
+ | Variable | Description | Default |
87
+ |----------|-------------|---------|
88
+ | `F1_DASH_DB_PATH` | Path to SQLite database | `f1_data.db` |
89
+ | `REDIS_URL` | Redis connection URL | `redis://localhost:6379` |
90
+ | `REDIS_TTL` | Cache TTL in seconds | `3600` |
91
+
92
+ ## Optional: Redis Setup
93
+
94
+ For enhanced caching performance, install and run Redis:
95
+
96
+ ```bash
97
+ # Docker
98
+ docker run -d -p 6379:6379 redis:latest
99
+
100
+ # Or install locally
101
+ # Ubuntu/Debian: sudo apt install redis-server
102
+ # macOS: brew install redis && brew services start redis
103
+ ```
104
+
105
+ The app works without Redis (uses memory cache fallback).
106
+
107
+ ## Requirements
108
+
109
+ - Python 3.8 or higher
110
+ - fastf1 >= 3.0.0
111
+ - textual >= 0.40.0
112
+ - pandas >= 1.5.0
113
+ - rich >= 13.0.0
114
+ - matplotlib >= 3.5.0
115
+ - aioredis >= 2.0.0 (optional, for Redis caching)
116
+ - redis >= 4.0.0 (optional, for Redis caching)
117
+
118
+ ## Architecture
119
+
120
+ The app uses a **tiered data retrieval** system:
121
+ 1. **Redis Cache** - Fastest, 3600s TTL
122
+ 2. **SQLite Database** - Persistent local storage
123
+ 3. **FastF1 API** - Live data from Ergast/F1
124
+
125
+ Data flows: API → SQLite → Redis → UI
126
+
127
+ ## License
128
+
129
+ MIT License - see LICENSE file for details.
130
+
131
+ ## Changelog
132
+
133
+ ### v0.2.0 (2025-02-23)
134
+ - Added season selection (2021-2026)
135
+ - Added SQLite persistence layer
136
+ - Added Redis caching with cache-aside pattern
137
+ - Implemented lazy-loading telemetry for RAM optimization
138
+ - Suppressed library logging for clean TUI
139
+
140
+ ### v0.1.0 (Initial Release)
141
+ - Basic F1 dashboard with FastF1 API integration
142
+ - Telemetry viewer
143
+ - Session switching
@@ -0,0 +1,110 @@
1
+ # F1 Dashboard
2
+
3
+ An enhanced F1 Live Position Dashboard with SQLite persistence, Redis caching, and telemetry data visualization.
4
+
5
+ ## Features
6
+
7
+ - **Season Selection**: Choose from seasons 2021-2026
8
+ - **Session Types**: View FP1, FP2, FP3, Sprint, Qualifying, and Race sessions
9
+ - **SQLite Persistence**: Offline data storage for previously loaded sessions
10
+ - **Redis Caching**: Fast data retrieval with cache-aside pattern
11
+ - **Lazy-loading Telemetry**: RAM-optimized telemetry viewing for selected drivers
12
+ - **Interactive TUI**: Built with Textual for a modern terminal interface
13
+
14
+ ## Installation
15
+
16
+ ### From PyPI (Recommended)
17
+
18
+ ```bash
19
+ pip install f1-dash
20
+ ```
21
+
22
+ ### From Source
23
+
24
+ ```bash
25
+ git clone https://github.com/yourusername/f1-dash.git
26
+ cd f1-dash
27
+ pip install .
28
+ ```
29
+
30
+ ## Usage
31
+
32
+ Run the dashboard:
33
+
34
+ ```bash
35
+ f1-dash
36
+ ```
37
+
38
+ ### Controls
39
+
40
+ - **q** - Quit the application
41
+ - **r** - Refresh data
42
+ - **Tab** - Switch between Positions and Telemetry tabs
43
+
44
+ ### Features
45
+
46
+ 1. **Select Season**: Choose a season from 2021-2026
47
+ 2. **Select Event**: Pick a Grand Prix from the dropdown
48
+ 3. **Select Session**: Choose from available sessions (Practice, Qualifying, Race)
49
+ 4. **View Telemetry**: Go to Telemetry tab, select a driver, and click "Load Telemetry"
50
+
51
+ ## Environment Variables
52
+
53
+ | Variable | Description | Default |
54
+ |----------|-------------|---------|
55
+ | `F1_DASH_DB_PATH` | Path to SQLite database | `f1_data.db` |
56
+ | `REDIS_URL` | Redis connection URL | `redis://localhost:6379` |
57
+ | `REDIS_TTL` | Cache TTL in seconds | `3600` |
58
+
59
+ ## Optional: Redis Setup
60
+
61
+ For enhanced caching performance, install and run Redis:
62
+
63
+ ```bash
64
+ # Docker
65
+ docker run -d -p 6379:6379 redis:latest
66
+
67
+ # Or install locally
68
+ # Ubuntu/Debian: sudo apt install redis-server
69
+ # macOS: brew install redis && brew services start redis
70
+ ```
71
+
72
+ The app works without Redis (uses memory cache fallback).
73
+
74
+ ## Requirements
75
+
76
+ - Python 3.8 or higher
77
+ - fastf1 >= 3.0.0
78
+ - textual >= 0.40.0
79
+ - pandas >= 1.5.0
80
+ - rich >= 13.0.0
81
+ - matplotlib >= 3.5.0
82
+ - aioredis >= 2.0.0 (optional, for Redis caching)
83
+ - redis >= 4.0.0 (optional, for Redis caching)
84
+
85
+ ## Architecture
86
+
87
+ The app uses a **tiered data retrieval** system:
88
+ 1. **Redis Cache** - Fastest, 3600s TTL
89
+ 2. **SQLite Database** - Persistent local storage
90
+ 3. **FastF1 API** - Live data from Ergast/F1
91
+
92
+ Data flows: API → SQLite → Redis → UI
93
+
94
+ ## License
95
+
96
+ MIT License - see LICENSE file for details.
97
+
98
+ ## Changelog
99
+
100
+ ### v0.2.0 (2025-02-23)
101
+ - Added season selection (2021-2026)
102
+ - Added SQLite persistence layer
103
+ - Added Redis caching with cache-aside pattern
104
+ - Implemented lazy-loading telemetry for RAM optimization
105
+ - Suppressed library logging for clean TUI
106
+
107
+ ### v0.1.0 (Initial Release)
108
+ - Basic F1 dashboard with FastF1 API integration
109
+ - Telemetry viewer
110
+ - Session switching
f1_dash-0.2.0/f1.py ADDED
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0"
@@ -0,0 +1,11 @@
1
+ """
2
+ F1 Dashboard - An enhanced F1 Live Position Dashboard with telemetry data.
3
+ """
4
+
5
+ __version__ = "0.2.1"
6
+
7
+ from .main import main, F1Dashboard, AVAILABLE_SEASONS
8
+ from .database_manager import DatabaseManager, get_db_manager
9
+ from .cache_manager import CacheManager, get_cache_manager
10
+
11
+ __all__ = ["main", "F1Dashboard", "AVAILABLE_SEASONS", "DatabaseManager", "get_db_manager", "CacheManager", "get_cache_manager"]