We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0bf5951 commit 95c7c8cCopy full SHA for 95c7c8c
1 file changed
examples/routes_for_agency.py
@@ -0,0 +1,24 @@
1
+from pprint import pprint
2
+
3
+from helpers.load_env import load_settings
4
5
+from onebusaway import OnebusawaySDK
6
7
+# Load settings from .env file, if it exists. If not, we'll use the
8
+# Puget Sound server URL (which is also the default in the SDK) and
9
+# the 'TEST' API key.
10
+settings = load_settings(
11
+ {
12
+ "api_key": "TEST",
13
+ "base_url": "https://api.pugetsound.onebusaway.org/",
14
+ }
15
+)
16
17
+# Create a new instance of the OneBusAway SDK with the settings we loaded.
18
+oba = OnebusawaySDK(**settings)
19
20
+agency_id = "40"
21
+response = oba.routes_for_agency.list(agency_id)
22
23
+if response and response.data:
24
+ pprint(response.data)
0 commit comments