A real-time sports match monitoring system that tracks live FIFA games, scores, and goal events using SQLite database (no external database installation required).
- Real-time monitoring: Live tracking of FIFA matches and scores
- Goal detection: Automatic detection and logging of goals with timestamps
- SQLite database: Local database storage (no MySQL installation needed)
- Thread management: Optimized concurrent monitoring of multiple matches
- Graceful shutdown: Proper resource cleanup and signal handling
- Comprehensive logging: Detailed logging for debugging and monitoring
- Error resilience: Robust error handling and retry mechanisms
- Python 3.7+
requestslibrary- SQLite (included with Python)
- Clone the repository:
git clone <repository-url>
cd AURA-Py- Install dependencies:
pip install -r requirements.txt- Run the test suite (optional):
python3 test_system.py- Start monitoring:
python3 Aura.pyThis version includes several optimizations over the original:
- Database: Switched from MySQL to SQLite (no installation required)
- Connection pooling: Singleton pattern for database connections
- Caching: LRU cache for league filtering
- Better threading: Improved thread management and cleanup
- Error handling: Comprehensive error handling with logging
- Performance: Reduced redundant database queries and API calls
- Resource management: Proper cleanup and graceful shutdown
The SQLite database automatically creates a matches table with the following structure:
CREATE TABLE matches (
id INTEGER PRIMARY KEY,
Team1Name TEXT NOT NULL,
Team2Name TEXT NOT NULL,
Team1Score INTEGER DEFAULT 0,
Team2Score INTEGER DEFAULT 0,
League TEXT,
GoalData TEXT DEFAULT '[]',
status INTEGER DEFAULT 0,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);Modify config.py to customize:
- API endpoints and timeouts
- Database file location
- Threading parameters
- Logging settings
The system automatically:
- Fetches live match data from the API
- Stores match information in SQLite database
- Monitors for goal events and score changes
- Logs all activities with timestamps
- Handles match completion and cleanup
Press Ctrl+C to stop the monitoring gracefully.
Aura.py- Main monitoring applicationSQLiteDB.py- Optimized SQLite database handlerconfig.py- Configuration settingstest_system.py- Test suite for validationrequirements.txt- Python dependenciesaura.db- SQLite database file (auto-created)
See LICENSE file for details.