payi 0.1.0a98__py3-none-any.whl → 0.1.0a99__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.
Potentially problematic release.
This version of payi might be problematic. Click here for more details.
- payi/_base_client.py +9 -2
- payi/_version.py +1 -1
- {payi-0.1.0a98.dist-info → payi-0.1.0a99.dist-info}/METADATA +3 -4
- {payi-0.1.0a98.dist-info → payi-0.1.0a99.dist-info}/RECORD +6 -6
- {payi-0.1.0a98.dist-info → payi-0.1.0a99.dist-info}/WHEEL +0 -0
- {payi-0.1.0a98.dist-info → payi-0.1.0a99.dist-info}/licenses/LICENSE +0 -0
payi/_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
|
|
payi/_version.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: payi
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a99
|
|
4
4
|
Summary: The official Python library for the payi API
|
|
5
5
|
Project-URL: Homepage, https://github.com/Pay-i/pay-i-python
|
|
6
6
|
Project-URL: Repository, https://github.com/Pay-i/pay-i-python
|
|
@@ -33,7 +33,7 @@ Requires-Dist: typing-extensions<5,>=4.10
|
|
|
33
33
|
Requires-Dist: wrapt>=1.17.2
|
|
34
34
|
Provides-Extra: aiohttp
|
|
35
35
|
Requires-Dist: aiohttp; extra == 'aiohttp'
|
|
36
|
-
Requires-Dist: httpx-aiohttp>=0.1.
|
|
36
|
+
Requires-Dist: httpx-aiohttp>=0.1.8; extra == 'aiohttp'
|
|
37
37
|
Description-Content-Type: text/markdown
|
|
38
38
|
|
|
39
39
|
# Payi Python API library
|
|
@@ -123,7 +123,6 @@ pip install --pre payi[aiohttp]
|
|
|
123
123
|
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
|
|
124
124
|
|
|
125
125
|
```python
|
|
126
|
-
import os
|
|
127
126
|
import asyncio
|
|
128
127
|
from payi import DefaultAioHttpClient
|
|
129
128
|
from payi import AsyncPayi
|
|
@@ -131,7 +130,7 @@ from payi import AsyncPayi
|
|
|
131
130
|
|
|
132
131
|
async def main() -> None:
|
|
133
132
|
async with AsyncPayi(
|
|
134
|
-
api_key=
|
|
133
|
+
api_key="My API Key",
|
|
135
134
|
http_client=DefaultAioHttpClient(),
|
|
136
135
|
) as client:
|
|
137
136
|
use_case_definition = await client.use_cases.definitions.create(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
payi/__init__.py,sha256=D0Hb0f0CuE6t648U7C0qOOKez56wyNcIndIYcNuamlU,2560
|
|
2
|
-
payi/_base_client.py,sha256=
|
|
2
|
+
payi/_base_client.py,sha256=eehCdtbXc28VdCSMlJWF9uYg1jtWNpmm8KcEL5BSYVU,66920
|
|
3
3
|
payi/_client.py,sha256=tKKTYVdI7BWHLNUzYDI9t1zqu2OQrDjm0Blm9lkqTUw,17199
|
|
4
4
|
payi/_compat.py,sha256=VWemUKbj6DDkQ-O4baSpHVLJafotzeXmCQGJugfVTIw,6580
|
|
5
5
|
payi/_constants.py,sha256=S14PFzyN9-I31wiV7SmIlL5Ga0MLHxdvegInGdXH7tM,462
|
|
@@ -11,7 +11,7 @@ payi/_resource.py,sha256=j2jIkTr8OIC8sU6-05nxSaCyj4MaFlbZrwlyg4_xJos,1088
|
|
|
11
11
|
payi/_response.py,sha256=rh9oJAvCKcPwQFm4iqH_iVrmK8bNx--YP_A2a4kN1OU,28776
|
|
12
12
|
payi/_streaming.py,sha256=Z_wIyo206T6Jqh2rolFg2VXZgX24PahLmpURp0-NssU,10092
|
|
13
13
|
payi/_types.py,sha256=7jE5MoQQFVoVxw5vVzvZ2Ao0kcjfNOGsBgyJfLBEnMo,6195
|
|
14
|
-
payi/_version.py,sha256=
|
|
14
|
+
payi/_version.py,sha256=lz4fBrZ99BQNkc5pT-roGUpti7Awbw0lAMScpAiTtHQ,165
|
|
15
15
|
payi/pagination.py,sha256=k2356QGPOUSjRF2vHpwLBdF6P-2vnQzFfRIJQAHGQ7A,1258
|
|
16
16
|
payi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
payi/_utils/__init__.py,sha256=PNZ_QJuzZEgyYXqkO1HVhGkj5IU9bglVUcw7H-Knjzw,2062
|
|
@@ -133,7 +133,7 @@ payi/types/use_cases/definitions/kpi_retrieve_response.py,sha256=uQXliSvS3k-yDYw
|
|
|
133
133
|
payi/types/use_cases/definitions/kpi_update_params.py,sha256=jbawdWAdMnsTWVH0qfQGb8W7_TXe3lq4zjSRu44d8p8,373
|
|
134
134
|
payi/types/use_cases/definitions/kpi_update_response.py,sha256=zLyEoT0S8d7XHsnXZYT8tM7yDw0Aze0Mk-_Z6QeMtc8,459
|
|
135
135
|
payi/types/use_cases/definitions/limit_config_create_params.py,sha256=pzQza_16N3z8cFNEKr6gPbFvuGFrwNuGxAYb--Kbo2M,449
|
|
136
|
-
payi-0.1.
|
|
137
|
-
payi-0.1.
|
|
138
|
-
payi-0.1.
|
|
139
|
-
payi-0.1.
|
|
136
|
+
payi-0.1.0a99.dist-info/METADATA,sha256=bKNzn3yNMBUd6n_-CpTzrZ6ahCwh053d0-BoCkp8gqc,16289
|
|
137
|
+
payi-0.1.0a99.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
|
138
|
+
payi-0.1.0a99.dist-info/licenses/LICENSE,sha256=CQt03aM-P4a3Yg5qBg3JSLVoQS3smMyvx7tYg_6V7Gk,11334
|
|
139
|
+
payi-0.1.0a99.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|