Python Stub file for GTFS Realtime Bindings?

48 views
Skip to first unread message

Andrew Koure

unread,
Apr 30, 2025, 1:02:37 PMApr 30
to GTFS-realtime
Is there a way to easily generate a .pyi file so that I can get the correct types for pylance?

Alternatively if there is already such a file floating out there that would be awesome. 

Thanks, 
Andrew 

Elias Gino Cripotos

unread,
Apr 30, 2025, 1:07:17 PMApr 30
to gtfs-r...@googlegroups.com
Hello Andrew, 
Have you checked out : https://gtfs.org/documentation/realtime/language-bindings/overview/ ? 

Hope this is relevant to you. 

Also, feel free to join the GTFS Slack to connect with the community on questions like these. It's free with over 1000 contributing members. 

Elias Gino Cripotos | en, fr, it, de | Community Manager | MobilityData | mobilitydata.org

el...@mobilitydata.org | Montréal, Québec, Canada



--
You received this message because you are subscribed to the Google Groups "GTFS-realtime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gtfs-realtim...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/gtfs-realtime/56d60882-09c2-4a1f-b35c-2a3110338628n%40googlegroups.com.

Kurt Raschke

unread,
Apr 30, 2025, 7:22:10 PMApr 30
to gtfs-r...@googlegroups.com
protoc can generate stubs if invoked with the --pyi_out option. (I have not actually tested this, since my use of types in Python is limited, but the documentation claims it should work!)

-Kurt

Reply all
Reply to author
Forward
0 new messages