globe-server 0.0.30__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.
Files changed (65) hide show
  1. globe_server-0.0.30/LICENSE +21 -0
  2. globe_server-0.0.30/PKG-INFO +259 -0
  3. globe_server-0.0.30/README.md +210 -0
  4. globe_server-0.0.30/pyproject.toml +86 -0
  5. globe_server-0.0.30/setup.cfg +4 -0
  6. globe_server-0.0.30/src/globe_server/__init__.py +5 -0
  7. globe_server-0.0.30/src/globe_server/api/__init__.py +22 -0
  8. globe_server-0.0.30/src/globe_server/api/media.py +191 -0
  9. globe_server-0.0.30/src/globe_server/api/motor.py +44 -0
  10. globe_server-0.0.30/src/globe_server/api/network.py +73 -0
  11. globe_server-0.0.30/src/globe_server/api/playback.py +59 -0
  12. globe_server-0.0.30/src/globe_server/api/playlist.py +182 -0
  13. globe_server-0.0.30/src/globe_server/api/settings.py +67 -0
  14. globe_server-0.0.30/src/globe_server/api/status.py +62 -0
  15. globe_server-0.0.30/src/globe_server/api/update.py +254 -0
  16. globe_server-0.0.30/src/globe_server/api/version.py +39 -0
  17. globe_server-0.0.30/src/globe_server/api/websocket.py +169 -0
  18. globe_server-0.0.30/src/globe_server/config.py +83 -0
  19. globe_server-0.0.30/src/globe_server/db/__init__.py +5 -0
  20. globe_server-0.0.30/src/globe_server/db/broadcast_queue.py +106 -0
  21. globe_server-0.0.30/src/globe_server/db/database.py +214 -0
  22. globe_server-0.0.30/src/globe_server/db/db_events.py +75 -0
  23. globe_server-0.0.30/src/globe_server/db/events.py +115 -0
  24. globe_server-0.0.30/src/globe_server/db/orm.py +154 -0
  25. globe_server-0.0.30/src/globe_server/db/schemas.py +199 -0
  26. globe_server-0.0.30/src/globe_server/hardware/esp32_client.py +293 -0
  27. globe_server-0.0.30/src/globe_server/hardware/server_hardware.py +89 -0
  28. globe_server-0.0.30/src/globe_server/main.py +274 -0
  29. globe_server-0.0.30/src/globe_server/models/__init__.py +5 -0
  30. globe_server-0.0.30/src/globe_server/models/status.py +31 -0
  31. globe_server-0.0.30/src/globe_server/network_manager/mdns_manager.py +123 -0
  32. globe_server-0.0.30/src/globe_server/network_manager/models.py +61 -0
  33. globe_server-0.0.30/src/globe_server/network_manager/network_fsm.py +595 -0
  34. globe_server-0.0.30/src/globe_server/network_manager/network_service.py +75 -0
  35. globe_server-0.0.30/src/globe_server/network_manager/platform/__init__.py +51 -0
  36. globe_server-0.0.30/src/globe_server/network_manager/platform/base_network.py +52 -0
  37. globe_server-0.0.30/src/globe_server/network_manager/platform/linux_network.py +184 -0
  38. globe_server-0.0.30/src/globe_server/network_manager/platform/windows_network.py +288 -0
  39. globe_server-0.0.30/src/globe_server/playback/event_emitter.py +51 -0
  40. globe_server-0.0.30/src/globe_server/playback/media_player.py +177 -0
  41. globe_server-0.0.30/src/globe_server/playback/media_services/__init__.py +11 -0
  42. globe_server-0.0.30/src/globe_server/playback/media_services/earth_viz_service.py +111 -0
  43. globe_server-0.0.30/src/globe_server/playback/media_services/media_window.py +308 -0
  44. globe_server-0.0.30/src/globe_server/playback/media_services/vlc_service.py +194 -0
  45. globe_server-0.0.30/src/globe_server/playback/playback_context.py +369 -0
  46. globe_server-0.0.30/src/globe_server/playback/playback_fsm.py +513 -0
  47. globe_server-0.0.30/src/globe_server/playback/playback_service.py +57 -0
  48. globe_server-0.0.30/src/globe_server/playback/playback_state.py +100 -0
  49. globe_server-0.0.30/src/globe_server/playback/playback_tracker.py +167 -0
  50. globe_server-0.0.30/src/globe_server/setup.py +170 -0
  51. globe_server-0.0.30/src/globe_server/static/index-2RLu-Oe0.js +73 -0
  52. globe_server-0.0.30/src/globe_server/static/index-DX6Xxgpy.css +1 -0
  53. globe_server-0.0.30/src/globe_server/static/index.html +14 -0
  54. globe_server-0.0.30/src/globe_server/static/vite.svg +1 -0
  55. globe_server-0.0.30/src/globe_server/tools/espota.py +325 -0
  56. globe_server-0.0.30/src/globe_server/utils/__init__.py +0 -0
  57. globe_server-0.0.30/src/globe_server/utils/eventbus.py +75 -0
  58. globe_server-0.0.30/src/globe_server/utils/files.py +193 -0
  59. globe_server-0.0.30/src/globe_server/utils/uart.py +39 -0
  60. globe_server-0.0.30/src/globe_server.egg-info/PKG-INFO +259 -0
  61. globe_server-0.0.30/src/globe_server.egg-info/SOURCES.txt +63 -0
  62. globe_server-0.0.30/src/globe_server.egg-info/dependency_links.txt +1 -0
  63. globe_server-0.0.30/src/globe_server.egg-info/entry_points.txt +3 -0
  64. globe_server-0.0.30/src/globe_server.egg-info/requires.txt +25 -0
  65. globe_server-0.0.30/src/globe_server.egg-info/top_level.txt +1 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Edward Catley
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,259 @@
1
+ Metadata-Version: 2.4
2
+ Name: globe-server
3
+ Version: 0.0.30
4
+ Summary: Globe Server Backend - Webserver control of Globe
5
+ Author-email: Edward Catley <edward.catley@catleytech.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/edcatley/Globe-Software
8
+ Project-URL: Bug Reports, https://github.com/edcatley/Globe-Software/issues
9
+ Project-URL: Source, https://github.com/edcatley/Globe-Software
10
+ Keywords: globe,visualization,server,fastapi,interactive
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.8
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Operating System :: OS Independent
19
+ Classifier: Topic :: Multimedia :: Graphics :: 3D Modeling
20
+ Classifier: Topic :: Scientific/Engineering :: Visualization
21
+ Requires-Python: >=3.8
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: fastapi>=0.112.0
25
+ Requires-Dist: uvicorn[standard]>=0.30.5
26
+ Requires-Dist: pydantic>=2.8.2
27
+ Requires-Dist: python-multipart>=0.0.9
28
+ Requires-Dist: psutil>=5.8.0
29
+ Requires-Dist: requests>=2.31.0
30
+ Requires-Dist: aiofiles>=23.2.1
31
+ Requires-Dist: aiosqlite>=0.19.0
32
+ Requires-Dist: pyserial>=3.5
33
+ Requires-Dist: python-vlc>=3.0.20000
34
+ Requires-Dist: websockets>=12.0
35
+ Requires-Dist: zeroconf>=0.39.4
36
+ Requires-Dist: aiohttp>=3.9.0
37
+ Requires-Dist: numpy>=1.26.0
38
+ Requires-Dist: sqlalchemy>=2.0.0
39
+ Requires-Dist: PyQt5>=5.15.0
40
+ Requires-Dist: PyQtWebEngine>=5.15.0
41
+ Requires-Dist: earth-viz
42
+ Provides-Extra: dev
43
+ Requires-Dist: pytest>=7.0; extra == "dev"
44
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
45
+ Requires-Dist: black>=22.0; extra == "dev"
46
+ Requires-Dist: flake8>=5.0; extra == "dev"
47
+ Requires-Dist: mypy>=1.0; extra == "dev"
48
+ Dynamic: license-file
49
+
50
+ # Globe Software
51
+
52
+ Complete interactive globe visualization system with hardware control, media playback, and web interface.
53
+
54
+ ## Overview
55
+
56
+ Globe Software is a complete system for controlling and visualizing content on a physical rotating globe display. This package includes both the FastAPI backend server and the React web interface as static files.
57
+
58
+ WARNING: This package is designed to be used on the Globe platform hardware - use on other systems may result in unexpected behaviour like forced network disconnects.
59
+
60
+ ## Features
61
+
62
+ - **Web Interface**: React-based UI for controlling the globe (served as static files)
63
+ - **FastAPI Backend**: High-performance async web server with REST API
64
+ - **Globe Visualization**: Real-time 3D globe rendering with earth-viz
65
+ - **Media Management**: Upload and manage video/image content with playlist support
66
+ - **Hardware Control**: Interface with ESP32 (motor) and FPGA (display) hardware
67
+ - **Network Management**: WiFi configuration, network switching, and access point mode
68
+ - **Automatic Updates**: Online (PyPI) and offline (.whl) update support
69
+ - **Real-time Communication**: WebSocket support for live status updates
70
+
71
+ ## Installation
72
+
73
+ ### Quick Install
74
+ ```bash
75
+ pip install globe-server-backend
76
+ ```
77
+
78
+ ### Initial Setup
79
+ After installation, run the setup wizard to configure the system:
80
+ ```bash
81
+ globe-server-setup
82
+ ```
83
+
84
+ This will:
85
+ - Create the `~/.globe-server/` directory structure
86
+ - Download required static images for visualization
87
+ - Prompt for configuration (ESP32 API key, WiFi credentials, etc.)
88
+
89
+ ### Production Deployment (Raspberry Pi)
90
+
91
+ For production deployment on Raspberry Pi, see the [installation guide](https://github.com/edcatley/Globe-Software/blob/main/INSTALL.md) which covers:
92
+ - Creating the installation directory and virtual environment
93
+ - Installing as a systemd service
94
+ - Automatic startup and update management
95
+
96
+ ## Usage
97
+
98
+ ### Starting the Server
99
+ ```bash
100
+ # Start the server
101
+ globe-server
102
+ ```
103
+
104
+ The server will start on `http://localhost:8000` and serve:
105
+ - Web interface at `http://localhost:8000/`
106
+ - API documentation at `http://localhost:8000/docs`
107
+ - Alternative API docs at `http://localhost:8000/redoc`
108
+
109
+ ### Accessing the Web Interface
110
+
111
+ Once the server is running, open your browser to:
112
+ - `http://localhost:8000` (local access)
113
+ - `http://<raspberry-pi-ip>:8000` (remote access)
114
+
115
+ The web interface provides:
116
+ - Media upload and playlist management
117
+ - Globe visualization controls
118
+ - Motor speed and rotation control
119
+ - Network and WiFi configuration
120
+ - System settings and firmware updates
121
+
122
+ ### Command Line Options
123
+ ```bash
124
+ # Start with default settings
125
+ globe-server
126
+
127
+ # Or use uvicorn directly for custom configuration
128
+ uvicorn globe_server.main:app --host 0.0.0.0 --port 8000 --reload
129
+ ```
130
+
131
+ ## Configuration
132
+
133
+ The server stores configuration and data in `~/.globe-server/`:
134
+
135
+ - `.env` - Environment variables (API keys, WiFi credentials)
136
+ - `globe.db` - SQLite database
137
+ - `media/` - Uploaded media files
138
+ - `updates/` - Software update packages (.whl files)
139
+ - `logs/` - Application logs
140
+
141
+ Key configuration settings (from `globe_server.config`):
142
+ - `GLOBE_DATA_DIR`: `~/.globe-server` (base directory)
143
+ - `GLOBE_MEDIA_DIRECTORY`: Media storage location
144
+ - `UPDATE_DIRECTORY`: Software update packages
145
+ - `MOTOR_RPM`: Default motor rotation speed
146
+ - `ESP32_API_KEY`: Authentication for ESP32 communication
147
+
148
+ ## System Architecture
149
+
150
+ ```
151
+ ┌─────────────────┐
152
+ │ Web Interface │ (React - served as static files)
153
+ │ Port 8000 │
154
+ └────────┬────────┘
155
+ │ HTTP/WebSocket
156
+ ┌────────▼────────┐
157
+ │ FastAPI Server │ (Python)
158
+ │ Port 8000 │
159
+ └────┬───────┬────┘
160
+ │ │
161
+ │ └──────────┐
162
+ ┌────▼────┐ ┌──────▼──────┐
163
+ │ ESP32 │ │ FPGA │
164
+ │ (Motor) │ │ (Display) │
165
+ └─────────┘ └─────────────┘
166
+ ```
167
+
168
+ ## API Endpoints
169
+
170
+ The REST API provides programmatic access to all features:
171
+
172
+ - `/` - Web interface (static files)
173
+ - `/media/*` - Media file management and playback
174
+ - `/playlist/*` - Playlist operations
175
+ - `/motor/*` - Motor control (ESP32)
176
+ - `/status/*` - Server status and WebSocket updates
177
+ - `/settings/*` - Server configuration
178
+ - `/update/*` - Software and firmware updates (server, ESP32, FPGA)
179
+ - `/network/*` - Network and WiFi management
180
+ - `/earth-viz/*` - Globe visualization rendering
181
+
182
+ Full interactive API documentation available at `/docs` when server is running.
183
+
184
+ ## Software Updates
185
+
186
+ Globe Software supports both online and offline updates:
187
+
188
+ ### Online Updates (PyPI)
189
+ When connected to the internet, the system automatically checks for updates on startup (when using the systemd service).
190
+
191
+ ### Offline Updates
192
+ For systems without internet access:
193
+ 1. Download the update bundle (`.whl` files for the package and all dependencies)
194
+ 2. Copy all `.whl` files to `~/.globe-server/updates/`
195
+ 3. Restart the server
196
+
197
+ The startup script will automatically install from local files if PyPI is unavailable.
198
+
199
+ ## Development
200
+
201
+ ### From Source
202
+ ```bash
203
+ git clone https://github.com/edcatley/Globe-Software.git
204
+ cd Globe-Software/backend
205
+ pip install -e .[dev]
206
+ ```
207
+
208
+ ### Running Tests
209
+ ```bash
210
+ pytest
211
+ ```
212
+
213
+ ### Code Quality
214
+ ```bash
215
+ # Format code
216
+ black src/
217
+
218
+ # Type checking
219
+ mypy src/
220
+ ```
221
+
222
+ ## Links
223
+
224
+ - **GitHub Repository**: https://github.com/edcatley/Globe-Software
225
+ - **Issue Tracker**: https://github.com/edcatley/Globe-Software/issues
226
+ - **Installation Guide**: https://github.com/edcatley/Globe-Software/blob/main/INSTALL.md
227
+
228
+ ## Requirements
229
+
230
+ ### Software
231
+ - Python 3.8 or higher
232
+ - VLC media player (for video/image playback)
233
+
234
+ ### Hardware (Optional)
235
+ - Raspberry Pi (tested on Bookworm)
236
+ - ESP32 microcontroller (for motor control)
237
+ - FPGA (for display control)
238
+
239
+ The system can run without hardware for development and testing.
240
+
241
+ ### Python Dependencies
242
+ All Python dependencies are automatically installed:
243
+ - FastAPI & Uvicorn (web server)
244
+ - SQLite (database)
245
+ - VLC Python bindings (media playback)
246
+ - PyQt5 & PyQtWebEngine (visualization windows)
247
+ - earth-viz (globe rendering)
248
+ - pyserial (UART communication)
249
+ - zeroconf (network discovery)
250
+
251
+ See the [pyproject.toml](https://github.com/edcatley/Globe-Software/blob/main/backend/pyproject.toml) for the complete dependency list.
252
+
253
+ ## Author
254
+
255
+ Edward Catley (edward.catley@catleytech.com)
256
+
257
+ ## License
258
+
259
+ MIT License - see [LICENSE](https://github.com/edcatley/Globe-Software/blob/main/backend/LICENSE) for details
@@ -0,0 +1,210 @@
1
+ # Globe Software
2
+
3
+ Complete interactive globe visualization system with hardware control, media playback, and web interface.
4
+
5
+ ## Overview
6
+
7
+ Globe Software is a complete system for controlling and visualizing content on a physical rotating globe display. This package includes both the FastAPI backend server and the React web interface as static files.
8
+
9
+ WARNING: This package is designed to be used on the Globe platform hardware - use on other systems may result in unexpected behaviour like forced network disconnects.
10
+
11
+ ## Features
12
+
13
+ - **Web Interface**: React-based UI for controlling the globe (served as static files)
14
+ - **FastAPI Backend**: High-performance async web server with REST API
15
+ - **Globe Visualization**: Real-time 3D globe rendering with earth-viz
16
+ - **Media Management**: Upload and manage video/image content with playlist support
17
+ - **Hardware Control**: Interface with ESP32 (motor) and FPGA (display) hardware
18
+ - **Network Management**: WiFi configuration, network switching, and access point mode
19
+ - **Automatic Updates**: Online (PyPI) and offline (.whl) update support
20
+ - **Real-time Communication**: WebSocket support for live status updates
21
+
22
+ ## Installation
23
+
24
+ ### Quick Install
25
+ ```bash
26
+ pip install globe-server-backend
27
+ ```
28
+
29
+ ### Initial Setup
30
+ After installation, run the setup wizard to configure the system:
31
+ ```bash
32
+ globe-server-setup
33
+ ```
34
+
35
+ This will:
36
+ - Create the `~/.globe-server/` directory structure
37
+ - Download required static images for visualization
38
+ - Prompt for configuration (ESP32 API key, WiFi credentials, etc.)
39
+
40
+ ### Production Deployment (Raspberry Pi)
41
+
42
+ For production deployment on Raspberry Pi, see the [installation guide](https://github.com/edcatley/Globe-Software/blob/main/INSTALL.md) which covers:
43
+ - Creating the installation directory and virtual environment
44
+ - Installing as a systemd service
45
+ - Automatic startup and update management
46
+
47
+ ## Usage
48
+
49
+ ### Starting the Server
50
+ ```bash
51
+ # Start the server
52
+ globe-server
53
+ ```
54
+
55
+ The server will start on `http://localhost:8000` and serve:
56
+ - Web interface at `http://localhost:8000/`
57
+ - API documentation at `http://localhost:8000/docs`
58
+ - Alternative API docs at `http://localhost:8000/redoc`
59
+
60
+ ### Accessing the Web Interface
61
+
62
+ Once the server is running, open your browser to:
63
+ - `http://localhost:8000` (local access)
64
+ - `http://<raspberry-pi-ip>:8000` (remote access)
65
+
66
+ The web interface provides:
67
+ - Media upload and playlist management
68
+ - Globe visualization controls
69
+ - Motor speed and rotation control
70
+ - Network and WiFi configuration
71
+ - System settings and firmware updates
72
+
73
+ ### Command Line Options
74
+ ```bash
75
+ # Start with default settings
76
+ globe-server
77
+
78
+ # Or use uvicorn directly for custom configuration
79
+ uvicorn globe_server.main:app --host 0.0.0.0 --port 8000 --reload
80
+ ```
81
+
82
+ ## Configuration
83
+
84
+ The server stores configuration and data in `~/.globe-server/`:
85
+
86
+ - `.env` - Environment variables (API keys, WiFi credentials)
87
+ - `globe.db` - SQLite database
88
+ - `media/` - Uploaded media files
89
+ - `updates/` - Software update packages (.whl files)
90
+ - `logs/` - Application logs
91
+
92
+ Key configuration settings (from `globe_server.config`):
93
+ - `GLOBE_DATA_DIR`: `~/.globe-server` (base directory)
94
+ - `GLOBE_MEDIA_DIRECTORY`: Media storage location
95
+ - `UPDATE_DIRECTORY`: Software update packages
96
+ - `MOTOR_RPM`: Default motor rotation speed
97
+ - `ESP32_API_KEY`: Authentication for ESP32 communication
98
+
99
+ ## System Architecture
100
+
101
+ ```
102
+ ┌─────────────────┐
103
+ │ Web Interface │ (React - served as static files)
104
+ │ Port 8000 │
105
+ └────────┬────────┘
106
+ │ HTTP/WebSocket
107
+ ┌────────▼────────┐
108
+ │ FastAPI Server │ (Python)
109
+ │ Port 8000 │
110
+ └────┬───────┬────┘
111
+ │ │
112
+ │ └──────────┐
113
+ ┌────▼────┐ ┌──────▼──────┐
114
+ │ ESP32 │ │ FPGA │
115
+ │ (Motor) │ │ (Display) │
116
+ └─────────┘ └─────────────┘
117
+ ```
118
+
119
+ ## API Endpoints
120
+
121
+ The REST API provides programmatic access to all features:
122
+
123
+ - `/` - Web interface (static files)
124
+ - `/media/*` - Media file management and playback
125
+ - `/playlist/*` - Playlist operations
126
+ - `/motor/*` - Motor control (ESP32)
127
+ - `/status/*` - Server status and WebSocket updates
128
+ - `/settings/*` - Server configuration
129
+ - `/update/*` - Software and firmware updates (server, ESP32, FPGA)
130
+ - `/network/*` - Network and WiFi management
131
+ - `/earth-viz/*` - Globe visualization rendering
132
+
133
+ Full interactive API documentation available at `/docs` when server is running.
134
+
135
+ ## Software Updates
136
+
137
+ Globe Software supports both online and offline updates:
138
+
139
+ ### Online Updates (PyPI)
140
+ When connected to the internet, the system automatically checks for updates on startup (when using the systemd service).
141
+
142
+ ### Offline Updates
143
+ For systems without internet access:
144
+ 1. Download the update bundle (`.whl` files for the package and all dependencies)
145
+ 2. Copy all `.whl` files to `~/.globe-server/updates/`
146
+ 3. Restart the server
147
+
148
+ The startup script will automatically install from local files if PyPI is unavailable.
149
+
150
+ ## Development
151
+
152
+ ### From Source
153
+ ```bash
154
+ git clone https://github.com/edcatley/Globe-Software.git
155
+ cd Globe-Software/backend
156
+ pip install -e .[dev]
157
+ ```
158
+
159
+ ### Running Tests
160
+ ```bash
161
+ pytest
162
+ ```
163
+
164
+ ### Code Quality
165
+ ```bash
166
+ # Format code
167
+ black src/
168
+
169
+ # Type checking
170
+ mypy src/
171
+ ```
172
+
173
+ ## Links
174
+
175
+ - **GitHub Repository**: https://github.com/edcatley/Globe-Software
176
+ - **Issue Tracker**: https://github.com/edcatley/Globe-Software/issues
177
+ - **Installation Guide**: https://github.com/edcatley/Globe-Software/blob/main/INSTALL.md
178
+
179
+ ## Requirements
180
+
181
+ ### Software
182
+ - Python 3.8 or higher
183
+ - VLC media player (for video/image playback)
184
+
185
+ ### Hardware (Optional)
186
+ - Raspberry Pi (tested on Bookworm)
187
+ - ESP32 microcontroller (for motor control)
188
+ - FPGA (for display control)
189
+
190
+ The system can run without hardware for development and testing.
191
+
192
+ ### Python Dependencies
193
+ All Python dependencies are automatically installed:
194
+ - FastAPI & Uvicorn (web server)
195
+ - SQLite (database)
196
+ - VLC Python bindings (media playback)
197
+ - PyQt5 & PyQtWebEngine (visualization windows)
198
+ - earth-viz (globe rendering)
199
+ - pyserial (UART communication)
200
+ - zeroconf (network discovery)
201
+
202
+ See the [pyproject.toml](https://github.com/edcatley/Globe-Software/blob/main/backend/pyproject.toml) for the complete dependency list.
203
+
204
+ ## Author
205
+
206
+ Edward Catley (edward.catley@catleytech.com)
207
+
208
+ ## License
209
+
210
+ MIT License - see [LICENSE](https://github.com/edcatley/Globe-Software/blob/main/backend/LICENSE) for details
@@ -0,0 +1,86 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "globe-server"
7
+ version = "0.0.30"
8
+ authors = [
9
+ {name = "Edward Catley", email = "edward.catley@catleytech.com"},
10
+ ]
11
+ description = "Globe Server Backend - Webserver control of Globe"
12
+ readme = "README.md"
13
+ license = "MIT"
14
+ requires-python = ">=3.8"
15
+ classifiers = [
16
+ "Development Status :: 3 - Alpha",
17
+ "Intended Audience :: Developers",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.8",
20
+ "Programming Language :: Python :: 3.9",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Operating System :: OS Independent",
24
+ "Topic :: Multimedia :: Graphics :: 3D Modeling",
25
+ "Topic :: Scientific/Engineering :: Visualization",
26
+ ]
27
+ keywords = ["globe", "visualization", "server", "fastapi", "interactive"]
28
+
29
+ dependencies = [
30
+ "fastapi>=0.112.0",
31
+ "uvicorn[standard]>=0.30.5",
32
+ "pydantic>=2.8.2",
33
+ "python-multipart>=0.0.9",
34
+ "psutil>=5.8.0",
35
+ "requests>=2.31.0",
36
+ "aiofiles>=23.2.1",
37
+ "aiosqlite>=0.19.0",
38
+ "pyserial>=3.5",
39
+ "python-vlc>=3.0.20000",
40
+ "websockets>=12.0",
41
+ "zeroconf>=0.39.4",
42
+ "aiohttp>=3.9.0",
43
+ "numpy>=1.26.0",
44
+ "sqlalchemy>=2.0.0",
45
+ "PyQt5>=5.15.0",
46
+ "PyQtWebEngine>=5.15.0",
47
+ "earth-viz",
48
+ ]
49
+
50
+ [project.optional-dependencies]
51
+ dev = [
52
+ "pytest>=7.0",
53
+ "pytest-asyncio>=0.21.0",
54
+ "black>=22.0",
55
+ "flake8>=5.0",
56
+ "mypy>=1.0",
57
+ ]
58
+
59
+ [project.scripts]
60
+ globe-server = "globe_server.main:main"
61
+ globe-server-setup = "globe_server.setup:main"
62
+
63
+ [project.urls]
64
+ Homepage = "https://github.com/edcatley/Globe-Software"
65
+ "Bug Reports" = "https://github.com/edcatley/Globe-Software/issues"
66
+ "Source" = "https://github.com/edcatley/Globe-Software"
67
+
68
+ [tool.setuptools.packages.find]
69
+ where = ["src"]
70
+
71
+ [tool.setuptools.package-data]
72
+ globe_server = [
73
+ "planet_vis/resources/maps/*.jpg",
74
+ "planet_vis/resources/maps/*.png",
75
+ "static/**/*",
76
+ ]
77
+
78
+ [tool.black]
79
+ line-length = 88
80
+ target-version = ['py38']
81
+
82
+ [tool.mypy]
83
+ python_version = "3.8"
84
+ warn_return_any = true
85
+ warn_unused_configs = true
86
+ disallow_untyped_defs = true
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,5 @@
1
+ """Globe Server Backend Package"""
2
+
3
+ __version__ = "0.1.0"
4
+ __author__ = "Edward Catley"
5
+ __description__ = "Globe Server Backend - Webserver control of Globe"
@@ -0,0 +1,22 @@
1
+ from fastapi import APIRouter
2
+ from .status import router as status_router
3
+ from .media import router as media_router
4
+ from .motor import router as motor_router
5
+ from .playlist import router as playlist_router
6
+ from .playback import router as playback_router
7
+ from .update import router as update_router
8
+ from .settings import router as settings_router
9
+ from .version import router as version_router
10
+
11
+
12
+ api_router = APIRouter()
13
+
14
+ api_router.include_router(status_router)
15
+ api_router.include_router(media_router)
16
+ api_router.include_router(motor_router)
17
+ api_router.include_router(playlist_router)
18
+ api_router.include_router(playback_router)
19
+ api_router.include_router(update_router)
20
+ api_router.include_router(settings_router)
21
+ api_router.include_router(version_router)
22
+