https://github.com/tanikai/pyefa3
Python 3-Library for accessing online train connection APIs (Elektronische Fahrplanauskunft)
https://github.com/tanikai/pyefa3
efa fahrplan public-transport public-transport-enabler
Last synced: 9 months ago
JSON representation
Python 3-Library for accessing online train connection APIs (Elektronische Fahrplanauskunft)
- Host: GitHub
- URL: https://github.com/tanikai/pyefa3
- Owner: Tanikai
- License: apache-2.0
- Created: 2024-07-09T08:02:44.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-09T08:03:05.000Z (almost 2 years ago)
- Last Synced: 2025-09-03T22:16:02.994Z (10 months ago)
- Topics: efa, fahrplan, public-transport, public-transport-enabler
- Language: Python
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pyefa3
Python-Library for accessing online train connection APIs (Elektronische Fahrplanauskunft).
A list of supported regions can be found [here](https://github.com/NoMoKeTo/pyefa/wiki/Supported-Regions).
## Installation
Just install it from the [Python Package Index](https://pypi.python.org/pypi/pyefa3):
```sh
pip install pyefa3
```
## Usage
```python
from pyefa.classes import Station
from pyefa.networks import DING
origin_station = Station()
origin_station.name = "Theater"
origin_station.place = "Ulm"
destination_station = Station()
destination_station.name = "Universität Süd"
destination_station.place = "Ulm"
efa_api = DING()
result = efa_api.tripRequest(origin_station, destination_station, apitype="xml")
print(result)
machine_readable = result.asdict()
```
### Install from source
The Python-Modules **beautifulsoup4** and **colorama** are required.
Just clone the repository and run:
```sh
python setup.py install
```
## Documentation
Documentation is available via docstrings.
```sh
pydoc clifa
pydoc clifa.classes
# and so on
```