Skip to main content

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

amarillo_gtfs_exporter-2.0.1.tar.gz (49.8 kB view details)

Uploaded Source

Built Distribution

amarillo_gtfs_exporter-2.0.1-py3-none-any.whl (41.6 kB view details)

Uploaded Python 3

File details

Details for the file amarillo_gtfs_exporter-2.0.1.tar.gz.

File metadata

File hashes

Hashes for amarillo_gtfs_exporter-2.0.1.tar.gz
Algorithm Hash digest
SHA256 9ad891d33f60bed22540c4d7802623637ca3e2780a3e06493ac204ac4c7fe665
MD5 953149ad1bb47ac63151c742ffe5e86a
BLAKE2b-256 29bc612e77bc8ec630d7326e6adce78ab1509195bbda43d74a4ae7cdf10fcf51

See more details on using hashes here.

File details

Details for the file amarillo_gtfs_exporter-2.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for amarillo_gtfs_exporter-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 13f77bc4c4887df9e018ec810862d8325d62c320691cc863cdc1980539000f10
MD5 8ce5d517de99b9b6c97b5f1fa20df358
BLAKE2b-256 350a6233b54cec3f4ca5150508db6a5cad8cfad6ca4b391dd0c1979f0456779f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page