GTFS export plugin for Amarillo
Project description
amarillo-gtfs-exporter
This plugin for Amarillo adds endpoints /region/{region_id}/gtfs
and /region/{region_id}/gtfs-rt
for serving the GTFS data on your Amarillo instance. Serves the gtfs zip files from the data/gtfs
folder. If the files don't exist or are out of date (from yesterday in the case of GTFS and older than a minute for GTFS-RT) the plugin will retrieve them from the configured generator_url
.
Installation
pip install amarillo-gtfs-exporter
This package will install inside the amarillo/plugins folder in your python environment. Next time you launch Amarillo, it should be discovered automatically and you should see messages like this:
INFO - Discovered plugins: ['amarillo.plugins.gtfs_export', ...]
...
INFO - Running setup function for amarillo.plugins.gtfs_export
The setup()
function will be called automatically and it will add the necessary endpoints to your Amarillo FastAPI application.
Configuration
You can configure the generator_url
through an environment variable, or by adding it to the config
file in the amarillo root folder:
generator_url = 'http://localhost:8002'
The default value is http://localhost:8002
.
The generator_url should point to a running instance of amarillo-gtfs-generator.
Usage
Make GET requests to the /region/{region_id}/gtfs
and /region/{region_id}/gtfs-rt
. The GTFS data will be returned as a zip file, while realtime data can be requested in .pbf or .json using the format query parameter.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file amarillo_gtfs_exporter-2.0.1.tar.gz
.
File metadata
- Download URL: amarillo_gtfs_exporter-2.0.1.tar.gz
- Upload date:
- Size: 49.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ad891d33f60bed22540c4d7802623637ca3e2780a3e06493ac204ac4c7fe665 |
|
MD5 | 953149ad1bb47ac63151c742ffe5e86a |
|
BLAKE2b-256 | 29bc612e77bc8ec630d7326e6adce78ab1509195bbda43d74a4ae7cdf10fcf51 |
File details
Details for the file amarillo_gtfs_exporter-2.0.1-py3-none-any.whl
.
File metadata
- Download URL: amarillo_gtfs_exporter-2.0.1-py3-none-any.whl
- Upload date:
- Size: 41.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13f77bc4c4887df9e018ec810862d8325d62c320691cc863cdc1980539000f10 |
|
MD5 | 8ce5d517de99b9b6c97b5f1fa20df358 |
|
BLAKE2b-256 | 350a6233b54cec3f4ca5150508db6a5cad8cfad6ca4b391dd0c1979f0456779f |