This application provides real-time departure information for public transport stations using the EFA (Elektronische Fahrplanauskunft) API. It is built with Flask for the backend and vanilla JavaScript for the frontend.
- Fetches real-time departure data from the EFA API.
- Displays departure information including line, destination, departure time, countdown, and delay.
- Updates departure information every 2 minutes.
- Python 3.7+
- Flask
- aiohttp
-
Clone the repository:
git clone https://github.com/Solmath/Infoscreen.git cd efa-departures/services/web -
Create a virtual environment and activate it:
python -m venv .venv venv\Scripts\activate # `venv/bin/activate` on Linux
-
Install the required packages:
pip install -r requirements.txt
-
Change the URL for the EFA interface of your public transport operator and station of your choice in
web/project/__init__.py. -
Run the Flask application:
Pass the app as an argument:
flask --app infoscreen run --debug
-
Open your web browser and navigate to
http://localhost:5000/departureto view the departure information.
Start server:
docker-compose build
docker-compose up -dRebuild
docker-compose up -d --buildStop containers:
docker-compose down -vweb/EFS_API/__init__.py: Contains the EFA class for interacting with the EFA API.web/infoscreen/__init__.py: The main Flask application file.web/infoscreen/templates/base.html: The HTML template for the infoscreen.web/infoscreen/templates/departure.html: The HTML template for displaying departure information.web/infoscreen/static/styles/style.css: The CSS file for styling the HTML template.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request for any changes.
- Flask
- aiohttp
- EFA API
- EFA class based on https://finalrewind.org/interblag/entry/efa-json-api/