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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for amarillo_gtfs_exporter-2.0.4.tar.gz
Algorithm Hash digest
SHA256 739b7929eef96ff3fde95c7c3cbf65071762709a20dda3f033fa3ae53af03bfe
MD5 3fd4a0592b2ac2d81ee188455800c445
BLAKE2b-256 a1a0410d89b149208a8c2ae192d0422f1f8a1689c0694c038d81cddbdfd114e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amarillo_gtfs_exporter-2.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fdd9102ee528dc930b5dfb6056ca1171785f685e04ac95ffbc4d9a5de43a17e2
MD5 b1cbfdf26c5ba8cebb1ee9cfab1de189
BLAKE2b-256 ec32f3ee95b107e097cd6fc62f8136e31cc092ff97c96c63029ddd9c8b140845

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