payi 0.1.0a8__tar.gz → 0.1.0a9__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.

Files changed (94) hide show
  1. payi-0.1.0a9/.release-please-manifest.json +3 -0
  2. {payi-0.1.0a8 → payi-0.1.0a9}/CHANGELOG.md +8 -0
  3. {payi-0.1.0a8 → payi-0.1.0a9}/PKG-INFO +1 -1
  4. {payi-0.1.0a8 → payi-0.1.0a9}/pyproject.toml +1 -1
  5. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_models.py +27 -0
  6. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_version.py +1 -1
  7. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/resources/ingest.py +5 -0
  8. payi-0.1.0a8/.release-please-manifest.json +0 -3
  9. {payi-0.1.0a8 → payi-0.1.0a9}/.gitignore +0 -0
  10. {payi-0.1.0a8 → payi-0.1.0a9}/CONTRIBUTING.md +0 -0
  11. {payi-0.1.0a8 → payi-0.1.0a9}/LICENSE +0 -0
  12. {payi-0.1.0a8 → payi-0.1.0a9}/README.md +0 -0
  13. {payi-0.1.0a8 → payi-0.1.0a9}/SECURITY.md +0 -0
  14. {payi-0.1.0a8 → payi-0.1.0a9}/api.md +0 -0
  15. {payi-0.1.0a8 → payi-0.1.0a9}/bin/check-release-environment +0 -0
  16. {payi-0.1.0a8 → payi-0.1.0a9}/bin/publish-pypi +0 -0
  17. {payi-0.1.0a8 → payi-0.1.0a9}/examples/.keep +0 -0
  18. {payi-0.1.0a8 → payi-0.1.0a9}/mypy.ini +0 -0
  19. {payi-0.1.0a8 → payi-0.1.0a9}/noxfile.py +0 -0
  20. {payi-0.1.0a8 → payi-0.1.0a9}/release-please-config.json +0 -0
  21. {payi-0.1.0a8 → payi-0.1.0a9}/requirements-dev.lock +0 -0
  22. {payi-0.1.0a8 → payi-0.1.0a9}/requirements.lock +0 -0
  23. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/__init__.py +0 -0
  24. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_base_client.py +0 -0
  25. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_client.py +0 -0
  26. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_compat.py +0 -0
  27. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_constants.py +0 -0
  28. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_exceptions.py +0 -0
  29. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_files.py +0 -0
  30. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_qs.py +0 -0
  31. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_resource.py +0 -0
  32. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_response.py +0 -0
  33. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_streaming.py +0 -0
  34. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_types.py +0 -0
  35. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_utils/__init__.py +0 -0
  36. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_utils/_logs.py +0 -0
  37. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_utils/_proxy.py +0 -0
  38. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_utils/_reflection.py +0 -0
  39. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_utils/_streams.py +0 -0
  40. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_utils/_sync.py +0 -0
  41. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_utils/_transform.py +0 -0
  42. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_utils/_typing.py +0 -0
  43. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/_utils/_utils.py +0 -0
  44. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/lib/.keep +0 -0
  45. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/lib/helpers.py +0 -0
  46. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/py.typed +0 -0
  47. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/resources/__init__.py +0 -0
  48. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/resources/budgets/__init__.py +0 -0
  49. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/resources/budgets/budgets.py +0 -0
  50. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/resources/budgets/tags.py +0 -0
  51. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/__init__.py +0 -0
  52. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/budget_create_params.py +0 -0
  53. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/budget_history_response.py +0 -0
  54. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/budget_list_params.py +0 -0
  55. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/budget_response.py +0 -0
  56. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/budget_update_params.py +0 -0
  57. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/budgets/__init__.py +0 -0
  58. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/budgets/budget_tags.py +0 -0
  59. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/budgets/tag_create_params.py +0 -0
  60. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/budgets/tag_create_response.py +0 -0
  61. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/budgets/tag_delete_response.py +0 -0
  62. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/budgets/tag_list_response.py +0 -0
  63. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/budgets/tag_remove_params.py +0 -0
  64. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/budgets/tag_remove_response.py +0 -0
  65. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/budgets/tag_update_params.py +0 -0
  66. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/budgets/tag_update_response.py +0 -0
  67. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/cost_data.py +0 -0
  68. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/cost_details.py +0 -0
  69. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/default_response.py +0 -0
  70. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/ingest_units_params.py +0 -0
  71. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/paged_budget_list.py +0 -0
  72. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/proxy_result.py +0 -0
  73. {payi-0.1.0a8 → payi-0.1.0a9}/src/payi/types/requests_data.py +0 -0
  74. {payi-0.1.0a8 → payi-0.1.0a9}/tests/__init__.py +0 -0
  75. {payi-0.1.0a8 → payi-0.1.0a9}/tests/api_resources/__init__.py +0 -0
  76. {payi-0.1.0a8 → payi-0.1.0a9}/tests/api_resources/budgets/__init__.py +0 -0
  77. {payi-0.1.0a8 → payi-0.1.0a9}/tests/api_resources/budgets/test_tags.py +0 -0
  78. {payi-0.1.0a8 → payi-0.1.0a9}/tests/api_resources/test_budgets.py +0 -0
  79. {payi-0.1.0a8 → payi-0.1.0a9}/tests/api_resources/test_ingest.py +0 -0
  80. {payi-0.1.0a8 → payi-0.1.0a9}/tests/conftest.py +0 -0
  81. {payi-0.1.0a8 → payi-0.1.0a9}/tests/sample_file.txt +0 -0
  82. {payi-0.1.0a8 → payi-0.1.0a9}/tests/test_client.py +0 -0
  83. {payi-0.1.0a8 → payi-0.1.0a9}/tests/test_deepcopy.py +0 -0
  84. {payi-0.1.0a8 → payi-0.1.0a9}/tests/test_extract_files.py +0 -0
  85. {payi-0.1.0a8 → payi-0.1.0a9}/tests/test_files.py +0 -0
  86. {payi-0.1.0a8 → payi-0.1.0a9}/tests/test_models.py +0 -0
  87. {payi-0.1.0a8 → payi-0.1.0a9}/tests/test_qs.py +0 -0
  88. {payi-0.1.0a8 → payi-0.1.0a9}/tests/test_required_args.py +0 -0
  89. {payi-0.1.0a8 → payi-0.1.0a9}/tests/test_response.py +0 -0
  90. {payi-0.1.0a8 → payi-0.1.0a9}/tests/test_streaming.py +0 -0
  91. {payi-0.1.0a8 → payi-0.1.0a9}/tests/test_transform.py +0 -0
  92. {payi-0.1.0a8 → payi-0.1.0a9}/tests/test_utils/test_proxy.py +0 -0
  93. {payi-0.1.0a8 → payi-0.1.0a9}/tests/test_utils/test_typing.py +0 -0
  94. {payi-0.1.0a8 → payi-0.1.0a9}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.9"
3
+ }
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.9 (2024-07-02)
4
+
5
+ Full Changelog: [v0.1.0-alpha.8...v0.1.0-alpha.9](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.8...v0.1.0-alpha.9)
6
+
7
+ ### Features
8
+
9
+ * **api:** update via SDK Studio ([#34](https://github.com/Pay-i/pay-i-python/issues/34)) ([f05bc0e](https://github.com/Pay-i/pay-i-python/commit/f05bc0ee6357f32724b3199ea92aa8f5c17723e1))
10
+
3
11
  ## 0.1.0-alpha.8 (2024-07-02)
4
12
 
5
13
  Full Changelog: [v0.1.0-alpha.7...v0.1.0-alpha.8](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.7...v0.1.0-alpha.8)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: payi
3
- Version: 0.1.0a8
3
+ Version: 0.1.0a9
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "payi"
3
- version = "0.1.0-alpha.8"
3
+ version = "0.1.0-alpha.9"
4
4
  description = "The official Python library for the payi API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -10,6 +10,7 @@ from typing_extensions import (
10
10
  ClassVar,
11
11
  Protocol,
12
12
  Required,
13
+ ParamSpec,
13
14
  TypedDict,
14
15
  TypeGuard,
15
16
  final,
@@ -67,6 +68,9 @@ if TYPE_CHECKING:
67
68
  __all__ = ["BaseModel", "GenericModel"]
68
69
 
69
70
  _T = TypeVar("_T")
71
+ _BaseModelT = TypeVar("_BaseModelT", bound="BaseModel")
72
+
73
+ P = ParamSpec("P")
70
74
 
71
75
 
72
76
  @runtime_checkable
@@ -379,6 +383,29 @@ def is_basemodel_type(type_: type) -> TypeGuard[type[BaseModel] | type[GenericMo
379
383
  return issubclass(origin, BaseModel) or issubclass(origin, GenericModel)
380
384
 
381
385
 
386
+ def build(
387
+ base_model_cls: Callable[P, _BaseModelT],
388
+ *args: P.args,
389
+ **kwargs: P.kwargs,
390
+ ) -> _BaseModelT:
391
+ """Construct a BaseModel class without validation.
392
+
393
+ This is useful for cases where you need to instantiate a `BaseModel`
394
+ from an API response as this provides type-safe params which isn't supported
395
+ by helpers like `construct_type()`.
396
+
397
+ ```py
398
+ build(MyModel, my_field_a="foo", my_field_b=123)
399
+ ```
400
+ """
401
+ if args:
402
+ raise TypeError(
403
+ "Received positional arguments which are not supported; Keyword arguments must be used instead",
404
+ )
405
+
406
+ return cast(_BaseModelT, construct_type(type_=base_model_cls, value=kwargs))
407
+
408
+
382
409
  def construct_type(*, value: object, type_: object) -> object:
383
410
  """Loose coercion to the expected type with construction of nested values.
384
411
 
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "payi"
4
- __version__ = "0.1.0-alpha.8" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.9" # x-release-please-version
@@ -69,12 +69,17 @@ class IngestResource(SyncAPIResource):
69
69
 
70
70
  if isinstance(budget_ids, NotGiven):
71
71
  valid_ids_str = NOT_GIVEN
72
+ elif not isinstance(budget_ids, list): # type: ignore
73
+ raise TypeError("budget_ids must be a list")
72
74
  else:
73
75
  # Proceed with the list comprehension if budget_ids is not NotGiven
74
76
  valid_ids = [id.strip() for id in budget_ids if id.strip()]
75
77
  valid_ids_str = ",".join(valid_ids) if valid_ids else NOT_GIVEN
78
+
76
79
  if isinstance(request_tags, NotGiven):
77
80
  valid_tags_str = NOT_GIVEN
81
+ elif not isinstance(request_tags, list): # type: ignore
82
+ raise TypeError("request_tags must be a list")
78
83
  else:
79
84
  # Proceed with the list comprehension if budget_ids is not NotGiven
80
85
  valid_tags = [tag.strip() for tag in request_tags if tag.strip()]
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.1.0-alpha.8"
3
- }
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