payi 0.1.0a12__py3-none-any.whl → 0.1.0a13__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.
- payi/_base_client.py +16 -6
- payi/_models.py +8 -0
- payi/_version.py +1 -1
- payi/resources/budgets/budgets.py +1 -3
- payi/resources/budgets/tags.py +1 -3
- payi/resources/ingest.py +1 -3
- payi/types/budget_history_response.py +7 -7
- payi/types/budget_response.py +19 -3
- payi/types/paged_budget_list.py +19 -3
- payi/types/requests_data.py +3 -7
- {payi-0.1.0a12.dist-info → payi-0.1.0a13.dist-info}/METADATA +1 -1
- {payi-0.1.0a12.dist-info → payi-0.1.0a13.dist-info}/RECORD +14 -14
- {payi-0.1.0a12.dist-info → payi-0.1.0a13.dist-info}/WHEEL +0 -0
- {payi-0.1.0a12.dist-info → payi-0.1.0a13.dist-info}/licenses/LICENSE +0 -0
payi/_base_client.py
CHANGED
|
@@ -955,6 +955,11 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
955
955
|
stream: bool,
|
|
956
956
|
stream_cls: type[_StreamT] | None,
|
|
957
957
|
) -> ResponseT | _StreamT:
|
|
958
|
+
# create a copy of the options we were given so that if the
|
|
959
|
+
# options are mutated later & we then retry, the retries are
|
|
960
|
+
# given the original options
|
|
961
|
+
input_options = model_copy(options)
|
|
962
|
+
|
|
958
963
|
cast_to = self._maybe_override_cast_to(cast_to, options)
|
|
959
964
|
self._prepare_options(options)
|
|
960
965
|
|
|
@@ -979,7 +984,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
979
984
|
|
|
980
985
|
if retries > 0:
|
|
981
986
|
return self._retry_request(
|
|
982
|
-
|
|
987
|
+
input_options,
|
|
983
988
|
cast_to,
|
|
984
989
|
retries,
|
|
985
990
|
stream=stream,
|
|
@@ -994,7 +999,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
994
999
|
|
|
995
1000
|
if retries > 0:
|
|
996
1001
|
return self._retry_request(
|
|
997
|
-
|
|
1002
|
+
input_options,
|
|
998
1003
|
cast_to,
|
|
999
1004
|
retries,
|
|
1000
1005
|
stream=stream,
|
|
@@ -1022,7 +1027,7 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
1022
1027
|
if retries > 0 and self._should_retry(err.response):
|
|
1023
1028
|
err.response.close()
|
|
1024
1029
|
return self._retry_request(
|
|
1025
|
-
|
|
1030
|
+
input_options,
|
|
1026
1031
|
cast_to,
|
|
1027
1032
|
retries,
|
|
1028
1033
|
err.response.headers,
|
|
@@ -1518,6 +1523,11 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1518
1523
|
# execute it earlier while we are in an async context
|
|
1519
1524
|
self._platform = await asyncify(get_platform)()
|
|
1520
1525
|
|
|
1526
|
+
# create a copy of the options we were given so that if the
|
|
1527
|
+
# options are mutated later & we then retry, the retries are
|
|
1528
|
+
# given the original options
|
|
1529
|
+
input_options = model_copy(options)
|
|
1530
|
+
|
|
1521
1531
|
cast_to = self._maybe_override_cast_to(cast_to, options)
|
|
1522
1532
|
await self._prepare_options(options)
|
|
1523
1533
|
|
|
@@ -1540,7 +1550,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1540
1550
|
|
|
1541
1551
|
if retries > 0:
|
|
1542
1552
|
return await self._retry_request(
|
|
1543
|
-
|
|
1553
|
+
input_options,
|
|
1544
1554
|
cast_to,
|
|
1545
1555
|
retries,
|
|
1546
1556
|
stream=stream,
|
|
@@ -1555,7 +1565,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1555
1565
|
|
|
1556
1566
|
if retries > 0:
|
|
1557
1567
|
return await self._retry_request(
|
|
1558
|
-
|
|
1568
|
+
input_options,
|
|
1559
1569
|
cast_to,
|
|
1560
1570
|
retries,
|
|
1561
1571
|
stream=stream,
|
|
@@ -1578,7 +1588,7 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1578
1588
|
if retries > 0 and self._should_retry(err.response):
|
|
1579
1589
|
await err.response.aclose()
|
|
1580
1590
|
return await self._retry_request(
|
|
1581
|
-
|
|
1591
|
+
input_options,
|
|
1582
1592
|
cast_to,
|
|
1583
1593
|
retries,
|
|
1584
1594
|
err.response.headers,
|
payi/_models.py
CHANGED
|
@@ -643,6 +643,14 @@ def validate_type(*, type_: type[_T], value: object) -> _T:
|
|
|
643
643
|
return cast(_T, _validate_non_model_type(type_=type_, value=value))
|
|
644
644
|
|
|
645
645
|
|
|
646
|
+
def set_pydantic_config(typ: Any, config: pydantic.ConfigDict) -> None:
|
|
647
|
+
"""Add a pydantic config for the given type.
|
|
648
|
+
|
|
649
|
+
Note: this is a no-op on Pydantic v1.
|
|
650
|
+
"""
|
|
651
|
+
setattr(typ, "__pydantic_config__", config) # noqa: B010
|
|
652
|
+
|
|
653
|
+
|
|
646
654
|
# our use of subclasssing here causes weirdness for type checkers,
|
|
647
655
|
# so we just pretend that we don't subclass
|
|
648
656
|
if TYPE_CHECKING:
|
payi/_version.py
CHANGED
|
@@ -29,9 +29,7 @@ from ..._response import (
|
|
|
29
29
|
async_to_raw_response_wrapper,
|
|
30
30
|
async_to_streamed_response_wrapper,
|
|
31
31
|
)
|
|
32
|
-
from ..._base_client import
|
|
33
|
-
make_request_options,
|
|
34
|
-
)
|
|
32
|
+
from ..._base_client import make_request_options
|
|
35
33
|
from ...types.budget_response import BudgetResponse
|
|
36
34
|
from ...types.default_response import DefaultResponse
|
|
37
35
|
from ...types.paged_budget_list import PagedBudgetList
|
payi/resources/budgets/tags.py
CHANGED
|
@@ -19,9 +19,7 @@ from ..._response import (
|
|
|
19
19
|
async_to_raw_response_wrapper,
|
|
20
20
|
async_to_streamed_response_wrapper,
|
|
21
21
|
)
|
|
22
|
-
from ..._base_client import
|
|
23
|
-
make_request_options,
|
|
24
|
-
)
|
|
22
|
+
from ..._base_client import make_request_options
|
|
25
23
|
from ...types.budgets import tag_create_params, tag_remove_params, tag_update_params
|
|
26
24
|
from ...types.budgets.tag_list_response import TagListResponse
|
|
27
25
|
from ...types.budgets.tag_create_response import TagCreateResponse
|
payi/resources/ingest.py
CHANGED
|
@@ -19,9 +19,7 @@ from .._response import (
|
|
|
19
19
|
async_to_raw_response_wrapper,
|
|
20
20
|
async_to_streamed_response_wrapper,
|
|
21
21
|
)
|
|
22
|
-
from .._base_client import
|
|
23
|
-
make_request_options,
|
|
24
|
-
)
|
|
22
|
+
from .._base_client import make_request_options
|
|
25
23
|
from ..types.proxy_result import ProxyResult
|
|
26
24
|
|
|
27
25
|
__all__ = ["IngestResource", "AsyncIngestResource"]
|
|
@@ -57,11 +57,11 @@ class BudgetHistoryTotalsCostTotal(BaseModel):
|
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
class BudgetHistoryTotalsCost(BaseModel):
|
|
60
|
-
input:
|
|
60
|
+
input: BudgetHistoryTotalsCostInput
|
|
61
61
|
|
|
62
|
-
output:
|
|
62
|
+
output: BudgetHistoryTotalsCostOutput
|
|
63
63
|
|
|
64
|
-
total:
|
|
64
|
+
total: BudgetHistoryTotalsCostTotal
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
class BudgetHistoryTotalsRequests(BaseModel):
|
|
@@ -77,18 +77,18 @@ class BudgetHistoryTotalsRequests(BaseModel):
|
|
|
77
77
|
|
|
78
78
|
|
|
79
79
|
class BudgetHistoryTotals(BaseModel):
|
|
80
|
-
cost:
|
|
80
|
+
cost: BudgetHistoryTotalsCost
|
|
81
81
|
|
|
82
|
-
requests:
|
|
82
|
+
requests: BudgetHistoryTotalsRequests
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
class BudgetHistory(BaseModel):
|
|
86
|
+
budget_name: Optional[str] = None
|
|
87
|
+
|
|
86
88
|
base_cost_estimate: Optional[Literal["max"]] = None
|
|
87
89
|
|
|
88
90
|
budget_id: Optional[str] = None
|
|
89
91
|
|
|
90
|
-
budget_name: Optional[str] = None
|
|
91
|
-
|
|
92
92
|
budget_reset_timestamp: Optional[datetime] = None
|
|
93
93
|
|
|
94
94
|
budget_response_type: Optional[Literal["block", "allow"]] = None
|
payi/types/budget_response.py
CHANGED
|
@@ -8,13 +8,29 @@ from .._models import BaseModel
|
|
|
8
8
|
from .cost_data import CostData
|
|
9
9
|
from .requests_data import RequestsData
|
|
10
10
|
|
|
11
|
-
__all__ = ["BudgetResponse", "Budget", "BudgetTotals"]
|
|
11
|
+
__all__ = ["BudgetResponse", "Budget", "BudgetTotals", "BudgetTotalsBudgetTransactions"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class BudgetTotalsBudgetTransactions(BaseModel):
|
|
15
|
+
blocked: int
|
|
16
|
+
|
|
17
|
+
blocked_external: int
|
|
18
|
+
|
|
19
|
+
exceeded: int
|
|
20
|
+
|
|
21
|
+
successful: int
|
|
22
|
+
|
|
23
|
+
error: Optional[int] = None
|
|
24
|
+
|
|
25
|
+
total: Optional[int] = None
|
|
12
26
|
|
|
13
27
|
|
|
14
28
|
class BudgetTotals(BaseModel):
|
|
15
|
-
|
|
29
|
+
budget_transactions: BudgetTotalsBudgetTransactions
|
|
30
|
+
|
|
31
|
+
cost: CostData
|
|
16
32
|
|
|
17
|
-
requests:
|
|
33
|
+
requests: RequestsData
|
|
18
34
|
|
|
19
35
|
|
|
20
36
|
class Budget(BaseModel):
|
payi/types/paged_budget_list.py
CHANGED
|
@@ -10,13 +10,29 @@ from .._models import BaseModel
|
|
|
10
10
|
from .cost_data import CostData
|
|
11
11
|
from .requests_data import RequestsData
|
|
12
12
|
|
|
13
|
-
__all__ = ["PagedBudgetList", "Item", "ItemTotals"]
|
|
13
|
+
__all__ = ["PagedBudgetList", "Item", "ItemTotals", "ItemTotalsBudgetTransactions"]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ItemTotalsBudgetTransactions(BaseModel):
|
|
17
|
+
blocked: int
|
|
18
|
+
|
|
19
|
+
blocked_external: int
|
|
20
|
+
|
|
21
|
+
exceeded: int
|
|
22
|
+
|
|
23
|
+
successful: int
|
|
24
|
+
|
|
25
|
+
error: Optional[int] = None
|
|
26
|
+
|
|
27
|
+
total: Optional[int] = None
|
|
14
28
|
|
|
15
29
|
|
|
16
30
|
class ItemTotals(BaseModel):
|
|
17
|
-
|
|
31
|
+
budget_transactions: ItemTotalsBudgetTransactions
|
|
32
|
+
|
|
33
|
+
cost: CostData
|
|
18
34
|
|
|
19
|
-
requests:
|
|
35
|
+
requests: RequestsData
|
|
20
36
|
|
|
21
37
|
|
|
22
38
|
class Item(BaseModel):
|
payi/types/requests_data.py
CHANGED
|
@@ -8,14 +8,10 @@ __all__ = ["RequestsData"]
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class RequestsData(BaseModel):
|
|
11
|
-
blocked:
|
|
11
|
+
blocked: int
|
|
12
12
|
|
|
13
|
-
error:
|
|
13
|
+
error: int
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
failed: Optional[int] = None
|
|
18
|
-
|
|
19
|
-
successful: Optional[int] = None
|
|
15
|
+
successful: int
|
|
20
16
|
|
|
21
17
|
total: Optional[int] = None
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
payi/__init__.py,sha256=LWpfR6WSMPTnmmx3ToqqZ0A8CNduLcuxY1SSOqhPxuk,2381
|
|
2
|
-
payi/_base_client.py,sha256=
|
|
2
|
+
payi/_base_client.py,sha256=c5Hju1M9F2Bweaubt_YHoIW6WBi41ztJdw6WV6ALxVg,66170
|
|
3
3
|
payi/_client.py,sha256=lQBkhIC3OQpsv84PQvVpoOPdR5QabmEPkzyn7U9O1aA,15622
|
|
4
4
|
payi/_compat.py,sha256=m0I0haqFZuVxd5m227_8nNmvA1saXyuNJ7BjidX_PTE,6389
|
|
5
5
|
payi/_constants.py,sha256=JE8kyZa2Q4NK_i4fO--8siEYTzeHnT0fYbOFDgDP4uk,464
|
|
6
6
|
payi/_exceptions.py,sha256=ItygKNrNXIVY0H6LsGVZvFuAHB3Vtm_VZXmWzCnpHy0,3216
|
|
7
7
|
payi/_files.py,sha256=me2eyWzJCM4YKh10Gzkxw4YyIEJoikzD4BVu_20UUc0,3565
|
|
8
|
-
payi/_models.py,sha256=
|
|
8
|
+
payi/_models.py,sha256=iIdzp18nPedv1mQxC6hoNDEsRIAiPkS88e4ZwA5mpGo,27892
|
|
9
9
|
payi/_qs.py,sha256=AOkSz4rHtK4YI3ZU_kzea-zpwBUgEY8WniGmTPyEimc,4846
|
|
10
10
|
payi/_resource.py,sha256=j2jIkTr8OIC8sU6-05nxSaCyj4MaFlbZrwlyg4_xJos,1088
|
|
11
11
|
payi/_response.py,sha256=W6pADUzbnMFGnVzGY4M3FkX9uvw8AFSMTPZKPgQ_TV4,28363
|
|
12
12
|
payi/_streaming.py,sha256=Z_wIyo206T6Jqh2rolFg2VXZgX24PahLmpURp0-NssU,10092
|
|
13
13
|
payi/_types.py,sha256=04q-KHD-qZ1xlfwEb_muyIHWmD-nZ-KxnRxA_QEjqNk,6125
|
|
14
|
-
payi/_version.py,sha256=
|
|
14
|
+
payi/_version.py,sha256=fVekM5nK6zjT_VszEGHaPVvPL-b6_3OcQkrsnwQaG28,165
|
|
15
15
|
payi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
payi/_utils/__init__.py,sha256=Uzq1-FIih_VUjzdNVWXks0sdC39KBKLMrZoz-_JOjJ4,1988
|
|
17
17
|
payi/_utils/_logs.py,sha256=fmnf5D9TOgkgZKfgYmSa3PiUc3SZgkchn6CzJUeo0SQ,768
|
|
@@ -25,23 +25,23 @@ payi/_utils/_utils.py,sha256=FaZdW0tWil7IERdxUfKt7pVcyXL2aCnR3lo73q66qgI,11447
|
|
|
25
25
|
payi/lib/.keep,sha256=wuNrz-5SXo3jJaJOJgz4vFHM41YH_g20F5cRQo0vLes,224
|
|
26
26
|
payi/lib/helpers.py,sha256=IdB_pi8dLtVh9b4DG-zasA1i9Yk-5xAayoUTNWBAFpc,1235
|
|
27
27
|
payi/resources/__init__.py,sha256=1p8kzMES8NNDQQoK3TEDE-8vVuQ59xxUjyyblZJBTjw,1015
|
|
28
|
-
payi/resources/ingest.py,sha256=
|
|
28
|
+
payi/resources/ingest.py,sha256=nEJcbeKt0eI6qi7lkVxVUmRXaI5hH5UtmSDLZUkkmSM,8419
|
|
29
29
|
payi/resources/budgets/__init__.py,sha256=w1UhOdDXtUH4A91ME5Tw2nr9bRvPJyJY1YWiVVy7jj0,989
|
|
30
|
-
payi/resources/budgets/budgets.py,sha256=
|
|
31
|
-
payi/resources/budgets/tags.py,sha256=
|
|
30
|
+
payi/resources/budgets/budgets.py,sha256=_z9fg1rq1dNeIKJJxZ4kfqOTBdVzifMSRINwlLHGRHs,25946
|
|
31
|
+
payi/resources/budgets/tags.py,sha256=N26Uc7N8N1egvujY4LZ7RDoQ7oWeTR9w1pPbbgKLLqc,17841
|
|
32
32
|
payi/types/__init__.py,sha256=JjHDryLWv31S0mtDuNEepBt4Dp1YSEtGRks9SBiMj4o,897
|
|
33
33
|
payi/types/budget_create_params.py,sha256=2Vd6Z2x-xEfk73QknmNKJAicIT4ACmrPUYkmrAKp4dc,573
|
|
34
|
-
payi/types/budget_history_response.py,sha256=
|
|
34
|
+
payi/types/budget_history_response.py,sha256=WI7a6WZ2Dv573uPsFXKdGutj15Y975AOQfrINKwsgBc,2629
|
|
35
35
|
payi/types/budget_list_params.py,sha256=Win-Spveurf6WarTgCXXsP-yDIxr_HCP7oV_4JbqKOc,674
|
|
36
|
-
payi/types/budget_response.py,sha256=
|
|
36
|
+
payi/types/budget_response.py,sha256=OkG2MfiRMHqBalaZN23lLHiKC5DMAk04RRdpu5Z1kuQ,1243
|
|
37
37
|
payi/types/budget_update_params.py,sha256=TTH7uu1c1zBK5zYhh2SPuRWEwr1XwDX_8bVS_GxIn9I,306
|
|
38
38
|
payi/types/cost_data.py,sha256=jZtju_3WWNXh4wCu77XnyvxZkvewcvXBS_V0z07BizA,284
|
|
39
39
|
payi/types/cost_details.py,sha256=3ldvnYILAG6Sz9wGWMs1SZvIfdGEbn5i4-CauWEXMPA,265
|
|
40
40
|
payi/types/default_response.py,sha256=o617LpRsCIZHCZxAc5nVI2JQ3HPGZo4gCDvSDkxkIJ8,270
|
|
41
41
|
payi/types/ingest_units_params.py,sha256=NhC7wRF0lpoKikUPQUAgE1OxpU8dqMxtRZNIbiXkYCA,575
|
|
42
|
-
payi/types/paged_budget_list.py,sha256=
|
|
42
|
+
payi/types/paged_budget_list.py,sha256=wEC2UMQ6xSEfD1Z27Rb0J4uw-ewBWeKQ2ppKkPeWrxc,1789
|
|
43
43
|
payi/types/proxy_result.py,sha256=qsl1dwZMXf3Gy7f7BzE4Fe4Pnu6OlSUY_LIo0oYLEZo,798
|
|
44
|
-
payi/types/requests_data.py,sha256=
|
|
44
|
+
payi/types/requests_data.py,sha256=UniFVu9SgDQIbZupzrLSrvBKV487_iKFemLw9nRDhGo,296
|
|
45
45
|
payi/types/budgets/__init__.py,sha256=5ByVuqOcgSYLHmGzhuj6-HG48mtQhC6oT5U5tNjQtxk,725
|
|
46
46
|
payi/types/budgets/budget_tags.py,sha256=nOYMf7YgRdTZgGdedJw0UbQ2uupCq9MHlevLJoXxWB4,348
|
|
47
47
|
payi/types/budgets/tag_create_params.py,sha256=_zEYfH2uKF44WenAdedx4TB9Az6RbIoAUMwqW8SAiuc,314
|
|
@@ -52,7 +52,7 @@ payi/types/budgets/tag_remove_params.py,sha256=fNiHex1U11o_B0bfJDkpGARkEf99J-bd-
|
|
|
52
52
|
payi/types/budgets/tag_remove_response.py,sha256=Wt4KwC76y3qxdEqKhXzFkYu2iECYePgXcpidXkuheWQ,219
|
|
53
53
|
payi/types/budgets/tag_update_params.py,sha256=bWWeDqfySt7CZ6HDsZzENREOWGWGWFgnAtyleNMwUsE,314
|
|
54
54
|
payi/types/budgets/tag_update_response.py,sha256=Vlf-zxLZzvmhUodhzF7hiqWcxyjrb7Ri_lSajg8vOPM,219
|
|
55
|
-
payi-0.1.
|
|
56
|
-
payi-0.1.
|
|
57
|
-
payi-0.1.
|
|
58
|
-
payi-0.1.
|
|
55
|
+
payi-0.1.0a13.dist-info/METADATA,sha256=KaoE098u5vTXtTVQbyyDX_fEHkH3mc45DAm9UUYfIic,11873
|
|
56
|
+
payi-0.1.0a13.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
57
|
+
payi-0.1.0a13.dist-info/licenses/LICENSE,sha256=8vX1pjh3esb6D5DvXAf6NxiBcVyon8aHWNJCxmmHXeY,11334
|
|
58
|
+
payi-0.1.0a13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|