amarillo-enhancer
Enhancing Amarillo carpools as standalone (Docker) service.
This service complements the Amarillo service, taking Amarillo carpool files and filling in route information with additional stops and stop time data.
Usage
1. Configuration
Create data/stop_sources.json
Example contents:
[
{"url": "https://datahub.bbnavi.de/export/rideshare_points.geojson", "vicinity": 50},
{"url": "https://data.mfdz.de/mfdz/stops/stops_zhv.csv", "vicinity": 50},
{"url": "https://data.mfdz.de/mfdz/stops/parkings_osm.csv", "vicinity": 500}
]
You can configure the stop sources file location with the environment variable stop_sources_file.
Uvicorn configuration
amarillo-enhancer uses uvicorn to run. Uvicorn can be configured as normal by passing in arguments such as --port 8001 to change the port number.
Graphhopper
amarillo-enhancer uses a Graphhopper service for routing. You can configure the service that is used with the environment variable graphhopper_base_url. By default it is https://api.mfdz.de/gh'
2. Make requests to the enhancer
To enhance a trip, make a POST request to / with the carpool data as the body. The enhancer will respond with the same carpool object enhanced with additional stop time and path data. The enhancer does not save the generated file.
3. Configure the enhancer URL for Amarillo
When Amarillo receives a new carpool object, after returning an OK response it will make a request to the enhancer configured through the environment variable enhancer_url. By default it points to 'http://localhost:8001'.
Run with uvicorn
- Python 3.10 with pip
- python3-venv
Create a virtual environment python3 -m venv venv.
Activate the environment and install the dependencies pip install -r requirements.txt.
Run uvicorn amarillo-enhancer.enhancer:app.
In development, you can use --reload.
Run with docker
You can download a container image from the MFDZ package registry.
Example command:
docker run -it --rm --name amarillo-gtfs-generator -p 8002:80 -e TZ=Europe/Berlin -v $(pwd)/data:/app/data amarillo-gtfs-generator```
Metadata
Release files for amarillo-enhancer 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| amarillo_enhancer-2.0.1.tar.gz | 54.1 kB | Without provenance | Details for amarillo_enhancer-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| amarillo_enhancer-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for amarillo_enhancer-2.0.1-py3-none-any.whl |
Total release size: 99.4 kB
Release files / amarillo_enhancer-2.0.1.tar.gz
| Download URL | amarillo_enhancer-2.0.1.tar.gz |
|---|---|
| Size | 54.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7dedf499b2c2e509665f64d3790c40bccb5768d6bef13b3129d8208a4fecffa7
|
|
BLAKE2b-256 checksum How to use checksums |
a566c6fc4da1e8c0fd39037ec0fdd2ab470beab9fa13186a596d8f098cfb7cf5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.2
|
Release files / amarillo_enhancer-2.0.1-py3-none-any.whl
| Download URL | amarillo_enhancer-2.0.1-py3-none-any.whl |
|---|---|
| Size | 45.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e323568d4991f260651deb330c09aabf1b80c56080681101e272f70a3e936a5
|
|
BLAKE2b-256 checksum How to use checksums |
d0336a4de248c0607aa49bb778a147cce862351d6ffa574651504b607291edac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.2
|
Security for amarillo-enhancer 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.