payi 0.1.0a37__py3-none-any.whl → 0.1.0a39__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.

Files changed (33) hide show
  1. payi/_version.py +1 -1
  2. payi/resources/experiences/experiences.py +8 -8
  3. payi/resources/experiences/types/__init__.py +33 -0
  4. payi/resources/experiences/types/limit_config.py +275 -0
  5. payi/resources/experiences/{types.py → types/types.py} +47 -11
  6. payi/resources/ingest.py +0 -83
  7. payi/resources/limits/limits.py +4 -8
  8. payi/resources/requests/__init__.py +14 -0
  9. payi/resources/requests/requests.py +32 -0
  10. payi/resources/requests/result.py +169 -0
  11. payi/types/__init__.py +1 -4
  12. payi/types/cost_data.py +5 -2
  13. payi/types/experience_instance_response.py +2 -4
  14. payi/types/experiences/experience_type.py +15 -2
  15. payi/types/experiences/type_create_params.py +15 -3
  16. payi/types/experiences/type_update_params.py +2 -2
  17. payi/types/experiences/types/__init__.py +5 -0
  18. payi/types/experiences/types/limit_config_create_params.py +18 -0
  19. payi/types/ingest_response.py +7 -2
  20. payi/types/limit_create_params.py +1 -3
  21. payi/types/limit_response.py +0 -2
  22. payi/types/paged_limit_list.py +0 -2
  23. payi/types/requests/__init__.py +1 -0
  24. payi/types/requests/request_result.py +48 -0
  25. payi/types/shared/__init__.py +3 -1
  26. payi/types/shared/pay_i_common_models_budget_management_cost_details_base.py +10 -0
  27. {payi-0.1.0a37.dist-info → payi-0.1.0a39.dist-info}/METADATA +1 -1
  28. {payi-0.1.0a37.dist-info → payi-0.1.0a39.dist-info}/RECORD +30 -26
  29. payi/types/bulk_ingest_response.py +0 -51
  30. payi/types/ingest_bulk_params.py +0 -14
  31. payi/types/ingest_event_param.py +0 -60
  32. {payi-0.1.0a37.dist-info → payi-0.1.0a39.dist-info}/WHEEL +0 -0
  33. {payi-0.1.0a37.dist-info → payi-0.1.0a39.dist-info}/licenses/LICENSE +0 -0
@@ -2,6 +2,14 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from .result import (
6
+ ResultResource,
7
+ AsyncResultResource,
8
+ ResultResourceWithRawResponse,
9
+ AsyncResultResourceWithRawResponse,
10
+ ResultResourceWithStreamingResponse,
11
+ AsyncResultResourceWithStreamingResponse,
12
+ )
5
13
  from ..._compat import cached_property
6
14
  from .properties import (
7
15
  PropertiesResource,
@@ -21,6 +29,10 @@ class RequestsResource(SyncAPIResource):
21
29
  def properties(self) -> PropertiesResource:
22
30
  return PropertiesResource(self._client)
23
31
 
32
+ @cached_property
33
+ def result(self) -> ResultResource:
34
+ return ResultResource(self._client)
35
+
24
36
  @cached_property
25
37
  def with_raw_response(self) -> RequestsResourceWithRawResponse:
26
38
  """
@@ -46,6 +58,10 @@ class AsyncRequestsResource(AsyncAPIResource):
46
58
  def properties(self) -> AsyncPropertiesResource:
47
59
  return AsyncPropertiesResource(self._client)
48
60
 
61
+ @cached_property
62
+ def result(self) -> AsyncResultResource:
63
+ return AsyncResultResource(self._client)
64
+
49
65
  @cached_property
50
66
  def with_raw_response(self) -> AsyncRequestsResourceWithRawResponse:
51
67
  """
@@ -74,6 +90,10 @@ class RequestsResourceWithRawResponse:
74
90
  def properties(self) -> PropertiesResourceWithRawResponse:
75
91
  return PropertiesResourceWithRawResponse(self._requests.properties)
76
92
 
93
+ @cached_property
94
+ def result(self) -> ResultResourceWithRawResponse:
95
+ return ResultResourceWithRawResponse(self._requests.result)
96
+
77
97
 
78
98
  class AsyncRequestsResourceWithRawResponse:
79
99
  def __init__(self, requests: AsyncRequestsResource) -> None:
@@ -83,6 +103,10 @@ class AsyncRequestsResourceWithRawResponse:
83
103
  def properties(self) -> AsyncPropertiesResourceWithRawResponse:
84
104
  return AsyncPropertiesResourceWithRawResponse(self._requests.properties)
85
105
 
106
+ @cached_property
107
+ def result(self) -> AsyncResultResourceWithRawResponse:
108
+ return AsyncResultResourceWithRawResponse(self._requests.result)
109
+
86
110
 
87
111
  class RequestsResourceWithStreamingResponse:
88
112
  def __init__(self, requests: RequestsResource) -> None:
@@ -92,6 +116,10 @@ class RequestsResourceWithStreamingResponse:
92
116
  def properties(self) -> PropertiesResourceWithStreamingResponse:
93
117
  return PropertiesResourceWithStreamingResponse(self._requests.properties)
94
118
 
119
+ @cached_property
120
+ def result(self) -> ResultResourceWithStreamingResponse:
121
+ return ResultResourceWithStreamingResponse(self._requests.result)
122
+
95
123
 
96
124
  class AsyncRequestsResourceWithStreamingResponse:
97
125
  def __init__(self, requests: AsyncRequestsResource) -> None:
@@ -100,3 +128,7 @@ class AsyncRequestsResourceWithStreamingResponse:
100
128
  @cached_property
101
129
  def properties(self) -> AsyncPropertiesResourceWithStreamingResponse:
102
130
  return AsyncPropertiesResourceWithStreamingResponse(self._requests.properties)
131
+
132
+ @cached_property
133
+ def result(self) -> AsyncResultResourceWithStreamingResponse:
134
+ return AsyncResultResourceWithStreamingResponse(self._requests.result)
@@ -0,0 +1,169 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ import httpx
6
+
7
+ from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
8
+ from ..._compat import cached_property
9
+ from ..._resource import SyncAPIResource, AsyncAPIResource
10
+ from ..._response import (
11
+ to_raw_response_wrapper,
12
+ to_streamed_response_wrapper,
13
+ async_to_raw_response_wrapper,
14
+ async_to_streamed_response_wrapper,
15
+ )
16
+ from ..._base_client import make_request_options
17
+ from ...types.requests.request_result import RequestResult
18
+
19
+ __all__ = ["ResultResource", "AsyncResultResource"]
20
+
21
+
22
+ class ResultResource(SyncAPIResource):
23
+ @cached_property
24
+ def with_raw_response(self) -> ResultResourceWithRawResponse:
25
+ """
26
+ This property can be used as a prefix for any HTTP method call to return
27
+ the raw response object instead of the parsed content.
28
+
29
+ For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
30
+ """
31
+ return ResultResourceWithRawResponse(self)
32
+
33
+ @cached_property
34
+ def with_streaming_response(self) -> ResultResourceWithStreamingResponse:
35
+ """
36
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
37
+
38
+ For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
39
+ """
40
+ return ResultResourceWithStreamingResponse(self)
41
+
42
+ def retrieve(
43
+ self,
44
+ request_id: str,
45
+ *,
46
+ category: str,
47
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
48
+ # The extra values given here take precedence over values defined on the client or passed to this method.
49
+ extra_headers: Headers | None = None,
50
+ extra_query: Query | None = None,
51
+ extra_body: Body | None = None,
52
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
53
+ ) -> RequestResult:
54
+ """
55
+ Get a Request results
56
+
57
+ Args:
58
+ extra_headers: Send extra headers
59
+
60
+ extra_query: Add additional query parameters to the request
61
+
62
+ extra_body: Add additional JSON properties to the request
63
+
64
+ timeout: Override the client-level default timeout for this request, in seconds
65
+ """
66
+ if not category:
67
+ raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
68
+ if not request_id:
69
+ raise ValueError(f"Expected a non-empty value for `request_id` but received {request_id!r}")
70
+ return self._get(
71
+ f"/api/v1/requests/result/{category}/{request_id}",
72
+ options=make_request_options(
73
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
74
+ ),
75
+ cast_to=RequestResult,
76
+ )
77
+
78
+
79
+ class AsyncResultResource(AsyncAPIResource):
80
+ @cached_property
81
+ def with_raw_response(self) -> AsyncResultResourceWithRawResponse:
82
+ """
83
+ This property can be used as a prefix for any HTTP method call to return
84
+ the raw response object instead of the parsed content.
85
+
86
+ For more information, see https://www.github.com/Pay-i/pay-i-python#accessing-raw-response-data-eg-headers
87
+ """
88
+ return AsyncResultResourceWithRawResponse(self)
89
+
90
+ @cached_property
91
+ def with_streaming_response(self) -> AsyncResultResourceWithStreamingResponse:
92
+ """
93
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
94
+
95
+ For more information, see https://www.github.com/Pay-i/pay-i-python#with_streaming_response
96
+ """
97
+ return AsyncResultResourceWithStreamingResponse(self)
98
+
99
+ async def retrieve(
100
+ self,
101
+ request_id: str,
102
+ *,
103
+ category: str,
104
+ # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
105
+ # The extra values given here take precedence over values defined on the client or passed to this method.
106
+ extra_headers: Headers | None = None,
107
+ extra_query: Query | None = None,
108
+ extra_body: Body | None = None,
109
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
110
+ ) -> RequestResult:
111
+ """
112
+ Get a Request results
113
+
114
+ Args:
115
+ extra_headers: Send extra headers
116
+
117
+ extra_query: Add additional query parameters to the request
118
+
119
+ extra_body: Add additional JSON properties to the request
120
+
121
+ timeout: Override the client-level default timeout for this request, in seconds
122
+ """
123
+ if not category:
124
+ raise ValueError(f"Expected a non-empty value for `category` but received {category!r}")
125
+ if not request_id:
126
+ raise ValueError(f"Expected a non-empty value for `request_id` but received {request_id!r}")
127
+ return await self._get(
128
+ f"/api/v1/requests/result/{category}/{request_id}",
129
+ options=make_request_options(
130
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
131
+ ),
132
+ cast_to=RequestResult,
133
+ )
134
+
135
+
136
+ class ResultResourceWithRawResponse:
137
+ def __init__(self, result: ResultResource) -> None:
138
+ self._result = result
139
+
140
+ self.retrieve = to_raw_response_wrapper(
141
+ result.retrieve,
142
+ )
143
+
144
+
145
+ class AsyncResultResourceWithRawResponse:
146
+ def __init__(self, result: AsyncResultResource) -> None:
147
+ self._result = result
148
+
149
+ self.retrieve = async_to_raw_response_wrapper(
150
+ result.retrieve,
151
+ )
152
+
153
+
154
+ class ResultResourceWithStreamingResponse:
155
+ def __init__(self, result: ResultResource) -> None:
156
+ self._result = result
157
+
158
+ self.retrieve = to_streamed_response_wrapper(
159
+ result.retrieve,
160
+ )
161
+
162
+
163
+ class AsyncResultResourceWithStreamingResponse:
164
+ def __init__(self, result: AsyncResultResource) -> None:
165
+ self._result = result
166
+
167
+ self.retrieve = async_to_streamed_response_wrapper(
168
+ result.retrieve,
169
+ )
payi/types/__init__.py CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from .shared import EvaluationResponse as EvaluationResponse
5
+ from .shared import PayICommonModelsBudgetManagementCostDetailsBase as PayICommonModelsBudgetManagementCostDetailsBase
6
6
  from .cost_data import CostData as CostData
7
7
  from .cost_details import CostDetails as CostDetails
8
8
  from .billing_model import BillingModel as BillingModel
@@ -15,13 +15,10 @@ from .default_response import DefaultResponse as DefaultResponse
15
15
  from .paged_limit_list import PagedLimitList as PagedLimitList
16
16
  from .category_response import CategoryResponse as CategoryResponse
17
17
  from .limit_list_params import LimitListParams as LimitListParams
18
- from .ingest_bulk_params import IngestBulkParams as IngestBulkParams
19
- from .ingest_event_param import IngestEventParam as IngestEventParam
20
18
  from .limit_reset_params import LimitResetParams as LimitResetParams
21
19
  from .ingest_units_params import IngestUnitsParams as IngestUnitsParams
22
20
  from .limit_create_params import LimitCreateParams as LimitCreateParams
23
21
  from .limit_update_params import LimitUpdateParams as LimitUpdateParams
24
- from .bulk_ingest_response import BulkIngestResponse as BulkIngestResponse
25
22
  from .category_list_response import CategoryListResponse as CategoryListResponse
26
23
  from .limit_history_response import LimitHistoryResponse as LimitHistoryResponse
27
24
  from .category_delete_response import CategoryDeleteResponse as CategoryDeleteResponse
payi/types/cost_data.py CHANGED
@@ -3,13 +3,16 @@
3
3
 
4
4
  from .._models import BaseModel
5
5
  from .cost_details import CostDetails
6
+ from .shared.pay_i_common_models_budget_management_cost_details_base import (
7
+ PayICommonModelsBudgetManagementCostDetailsBase,
8
+ )
6
9
 
7
10
  __all__ = ["CostData"]
8
11
 
9
12
 
10
13
  class CostData(BaseModel):
11
- input: CostDetails
14
+ input: PayICommonModelsBudgetManagementCostDetailsBase
12
15
 
13
- output: CostDetails
16
+ output: PayICommonModelsBudgetManagementCostDetailsBase
14
17
 
15
18
  total: CostDetails
@@ -1,6 +1,6 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from typing import Dict
3
+ from typing import Optional
4
4
 
5
5
  from .._models import BaseModel
6
6
 
@@ -10,6 +10,4 @@ __all__ = ["ExperienceInstanceResponse"]
10
10
  class ExperienceInstanceResponse(BaseModel):
11
11
  experience_id: str
12
12
 
13
- properties: Dict[str, str]
14
-
15
- request_id: str
13
+ limit_id: Optional[str] = None
@@ -1,10 +1,21 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from typing import Optional
3
+ from typing import List, Optional
4
+ from typing_extensions import Literal
4
5
 
5
6
  from ..._models import BaseModel
6
7
 
7
- __all__ = ["ExperienceType"]
8
+ __all__ = ["ExperienceType", "LimitConfig"]
9
+
10
+
11
+ class LimitConfig(BaseModel):
12
+ max: float
13
+
14
+ limit_tags: Optional[List[str]] = None
15
+
16
+ limit_type: Optional[Literal["block", "allow"]] = None
17
+
18
+ threshold: Optional[float] = None
8
19
 
9
20
 
10
21
  class ExperienceType(BaseModel):
@@ -14,4 +25,6 @@ class ExperienceType(BaseModel):
14
25
 
15
26
  request_id: str
16
27
 
28
+ limit_config: Optional[LimitConfig] = None
29
+
17
30
  logging_enabled: Optional[bool] = None
@@ -2,10 +2,10 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
- from typing import Optional
6
- from typing_extensions import Required, TypedDict
5
+ from typing import List, Optional
6
+ from typing_extensions import Literal, Required, TypedDict
7
7
 
8
- __all__ = ["TypeCreateParams"]
8
+ __all__ = ["TypeCreateParams", "LimitConfig"]
9
9
 
10
10
 
11
11
  class TypeCreateParams(TypedDict, total=False):
@@ -13,4 +13,16 @@ class TypeCreateParams(TypedDict, total=False):
13
13
 
14
14
  name: Required[str]
15
15
 
16
+ limit_config: LimitConfig
17
+
16
18
  logging_enabled: Optional[bool]
19
+
20
+
21
+ class LimitConfig(TypedDict, total=False):
22
+ max: Required[float]
23
+
24
+ limit_tags: Optional[List[str]]
25
+
26
+ limit_type: Literal["block", "allow"]
27
+
28
+ threshold: Optional[float]
@@ -3,12 +3,12 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  from typing import Optional
6
- from typing_extensions import Required, TypedDict
6
+ from typing_extensions import TypedDict
7
7
 
8
8
  __all__ = ["TypeUpdateParams"]
9
9
 
10
10
 
11
11
  class TypeUpdateParams(TypedDict, total=False):
12
- description: Required[Optional[str]]
12
+ description: Optional[str]
13
13
 
14
14
  logging_enabled: Optional[bool]
@@ -0,0 +1,5 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from .limit_config_create_params import LimitConfigCreateParams as LimitConfigCreateParams
@@ -0,0 +1,18 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import List, Optional
6
+ from typing_extensions import Literal, Required, TypedDict
7
+
8
+ __all__ = ["LimitConfigCreateParams"]
9
+
10
+
11
+ class LimitConfigCreateParams(TypedDict, total=False):
12
+ max: Required[float]
13
+
14
+ limit_tags: Optional[List[str]]
15
+
16
+ limit_type: Literal["block", "allow"]
17
+
18
+ threshold: Optional[float]
@@ -6,6 +6,9 @@ from typing_extensions import Literal
6
6
 
7
7
  from .._models import BaseModel
8
8
  from .cost_details import CostDetails
9
+ from .shared.pay_i_common_models_budget_management_cost_details_base import (
10
+ PayICommonModelsBudgetManagementCostDetailsBase,
11
+ )
9
12
 
10
13
  __all__ = ["IngestResponse", "XproxyResult", "XproxyResultCost", "XproxyResultLimits"]
11
14
 
@@ -13,9 +16,9 @@ __all__ = ["IngestResponse", "XproxyResult", "XproxyResultCost", "XproxyResultLi
13
16
  class XproxyResultCost(BaseModel):
14
17
  currency: Optional[Literal["usd"]] = None
15
18
 
16
- input: Optional[CostDetails] = None
19
+ input: Optional[PayICommonModelsBudgetManagementCostDetailsBase] = None
17
20
 
18
- output: Optional[CostDetails] = None
21
+ output: Optional[PayICommonModelsBudgetManagementCostDetailsBase] = None
19
22
 
20
23
  total: Optional[CostDetails] = None
21
24
 
@@ -25,6 +28,8 @@ class XproxyResultLimits(BaseModel):
25
28
 
26
29
 
27
30
  class XproxyResult(BaseModel):
31
+ blocked_limit_ids: Optional[List[str]] = None
32
+
28
33
  cost: Optional[XproxyResultCost] = None
29
34
 
30
35
  experience_id: Optional[str] = None
@@ -15,9 +15,7 @@ class LimitCreateParams(TypedDict, total=False):
15
15
 
16
16
  billing_model_id: Optional[str]
17
17
 
18
- cost_basis: Literal["base", "billed"]
19
-
20
- currency: Literal["usd"]
18
+ limit_basis: Literal["base", "billed"]
21
19
 
22
20
  limit_tags: Optional[List[str]]
23
21
 
@@ -11,8 +11,6 @@ __all__ = ["LimitResponse", "Limit"]
11
11
 
12
12
 
13
13
  class Limit(BaseModel):
14
- currency: Literal["usd"]
15
-
16
14
  limit_creation_timestamp: datetime
17
15
 
18
16
  limit_id: str
@@ -13,8 +13,6 @@ __all__ = ["PagedLimitList", "Item"]
13
13
 
14
14
 
15
15
  class Item(BaseModel):
16
- currency: Literal["usd"]
17
-
18
16
  limit_creation_timestamp: datetime
19
17
 
20
18
  limit_id: str
@@ -2,4 +2,5 @@
2
2
 
3
3
  from __future__ import annotations
4
4
 
5
+ from .request_result import RequestResult as RequestResult
5
6
  from .property_create_params import PropertyCreateParams as PropertyCreateParams
@@ -0,0 +1,48 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ from typing import Dict, List, Optional
4
+ from typing_extensions import Literal
5
+
6
+ from ..._models import BaseModel
7
+ from ..cost_details import CostDetails
8
+ from ..shared.pay_i_common_models_budget_management_cost_details_base import (
9
+ PayICommonModelsBudgetManagementCostDetailsBase,
10
+ )
11
+
12
+ __all__ = ["RequestResult", "XproxyResult", "XproxyResultCost", "XproxyResultLimits"]
13
+
14
+
15
+ class XproxyResultCost(BaseModel):
16
+ currency: Optional[Literal["usd"]] = None
17
+
18
+ input: Optional[PayICommonModelsBudgetManagementCostDetailsBase] = None
19
+
20
+ output: Optional[PayICommonModelsBudgetManagementCostDetailsBase] = None
21
+
22
+ total: Optional[CostDetails] = None
23
+
24
+
25
+ class XproxyResultLimits(BaseModel):
26
+ state: Optional[Literal["ok", "blocked", "blocked_external", "exceeded", "overrun", "failed"]] = None
27
+
28
+
29
+ class XproxyResult(BaseModel):
30
+ blocked_limit_ids: Optional[List[str]] = None
31
+
32
+ cost: Optional[XproxyResultCost] = None
33
+
34
+ experience_id: Optional[str] = None
35
+
36
+ limits: Optional[Dict[str, XproxyResultLimits]] = None
37
+
38
+ request_id: Optional[str] = None
39
+
40
+ request_tags: Optional[List[str]] = None
41
+
42
+ resource_id: Optional[str] = None
43
+
44
+ user_id: Optional[str] = None
45
+
46
+
47
+ class RequestResult(BaseModel):
48
+ xproxy_result: XproxyResult
@@ -1,3 +1,5 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
- from .evaluation_response import EvaluationResponse as EvaluationResponse
3
+ from .pay_i_common_models_budget_management_cost_details_base import (
4
+ PayICommonModelsBudgetManagementCostDetailsBase as PayICommonModelsBudgetManagementCostDetailsBase,
5
+ )
@@ -0,0 +1,10 @@
1
+ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+
4
+ from ..._models import BaseModel
5
+
6
+ __all__ = ["PayICommonModelsBudgetManagementCostDetailsBase"]
7
+
8
+
9
+ class PayICommonModelsBudgetManagementCostDetailsBase(BaseModel):
10
+ base: float
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: payi
3
- Version: 0.1.0a37
3
+ Version: 0.1.0a39
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