Skip to main content

GRFS export plugin for Amarillo

Project description

amarillo-grfs-exporter

This plugin for Amarillo adds endpoints /region/{region_id}/grfs and /region/{region_id}/grfs-rt for serving the GRFS data on your Amarillo instance. Serves the grfs zip files from the data/gtfs folder. If the files don't exist or are out of date (from yesterday in the case of GRFS and older than a minute for GRFS-RT) the plugin will retrieve them from the configured generator_url.

Installation

pip install amarillo-grfs-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.grfs_export', ...]
...
INFO - Running setup function for amarillo.plugins.grfs_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-grfs-generator.

Usage

Make GET requests to the /region/{region_id}/grfs and /region/{region_id}/grfs-rt. The GRFS 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_grfs_exporter-2.0.1.tar.gz (49.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for amarillo_grfs_exporter-2.0.1.tar.gz
Algorithm Hash digest
SHA256 25d4277bc83b20c7fc93e3ff1da57e1aed9e037d936ae30db278088a58a484bd
MD5 f9904fecd7b137fb14b3a91134423e39
BLAKE2b-256 bdceb062eeca652ed64929f338ae2229dc864f7c7ec0b4873c8a0fd79dc00b99

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amarillo_grfs_exporter-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ec409ffb949f15b76693d1816c025263ff5ea4d31cc2438ef29ec5fbb96a2b95
MD5 294bd08d30aa18a6f352069422c34cba
BLAKE2b-256 671a4e68ebf7b7cd818c96ac8f858241d1694f3d57a7339e2ea5ca5686a1ad20

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