Globe Server Backend - Webserver control of Globe
Project description
Globe Software
Complete interactive globe visualization system with hardware control, media playback, and web interface.
Overview
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.
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.
Features
- Web Interface: React-based UI for controlling the globe (served as static files)
- FastAPI Backend: High-performance async web server with REST API
- Globe Visualization: Real-time 3D globe rendering with earth-viz
- Media Management: Upload and manage video/image content with playlist support
- Hardware Control: Interface with ESP32 (motor) and FPGA (display) hardware
- Network Management: WiFi configuration, network switching, and access point mode
- Automatic Updates: Online (PyPI) and offline (.whl) update support
- Real-time Communication: WebSocket support for live status updates
Installation
Quick Install
pip install globe-server
Initial Setup
After installation, run the setup wizard to configure the system:
globe-server-setup
This will:
- Create the
~/.globe-server/directory structure - Download required static images for visualization
- Prompt for configuration (ESP32 API key, WiFi credentials, etc.)
Production Deployment (Raspberry Pi)
For production deployment on Raspberry Pi, see the installation guide which covers:
- Creating the installation directory and virtual environment
- Installing as a systemd service
- Automatic startup and update management
Usage
Starting the Server
# Start the server
globe-server
The server will start on http://localhost:8000 and serve:
- Web interface at
http://localhost:8000/ - API documentation at
http://localhost:8000/docs - Alternative API docs at
http://localhost:8000/redoc
Accessing the Web Interface
Once the server is running, open your browser to:
http://localhost:8000(local access)http://<raspberry-pi-ip>:8000(remote access)
The web interface provides:
- Media upload and playlist management
- Globe visualization controls
- Motor speed and rotation control
- Network and WiFi configuration
- System settings and firmware updates
Command Line Options
# Start with default settings
globe-server
# Or use uvicorn directly for custom configuration
uvicorn globe_server.main:app --host 0.0.0.0 --port 8000 --reload
Configuration
The server stores configuration and data in ~/.globe-server/:
.env- Environment variables (API keys, WiFi credentials)globe.db- SQLite databasemedia/- Uploaded media filesupdates/- Software update packages (.whl files)logs/- Application logs
Key configuration settings (from globe_server.config):
GLOBE_DATA_DIR:~/.globe-server(base directory)GLOBE_MEDIA_DIRECTORY: Media storage locationUPDATE_DIRECTORY: Software update packagesMOTOR_RPM: Default motor rotation speedESP32_API_KEY: Authentication for ESP32 communication
System Architecture
┌─────────────────┐
│ Web Interface │ (React - served as static files)
│ Port 8000 │
└────────┬────────┘
│ HTTP/WebSocket
┌────────▼────────┐
│ FastAPI Server │ (Python)
│ Port 8000 │
└────┬───────┬────┘
│ │
│ └──────────┐
┌────▼────┐ ┌──────▼──────┐
│ ESP32 │ │ FPGA │
│ (Motor) │ │ (Display) │
└─────────┘ └─────────────┘
API Endpoints
The REST API provides programmatic access to all features:
/- Web interface (static files)/media/*- Media file management and playback/playlist/*- Playlist operations/motor/*- Motor control (ESP32)/status/*- Server status and WebSocket updates/settings/*- Server configuration/update/*- Software and firmware updates (server, ESP32, FPGA)/network/*- Network and WiFi management/earth-viz/*- Globe visualization rendering
Full interactive API documentation available at /docs when server is running.
Software Updates
Globe Software supports both online and offline updates:
Online Updates (PyPI)
When connected to the internet, the system automatically checks for updates on startup (when using the systemd service).
Offline Updates
For systems without internet access:
- Download the update bundle (
.whlfiles for the package and all dependencies) - Copy all
.whlfiles to~/.globe-server/updates/ - Restart the server
The startup script will automatically install from local files if PyPI is unavailable.
Development
From Source
git clone https://github.com/edcatley/Globe-Software.git
cd Globe-Software/backend
pip install -e .[dev]
Running Tests
pytest
Code Quality
# Format code
black src/
# Type checking
mypy src/
Links
- GitHub Repository: https://github.com/edcatley/Globe-Software
- Issue Tracker: https://github.com/edcatley/Globe-Software/issues
- Installation Guide: https://github.com/edcatley/Globe-Software/blob/main/INSTALL.md
Requirements
Software
- Python 3.8 or higher
- VLC media player (for video/image playback)
Hardware (Optional)
- Raspberry Pi (tested on Bookworm)
- ESP32 microcontroller (for motor control)
- FPGA (for display control)
The system can run without hardware for development and testing.
Python Dependencies
All Python dependencies are automatically installed:
- FastAPI & Uvicorn (web server)
- SQLite (database)
- VLC Python bindings (media playback)
- PyQt5 & PyQtWebEngine (visualization windows)
- earth-viz (globe rendering)
- pyserial (UART communication)
- zeroconf (network discovery)
See the pyproject.toml for the complete dependency list.
Author
Edward Catley (edward.catley@catleytech.com)
License
MIT License - see LICENSE for details
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file globe_server-0.0.38.tar.gz.
File metadata
- Download URL: globe_server-0.0.38.tar.gz
- Upload date:
- Size: 164.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9035f5d5b24bcb78157d68c88e9d3d73723abf9380206432e2233f25a7ace2f7
|
|
| MD5 |
cc8a83c4b392169215f0e6bb0783daa4
|
|
| BLAKE2b-256 |
3055a640beebf895bd91d3b23f3c59dd7c9c54d513581c243223e79db3c6ced3
|
Provenance
The following attestation bundles were made for globe_server-0.0.38.tar.gz:
Publisher:
release.yml on edcatley/Globe-Software
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
globe_server-0.0.38.tar.gz -
Subject digest:
9035f5d5b24bcb78157d68c88e9d3d73723abf9380206432e2233f25a7ace2f7 - Sigstore transparency entry: 1381177754
- Sigstore integration time:
-
Permalink:
edcatley/Globe-Software@31b2bb0e32eb1f5a9d186d7ca7515df073e65320 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/edcatley
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@31b2bb0e32eb1f5a9d186d7ca7515df073e65320 -
Trigger Event:
push
-
Statement type:
File details
Details for the file globe_server-0.0.38-py3-none-any.whl.
File metadata
- Download URL: globe_server-0.0.38-py3-none-any.whl
- Upload date:
- Size: 181.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ba3d71ce312e91ee4857d52e4f5739cb5467e8cf6144c1bba66560ee38b10e1
|
|
| MD5 |
a2197eca1d63d07465e93b8b92dd16b7
|
|
| BLAKE2b-256 |
3a9c8d893cd7bb155e390168aceef2113d5a738f64bbdbe6db3dbc587ce1a9e4
|
Provenance
The following attestation bundles were made for globe_server-0.0.38-py3-none-any.whl:
Publisher:
release.yml on edcatley/Globe-Software
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
globe_server-0.0.38-py3-none-any.whl -
Subject digest:
6ba3d71ce312e91ee4857d52e4f5739cb5467e8cf6144c1bba66560ee38b10e1 - Sigstore transparency entry: 1381177871
- Sigstore integration time:
-
Permalink:
edcatley/Globe-Software@31b2bb0e32eb1f5a9d186d7ca7515df073e65320 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/edcatley
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@31b2bb0e32eb1f5a9d186d7ca7515df073e65320 -
Trigger Event:
push
-
Statement type: