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.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_grfs_exporter-2.0.2-py3-none-any.whl (41.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: amarillo_grfs_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_grfs_exporter-2.0.2.tar.gz
Algorithm Hash digest
SHA256 0debd3067d85f8ad1092b6f917bc8297ae44fb1f9376321dd8c317720d88bbda
MD5 fc66da83aed812a1a3705ac8fc37a285
BLAKE2b-256 711fc15f40fd4782977d73eec8df0916262a4104cda5b7db1c2ac8b323b96673

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for amarillo_grfs_exporter-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e039702e2e3a3ebfc47764ccab8c911d845bf5e3bf603d14005dd8c50af4250b
MD5 98042152c24f92745eb71441d013e749
BLAKE2b-256 02b1ab59f76f696d5bf18bc4fd1578222d43c6c2460f52f94da8be3da544c4e6

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