Tool for checking if transit urls are on aggregator websites
Project description
GTFS Aggregator Checker
This repo is to verify that a given list of feeds is listed in feed aggregators. Currently it checks transit.land and transitfeeds.com to verify that feeds are listed in an aggregator.
Installation
pip install gtfs-aggregator-checker
Configure
The following env variables can be set in a .env
file, set to the environment,
or inline like TRANSITLAND_API_KEY=SECRET python -m gtfs_aggregator_checker
.
-
TRANSITLAND_API_KEY
An api key from transitland. -
GTFS_CACHE_DIR
Folder to save cached files to. Defaults to~/.cache/gtfs-aggregator-checker
Getting Started
CLI Usage
python -m gtfs_aggregator_checker [YAML_FILE] [OPTIONS]
python -m gtfs_aggregator_checker
or python -m gtfs_aggregator_checker /path/to/yml
will search a Cal-ITP agencies.yml file for any urls and see
if they are present in any of the feed aggregators. Alternatively you can use a
--csv-file
or --url
instead of an agencies.yml
file.
The final line of stdout will tell how many urls were in agencies.yml
and how
many of those were matched in a feed.
Options
python -m gtfs_aggregator_checker --help
print the help--csv-file agencies.csv
load a csv instead of a Cal-ITP agencies yaml file (one url per line)--url http://example.com
Check a single url instead of a Cal-ITP agencies yaml file--output /path/to/file.json
Save the results as a json file
Development
Clone this repo and pip install -e /pat/to/feed-checker
to develop locally.
By default, downloaded files (raw html files, api requsets) will be saved to
~/.cache/calitp_gtfs_aggregator_checker
. This greatly reduces the time
required to run the script. Delete this folder to reset the cache.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file gtfs_aggregator_checker-1.0.0.tar.gz
.
File metadata
- Download URL: gtfs_aggregator_checker-1.0.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecb2af6b39d58b5a11f1a608e3e3b4d583c4e5a28c5b8208047466955925d654 |
|
MD5 | 59bb23d34424cce85ca1824d02ec1a95 |
|
BLAKE2b-256 | 2adb3d5ec707d05d172eb2321c99eac8e17b4b113b0ceb2f82f56f0269881d51 |