A modern, feature-rich digital clock application built with Python and tkinter, featuring multiple clock styles, alarms with custom sounds, timezone support, and much more.
- Digital Clock: Classic digital display with customizable fonts
- Analog Clock: Traditional clock face with moving hands
- Binary Clock: Geek-friendly binary time representation
- Text Clock: Written time in natural language ("Quarter past three")
- Add/remove/toggle multiple alarms
- Custom sound selection (default, beep, chime, bell)
- Voice announcements for alarms
- Visual and system notifications
- Persistent alarm settings
- High-precision stopwatch with lap times
- Countdown timer with custom durations
- Visual and audio completion notifications
- Separate interfaces for stopwatch and timer
- Support for major world timezones
- Real-time timezone switching
- Local and UTC time display
- Timezone-aware date formatting
- Light and dark theme support
- Multiple font families and sizes
- Style-specific theme configurations
- Consistent theming across all clock styles
- Automatic settings saving
- JSON-based configuration storage
- Import/export settings capability
- Reset to defaults functionality
- Minimize to system tray
- Quick access menu
- Tray icon with current time tooltip
- System notifications
- Hourly time announcements
- Alarm voice notifications
- Configurable voice rate and volume
- Manual time speaking
- Multiple time formats (12/24 hour)
- Show/hide seconds and date
- Responsive and resizable interface
- Comprehensive keyboard shortcuts
- Cross-platform compatibility
- Real-time weather display
- Configurable location and API integration
- Temperature, humidity, and weather conditions
- 3-day weather forecast
- Automatic weather updates
- Support for multiple calendar sources
- Upcoming events display
- Automatic calendar sync
- Event notifications and reminders
- Integration with popular calendar services
- Automatic monitor detection
- Easy monitor switching
- Per-monitor window positioning
- Primary and secondary monitor support
- Full-screen mode on any monitor
- Extensible plugin architecture
- Enable/disable plugins dynamically
- Custom feature development support
- Plugin management interface
- Community plugin support
- HTTP API for mobile integration
- Remote clock control
- Mobile alarm management
- Settings synchronization
- Real-time status updates
- Cross-device settings synchronization
- Multiple cloud provider support
- Automatic backup and restore
- Secure encrypted sync
- Conflict resolution
- Flexible scheduling system
- Daily, weekly, monthly schedules
- Custom action support
- Multiple notification types
- Recurring event management
- Python 3.6 or higher
- tkinter (usually included with Python)
- Clone the repository:
git clone https://github.com/Chauhan-Mukesh/Python-Clock.git
cd Python-Clock- Install dependencies:
pip install -r requirements.txt- Run the enhanced application:
python main.pyThe enhanced version includes additional dependencies for advanced features:
pygame>=2.5.0 # For alarm sounds and audio
pyttsx3>=2.90 # For voice announcements
pytz>=2023.3 # For timezone support
plyer>=2.1.0 # For system notifications
pystray>=0.19.0 # For advanced system tray
Pillow>=10.0.0 # For system tray icons
Note: Audio and voice features will gracefully degrade if dependencies are not available.
- Launch the application to see the current time and date
- The clock updates automatically with sub-second precision
- Use control buttons or menu options to customize the display
- Style Button: Cycle through available clock styles
- View Menu: Select specific clock style
- Each style supports both light and dark themes
- Click "Alarms" button or use Tools → Alarm Manager
- Add new alarms with custom times, labels, and sounds
- Toggle alarms on/off or remove them
- Test alarm sounds before setting
- Click "Stopwatch" button or use Tools → Stopwatch & Timer
- Use Start/Pause/Reset for stopwatch functionality
- Add lap times during stopwatch operation
- Set countdown timers with custom durations
- Access via File → Settings or system tray menu
- Configure display, voice, and system preferences
- Settings are automatically saved
- Reset to defaults option available
- Access via Tools → Weather
- Configure API key and location
- View current conditions and forecast
- Automatic updates every 10 minutes
- Access via Tools → Calendar
- Add calendar sources (Google, Outlook, etc.)
- View upcoming events
- Sync calendars manually or automatically
- Access via Tools → Multi-Monitor
- Detect available monitors
- Move clock to different monitors
- Configure per-monitor settings
- Access via Tools → Plugins
- Load custom plugins from plugins folder
- Enable/disable plugins as needed
- Develop custom features
- Access via Tools → Mobile Companion
- Start HTTP API server
- Connect mobile apps to API endpoints
- Control clock remotely
- Access via Tools → Cloud Sync
- Configure sync provider and credentials
- Upload/download settings
- Automatic synchronization
- Access via Tools → Advanced Scheduler
- Create custom schedules
- Set recurring events
- Configure notifications and actions
- F1: Show help/about
- F11: Toggle fullscreen
- Ctrl+S: Open settings
- Ctrl+A: Open alarm manager
- Ctrl+T: Open stopwatch/timer
- Ctrl+Q: Quit application
Run the comprehensive test suite:
# Run original tests
python tests/run_tests.py
# Run enhanced feature tests
python tests/run_enhanced_tests.pyThe test suite includes:
- Unit tests for all core functionality
- Enhanced feature testing
- Settings persistence tests
- Clock style validation
- Timezone handling tests
- Error handling and edge cases
Python-Clock/
├── src/
│ ├── __init__.py
│ ├── clock.py # Original clock implementation
│ ├── enhanced_clock.py # Enhanced clock with all features
│ ├── features.py # Alarm, stopwatch, timezone, voice, weather, etc.
│ ├── settings.py # Settings persistence
│ ├── clock_styles.py # Multiple clock face styles
│ ├── system_tray.py # System tray integration
│ ├── mobile_companion.py # Mobile companion HTTP API
│ ├── plugins/ # Plugin directory
│ │ └── README.md # Plugin development guide
│ └── sounds/ # Alarm sound files
├── tests/
│ ├── test_clock.py # Original tests
│ ├── test_features.py # Enhanced feature tests
│ ├── test_enhanced_features.py # Comprehensive enhanced tests
│ ├── run_tests.py # Test runner
│ └── run_enhanced_tests.py # Enhanced test runner
├── main.py # Application entry point
├── demo_enhanced.py # Feature demonstration
├── requirements.txt # Project dependencies
└── README.md # This file
Run the feature demonstration:
python demo_enhanced.pyThis will showcase all enhanced features including:
- Settings management
- Multiple clock styles
- Timezone support
- Alarm functionality
- Stopwatch and timer operations
- System tray integration
- Voice and sound management
- Theme and styling options
The project follows Python best practices:
- PEP 8 style guidelines
- Type hints where appropriate
- Comprehensive docstrings
- Error handling with graceful degradation
- Modular architecture with separation of concerns
- Enhanced Features: Modular design with feature managers
- Settings System: JSON-based persistent configuration
- Clock Styles: Plugin-like architecture for different displays
- Cross-Platform: Graceful handling of platform-specific features
- Error Resilience: Features degrade gracefully when dependencies unavailable
The application is designed for easy extension:
- New Clock Styles: Inherit from
ClockStyleclass - New Sound Formats: Extend
SoundManagerclass - New Themes: Add theme configurations to styles
- New Settings: Update
SettingsManagerdefault settings
Note: Screenshots show various clock styles and features
- Clean, modern digital display
- Customizable fonts and colors
- 12/24 hour format support
- Traditional clock face
- Smooth second hand animation
- Theme-aware styling
- Binary representation of time
- Educational and fun
- LED-style visual indicators
- Natural language time display
- "Quarter past three" format
- Readable and accessible
- Multiple alarm support
- Custom sounds and labels
- Voice announcement options
- Comprehensive configuration
- Theme and font customization
- Feature enable/disable toggles
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes with tests
- Ensure all tests pass
- Update documentation as needed
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is open source and available under the MIT License.
- Weather integration
- Calendar synchronization
- Multiple monitor support
- Plugin system for custom features
- Mobile companion app
- Cloud settings sync
- Advanced scheduling features
- ✅ Weather integration with API support
- ✅ Calendar synchronization system
- ✅ Multiple monitor support and detection
- ✅ Plugin system for custom features
- ✅ Mobile companion app with HTTP API
- ✅ Cloud settings sync functionality
- ✅ Advanced scheduling features
- ✅ Enhanced documentation and examples
- ✅ Alarm functionality with custom sounds
- ✅ Stopwatch and countdown timer
- ✅ Multiple timezone support
- ✅ Customizable themes and fonts
- ✅ Settings persistence
- ✅ System tray integration
- ✅ Voice announcements
- ✅ Multiple clock faces/styles
- ✅ Enhanced testing suite
- ✅ Comprehensive documentation
- Basic digital clock functionality
- 12/24 hour format toggle
- Light/dark theme support
- Clean, modern UI
If you encounter any issues or have suggestions:
- Check existing issues in the GitHub repository
- Create a new issue with detailed information
- Include steps to reproduce any bugs
- Provide system information (OS, Python version)
- Include relevant log output
- Built with Python and tkinter
- Uses pygame for sound functionality
- Voice powered by pyttsx3
- Timezone support via pytz
- System integration with plyer and pystray
- Icon support with Pillow
Enhanced Python Digital Clock - Making time beautiful and functional! ⏰✨