I've found this GTFS data that I want to use, but IDK how to set up protobuf (preferably in Python) to read the data. Any help would be greatly appreciated. Thanks.
Asked
Active
Viewed 38 times
1 Answers
0
First, you need to download the protocol compiler from here. According to Protobuf guide on GitHub:
In the downloads section of each release, you can find pre-built binaries in zip packages: protoc-$VERSION-$PLATFORM.zip
Second, compile gtfs-realtime.proto
using following command:
protoc -I=. --python_out=. ./gtfs-realtime.proto
This will look for gtfs-realtime.proto
in the current directory and generates a .py
file which you can import in your project. For more information, check out this tutorial.
That's for the Protobuf part.
I don't have experience with GTFS, but I guess this sample may help you.

Ahmad
- 349
- 1
- 9