A clean, modular Python application for syncing photos from PhotoPrism to Lychee galleries.
- Easy Configuration: Simple UI for setting up PhotoPrism and Lychee connections
- Date-based Search: Browse photos by specific dates
- Visual Photo Grid: Responsive thumbnail grid with async loading
- Album Management: Upload photos to specific Lychee albums
- Robust Download: Multiple fallback methods for photo downloading
- Clean Architecture: Modular design for easy maintenance and extension
- Clone or download the project files
- Install dependencies:
pip install -r requirements.txt
Run the application:
python main.py-
Configure Connections:
- Enter your PhotoPrism URL and credentials
- Enter your Lychee URL and credentials
- Click "Connect PhotoPrism" and "Connect Lychee"
-
Browse Photos:
- Select a date using the date picker
- Click "Search Photos" to load thumbnails
- Use "Previous Day" / "Next Day" for easy navigation
-
Upload Photos:
- Click "Select" on any photo thumbnail
- Choose a destination album (or use root album)
- Click "Upload Selected to Lychee"
-
Save Configuration:
- Click "Save Config" to persist your settings
photo_sync/
├── main.py # Main application entry point
├── config.py # Configuration management
├── photoprism_client.py # PhotoPrism API client
├── lychee_client.py # Lychee API client
├── photo_grid.py # Photo grid widget
├── requirements.txt # Python dependencies
└── README.md # This file
The application follows a clean, modular architecture:
main.py: Main application class and UI setupconfig.py: Configuration management with dataclassesphotoprism_client.py: Handles all PhotoPrism API interactionslychee_client.py: Manages Lychee API communicationphoto_grid.py: Reusable photo grid widget with async thumbnail loading
✅ Separation of Concerns: Each module has a single responsibility ✅ Type Safety: Uses type hints throughout ✅ Error Handling: Comprehensive error handling with user-friendly messages ✅ Async Loading: Non-blocking thumbnail loading ✅ Responsive Design: Grid adapts to window size ✅ Clean APIs: Well-defined interfaces between components ✅ Configuration Management: Structured config with validation
- Python 3.7+
- tkinter (usually included with Python)
- requests
- Pillow (PIL)
- requests-toolbelt (optional, for better upload handling)
- Ensure URLs don't have trailing slashes
- Check that credentials are correct
- Verify network connectivity to both services
- Ensure you're connected to both services
- Check that the selected album exists
- Verify file permissions and sizes
- Some photos may not have thumbnails available
- Check PhotoPrism's file indexing status
- Verify file formats are supported
- Batch upload functionality
- Progress bars for long operations
- Photo metadata preservation
- Automatic daily sync scheduling
- Support for additional photo services