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.5.tar.gz (39.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

amarillo_gtfs_exporter-2.0.5-py3-none-any.whl (28.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: amarillo_gtfs_exporter-2.0.5.tar.gz
  • Upload date:
  • Size: 39.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.2

File hashes

Hashes for amarillo_gtfs_exporter-2.0.5.tar.gz
Algorithm Hash digest
SHA256 ea0df3716e5001618e780a4ccba82bf0ec4e893e8998ff87e7ff613b0a562d4e
MD5 438f4d7ef89867835d7e69bfb36f717a
BLAKE2b-256 92f19cbc67ccbb66f08abf7db5110cb5e32ee7260d8968f0b90bf18f6960f40c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amarillo_gtfs_exporter-2.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 305e7e0ef6bdca0e1941d51d2f5d753756264c632292d951147f8b89b3dad690
MD5 11e1abe5b7733cf7f5ff87ec4f956a95
BLAKE2b-256 9fbcdf16e29fce1e5859466dd0743c6654537047bec039643a6cda22527db14e

See more details on using hashes here.

Supported by

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