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.2.tar.gz (49.8 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.2-py3-none-any.whl (41.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: amarillo_gtfs_exporter-2.0.2.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

Hashes for amarillo_gtfs_exporter-2.0.2.tar.gz
Algorithm Hash digest
SHA256 f81ac96cfd3d90218ac5ac40f9dec4bdeaa2e0d8799a51dcd9dad5f6264283d2
MD5 5a7a752378c29c92b7f0d4d9127b1620
BLAKE2b-256 75dec4a12d9e85be3d81fc2f59c135172cb25cbe8e860dbbf5889ffb38d2acde

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amarillo_gtfs_exporter-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 67ef56448fa071c0ee1693814373670983d995edc217db5016ff27f846c646c5
MD5 cd99dcb3f86bd302771f5a5a239702d6
BLAKE2b-256 92e672119b887825e02bbc0129a4a120208774e87c4717cd340192e4d9c821cf

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