onebusaway 1.13.4__py3-none-any.whl → 1.14.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- onebusaway/_base_client.py +9 -2
- onebusaway/_version.py +1 -1
- {onebusaway-1.13.4.dist-info → onebusaway-1.14.0.dist-info}/METADATA +5 -5
- {onebusaway-1.13.4.dist-info → onebusaway-1.14.0.dist-info}/RECORD +6 -6
- {onebusaway-1.13.4.dist-info → onebusaway-1.14.0.dist-info}/WHEEL +0 -0
- {onebusaway-1.13.4.dist-info → onebusaway-1.14.0.dist-info}/licenses/LICENSE +0 -0
onebusaway/_base_client.py
CHANGED
@@ -529,6 +529,15 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
529
529
|
# work around https://github.com/encode/httpx/discussions/2880
|
530
530
|
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
|
531
531
|
|
532
|
+
is_body_allowed = options.method.lower() != "get"
|
533
|
+
|
534
|
+
if is_body_allowed:
|
535
|
+
kwargs["json"] = json_data if is_given(json_data) else None
|
536
|
+
kwargs["files"] = files
|
537
|
+
else:
|
538
|
+
headers.pop("Content-Type", None)
|
539
|
+
kwargs.pop("data", None)
|
540
|
+
|
532
541
|
# TODO: report this error to httpx
|
533
542
|
return self._client.build_request( # pyright: ignore[reportUnknownMemberType]
|
534
543
|
headers=headers,
|
@@ -540,8 +549,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
540
549
|
# so that passing a `TypedDict` doesn't cause an error.
|
541
550
|
# https://github.com/microsoft/pyright/issues/3526#event-6715453066
|
542
551
|
params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None,
|
543
|
-
json=json_data if is_given(json_data) else None,
|
544
|
-
files=files,
|
545
552
|
**kwargs,
|
546
553
|
)
|
547
554
|
|
onebusaway/_version.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: onebusaway
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.14.0
|
4
4
|
Summary: The official Python library for the onebusaway-sdk API
|
5
5
|
Project-URL: Homepage, https://github.com/OneBusAway/python-sdk
|
6
6
|
Project-URL: Repository, https://github.com/OneBusAway/python-sdk
|
@@ -30,12 +30,13 @@ Requires-Dist: sniffio
|
|
30
30
|
Requires-Dist: typing-extensions<5,>=4.10
|
31
31
|
Provides-Extra: aiohttp
|
32
32
|
Requires-Dist: aiohttp; extra == 'aiohttp'
|
33
|
-
Requires-Dist: httpx-aiohttp>=0.1.
|
33
|
+
Requires-Dist: httpx-aiohttp>=0.1.8; extra == 'aiohttp'
|
34
34
|
Description-Content-Type: text/markdown
|
35
35
|
|
36
36
|
# OneBusAway SDK Python API library
|
37
37
|
|
38
|
-
|
38
|
+
<!-- prettier-ignore -->
|
39
|
+
[)](https://pypi.org/project/onebusaway/)
|
39
40
|
|
40
41
|
|
41
42
|
The Onebusaway SDK Python library provides convenient access to the Onebusaway SDK REST API from any Python 3.8+
|
@@ -113,7 +114,6 @@ pip install onebusaway[aiohttp]
|
|
113
114
|
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
|
114
115
|
|
115
116
|
```python
|
116
|
-
import os
|
117
117
|
import asyncio
|
118
118
|
from onebusaway import DefaultAioHttpClient
|
119
119
|
from onebusaway import AsyncOnebusawaySDK
|
@@ -121,7 +121,7 @@ from onebusaway import AsyncOnebusawaySDK
|
|
121
121
|
|
122
122
|
async def main() -> None:
|
123
123
|
async with AsyncOnebusawaySDK(
|
124
|
-
api_key=
|
124
|
+
api_key="My API Key",
|
125
125
|
http_client=DefaultAioHttpClient(),
|
126
126
|
) as client:
|
127
127
|
current_time = await client.current_time.retrieve()
|
@@ -1,5 +1,5 @@
|
|
1
1
|
onebusaway/__init__.py,sha256=MiX9GgRsWZXRUikjOoRRNaUVwprJtLjAeHdt93EFQ_A,2673
|
2
|
-
onebusaway/_base_client.py,sha256=
|
2
|
+
onebusaway/_base_client.py,sha256=oODxccWqcWUPDfp-nDuSLwJy2tPr4BqNWKeA13z16SY,66926
|
3
3
|
onebusaway/_client.py,sha256=dGw5u-pBQRdxZLFdYVOATktwqgNSIWv3y2PyH_ziaKU,37100
|
4
4
|
onebusaway/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
|
5
5
|
onebusaway/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
@@ -11,7 +11,7 @@ onebusaway/_resource.py,sha256=t-CkWpnm2UyE1uiv87GODlyRcQ_8h5eXmSVoE-1u35w,1142
|
|
11
11
|
onebusaway/_response.py,sha256=x_FC3ZoD8JnfQRtZibna0wxoBtNzKcVictes8B7N6NQ,28848
|
12
12
|
onebusaway/_streaming.py,sha256=PC8tKxRCeoJn8xKBBxXTlppGSI4TOMYVNfxrabFkRfc,10128
|
13
13
|
onebusaway/_types.py,sha256=OUYNO_zPft2ZRZXakg0aIsBjCoAJLRet90u8LO8WBB4,6201
|
14
|
-
onebusaway/_version.py,sha256=
|
14
|
+
onebusaway/_version.py,sha256=4pZ7zuoXmbiw__Ss8-CYKnnIL97dr7K4KyMfpg0gG5k,163
|
15
15
|
onebusaway/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
16
|
onebusaway/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
|
17
17
|
onebusaway/_utils/_logs.py,sha256=tVIAhl7_vbQL4nJ8QdLAHJ0YzQYbW2gTATmjneY_JxI,790
|
@@ -104,7 +104,7 @@ onebusaway/types/vehicles_for_agency_list_response.py,sha256=IUX2zHummRU2ChQsGYt
|
|
104
104
|
onebusaway/types/shared/__init__.py,sha256=ui9M5r_ahasuyksUJVAHHYtdXvg3L_uxVgJY6LMdiPY,201
|
105
105
|
onebusaway/types/shared/references.py,sha256=By29adWfDkZwH6_80NFuvP5NPKOcz9JUqUzaq-iAjQw,7317
|
106
106
|
onebusaway/types/shared/response_wrapper.py,sha256=0i161M7PC8iPq2RzNt8DxZFlvSvdgD9xBcs0ugER0rY,331
|
107
|
-
onebusaway-1.
|
108
|
-
onebusaway-1.
|
109
|
-
onebusaway-1.
|
110
|
-
onebusaway-1.
|
107
|
+
onebusaway-1.14.0.dist-info/METADATA,sha256=IQNbv44BxHd32yScAaQApvNRHqHP0ig9IlROKdSVDOU,13687
|
108
|
+
onebusaway-1.14.0.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
109
|
+
onebusaway-1.14.0.dist-info/licenses/LICENSE,sha256=czZkEz_7Kzvn7AGsFsY_RUYL132SXtB5Mcrjoq29Vfo,11344
|
110
|
+
onebusaway-1.14.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|