A Python CLI tool that fetches an XML EPG feed from a remote server, parses it and stores it into a SQLite database.
- Fetches XML feed over HTTPS
- Parses XMLTV format into structured data
- Stores data in a SQLite database
- Idempotent ingestion — safe to run multiple times
- SQL statistics queries
- Unit tests with in-memory database and network mock
- No external dependencies — stdlib only
- Python 3.11+
git clone https://github.com/Callypige/DataFeedParserPy.git
cd DataFeedParserPypython ingest.py <url>python ingest.py "https://epg.pw/api/epg.xml?channel_id=55730"python stats.pypython -m unittest tests.py├── ingest.py # Fetch, parse and store the XML feed
├── stats.py # SQL queries on the database
└── tests.py # Unit tests
program (id, channel, start_time, stop_time, duration, title, description)
epg.sqliteis generated automatically on first run- Any XMLTV-compatible feed URL can be used