payi 0.1.0a21__tar.gz → 0.1.0a23__tar.gz
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-0.1.0a23/.release-please-manifest.json +3 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/CHANGELOG.md +16 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/PKG-INFO +1 -1
- {payi-0.1.0a21 → payi-0.1.0a23}/pyproject.toml +1 -1
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_base_client.py +2 -2
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_client.py +2 -2
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_models.py +2 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_version.py +1 -1
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/test_response.py +38 -1
- payi-0.1.0a21/.release-please-manifest.json +0 -3
- {payi-0.1.0a21 → payi-0.1.0a23}/.gitignore +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/CONTRIBUTING.md +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/LICENSE +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/README.md +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/SECURITY.md +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/api.md +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/bin/check-release-environment +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/bin/publish-pypi +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/examples/.keep +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/mypy.ini +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/noxfile.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/release-please-config.json +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/requirements-dev.lock +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/requirements.lock +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/__init__.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_compat.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_constants.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_exceptions.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_files.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_qs.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_resource.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_streaming.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_types.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_utils/__init__.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_utils/_logs.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_utils/_proxy.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_utils/_reflection.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_utils/_streams.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_utils/_sync.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_utils/_transform.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_utils/_typing.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/_utils/_utils.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/lib/.keep +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/lib/helpers.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/py.typed +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/resources/__init__.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/resources/budgets/__init__.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/resources/budgets/budgets.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/resources/budgets/tags.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/resources/categories/__init__.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/resources/categories/categories.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/resources/categories/resources.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/resources/experiences/__init__.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/resources/experiences/experiences.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/resources/experiences/types.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/resources/ingest.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/__init__.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/budget_create_params.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/budget_history_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/budget_list_params.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/budget_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/budget_update_params.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/budgets/__init__.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/budgets/budget_tags.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/budgets/tag_create_params.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/budgets/tag_create_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/budgets/tag_delete_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/budgets/tag_list_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/budgets/tag_remove_params.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/budgets/tag_remove_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/budgets/tag_update_params.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/budgets/tag_update_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/bulk_ingest_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/categories/__init__.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/categories/resource_create_params.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/categories/resource_list_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/category_delete_resource_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/category_delete_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/category_list_resources_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/category_list_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/category_resource_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/category_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/cost_data.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/cost_details.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/default_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/experience_instance.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/experiences/__init__.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/experiences/experience_type.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/experiences/type_create_params.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/experiences/type_list_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/experiences/type_update_params.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/ingest_bulk_params.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/ingest_event_param.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/ingest_response.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/ingest_units_params.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/paged_budget_list.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/requests_data.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/src/payi/types/total_cost_data.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/__init__.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/api_resources/__init__.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/api_resources/budgets/__init__.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/api_resources/budgets/test_tags.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/api_resources/categories/__init__.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/api_resources/categories/test_resources.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/api_resources/experiences/__init__.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/api_resources/experiences/test_types.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/api_resources/test_budgets.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/api_resources/test_categories.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/api_resources/test_experiences.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/api_resources/test_ingest.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/conftest.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/sample_file.txt +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/test_client.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/test_deepcopy.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/test_extract_files.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/test_files.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/test_models.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/test_qs.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/test_required_args.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/test_streaming.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/test_transform.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/test_utils/test_proxy.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/test_utils/test_typing.py +0 -0
- {payi-0.1.0a21 → payi-0.1.0a23}/tests/utils.py +0 -0
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.23 (2024-09-03)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.22...v0.1.0-alpha.23](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.22...v0.1.0-alpha.23)
|
|
6
|
+
|
|
7
|
+
### Chores
|
|
8
|
+
|
|
9
|
+
* **internal:** codegen related update ([#106](https://github.com/Pay-i/pay-i-python/issues/106)) ([2d1f2f7](https://github.com/Pay-i/pay-i-python/commit/2d1f2f7db30d05b63ed85b7fe41962c6bfda2a9e))
|
|
10
|
+
|
|
11
|
+
## 0.1.0-alpha.22 (2024-08-14)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.1.0-alpha.21...v0.1.0-alpha.22](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.21...v0.1.0-alpha.22)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** update via SDK Studio ([#103](https://github.com/Pay-i/pay-i-python/issues/103)) ([0087070](https://github.com/Pay-i/pay-i-python/commit/0087070a5a3b51c14d396cafef7c7bb0eda034aa))
|
|
18
|
+
|
|
3
19
|
## 0.1.0-alpha.21 (2024-08-13)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v0.1.0-alpha.20...v0.1.0-alpha.21](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.20...v0.1.0-alpha.21)
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import sys
|
|
3
4
|
import json
|
|
4
5
|
import time
|
|
5
6
|
import uuid
|
|
@@ -1982,7 +1983,6 @@ def get_python_version() -> str:
|
|
|
1982
1983
|
|
|
1983
1984
|
def get_architecture() -> Arch:
|
|
1984
1985
|
try:
|
|
1985
|
-
python_bitness, _ = platform.architecture()
|
|
1986
1986
|
machine = platform.machine().lower()
|
|
1987
1987
|
except Exception:
|
|
1988
1988
|
return "unknown"
|
|
@@ -1998,7 +1998,7 @@ def get_architecture() -> Arch:
|
|
|
1998
1998
|
return "x64"
|
|
1999
1999
|
|
|
2000
2000
|
# TODO: untested
|
|
2001
|
-
if
|
|
2001
|
+
if sys.maxsize <= 2**32:
|
|
2002
2002
|
return "x32"
|
|
2003
2003
|
|
|
2004
2004
|
if machine:
|
|
@@ -94,7 +94,7 @@ class Payi(SyncAPIClient):
|
|
|
94
94
|
if base_url is None:
|
|
95
95
|
base_url = os.environ.get("PAYI_BASE_URL")
|
|
96
96
|
if base_url is None:
|
|
97
|
-
base_url = f"https://
|
|
97
|
+
base_url = f"https://api.pay-i.com"
|
|
98
98
|
|
|
99
99
|
super().__init__(
|
|
100
100
|
version=__version__,
|
|
@@ -268,7 +268,7 @@ class AsyncPayi(AsyncAPIClient):
|
|
|
268
268
|
if base_url is None:
|
|
269
269
|
base_url = os.environ.get("PAYI_BASE_URL")
|
|
270
270
|
if base_url is None:
|
|
271
|
-
base_url = f"https://
|
|
271
|
+
base_url = f"https://api.pay-i.com"
|
|
272
272
|
|
|
273
273
|
super().__init__(
|
|
274
274
|
version=__version__,
|
|
@@ -380,6 +380,8 @@ def is_basemodel(type_: type) -> bool:
|
|
|
380
380
|
|
|
381
381
|
def is_basemodel_type(type_: type) -> TypeGuard[type[BaseModel] | type[GenericModel]]:
|
|
382
382
|
origin = get_origin(type_) or type_
|
|
383
|
+
if not inspect.isclass(origin):
|
|
384
|
+
return False
|
|
383
385
|
return issubclass(origin, BaseModel) or issubclass(origin, GenericModel)
|
|
384
386
|
|
|
385
387
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import json
|
|
2
|
-
from typing import List, cast
|
|
2
|
+
from typing import Any, List, Union, cast
|
|
3
3
|
from typing_extensions import Annotated
|
|
4
4
|
|
|
5
5
|
import httpx
|
|
@@ -188,3 +188,40 @@ async def test_async_response_parse_annotated_type(async_client: AsyncPayi) -> N
|
|
|
188
188
|
)
|
|
189
189
|
assert obj.foo == "hello!"
|
|
190
190
|
assert obj.bar == 2
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
class OtherModel(BaseModel):
|
|
194
|
+
a: str
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
@pytest.mark.parametrize("client", [False], indirect=True) # loose validation
|
|
198
|
+
def test_response_parse_expect_model_union_non_json_content(client: Payi) -> None:
|
|
199
|
+
response = APIResponse(
|
|
200
|
+
raw=httpx.Response(200, content=b"foo", headers={"Content-Type": "application/text"}),
|
|
201
|
+
client=client,
|
|
202
|
+
stream=False,
|
|
203
|
+
stream_cls=None,
|
|
204
|
+
cast_to=str,
|
|
205
|
+
options=FinalRequestOptions.construct(method="get", url="/foo"),
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
obj = response.parse(to=cast(Any, Union[CustomModel, OtherModel]))
|
|
209
|
+
assert isinstance(obj, str)
|
|
210
|
+
assert obj == "foo"
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
@pytest.mark.asyncio
|
|
214
|
+
@pytest.mark.parametrize("async_client", [False], indirect=True) # loose validation
|
|
215
|
+
async def test_async_response_parse_expect_model_union_non_json_content(async_client: AsyncPayi) -> None:
|
|
216
|
+
response = AsyncAPIResponse(
|
|
217
|
+
raw=httpx.Response(200, content=b"foo", headers={"Content-Type": "application/text"}),
|
|
218
|
+
client=async_client,
|
|
219
|
+
stream=False,
|
|
220
|
+
stream_cls=None,
|
|
221
|
+
cast_to=str,
|
|
222
|
+
options=FinalRequestOptions.construct(method="get", url="/foo"),
|
|
223
|
+
)
|
|
224
|
+
|
|
225
|
+
obj = await response.parse(to=cast(Any, Union[CustomModel, OtherModel]))
|
|
226
|
+
assert isinstance(obj, str)
|
|
227
|
+
assert obj == "foo"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|