Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mplewis/gtfs-tools
https://github.com/mplewis/gtfs-tools
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mplewis/gtfs-tools
- Owner: mplewis
- Created: 2016-12-08T06:37:20.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-05-22T20:46:01.000Z (over 1 year ago)
- Last Synced: 2024-04-13T04:56:08.815Z (9 months ago)
- Language: Python
- Size: 25.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gtfs-tools
[![CircleCI](https://circleci.com/gh/mplewis/gtfs-tools.svg?style=svg)](https://circleci.com/gh/mplewis/gtfs-tools)
Some useful stuff for working with GTFS [Static](https://developers.google.com/transit/gtfs/) and [Realtime](https://developers.google.com/transit/gtfs-realtime/) data.
# Server
`server.py` is a Flask server that provides:
* route list/search
* list all trips in a route
* trip info/search
* list all stops in a trip
* stop info/search
* **realtime arrival estimates** for a route, headsign, and stop# Running the Server
Create and fill out `config.py` with the static and realtime URLs and (optional) request args:
```python
class Base:
DEBUG = False
TESTING = False
GTFS_STATIC = {
'url': 'http://www.example.com/gtfs_static.zip',
'args': {}
}
GTFS_REALTIME = {
'url': 'http://www.example.com/gtfs_realtime.pb',
'args': {'auth': ('keanu', '>50mph')}
}class Debug(Base):
DEBUG = True
```Then start the server:
```sh
pip install -r requirements.txt # install dependencies
python server.py # production
DEBUG=TRUE python server.py # debug
```# Testing
```sh
pip install -r test/requirements.txt
py.test
```# License
MIT