payi 0.1.0a5__tar.gz → 0.1.0a6__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 (92) hide show
  1. {payi-0.1.0a5 → payi-0.1.0a6}/.gitignore +1 -0
  2. payi-0.1.0a6/.release-please-manifest.json +3 -0
  3. {payi-0.1.0a5 → payi-0.1.0a6}/CHANGELOG.md +8 -0
  4. {payi-0.1.0a5 → payi-0.1.0a6}/PKG-INFO +1 -1
  5. {payi-0.1.0a5 → payi-0.1.0a6}/pyproject.toml +1 -1
  6. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_utils/__init__.py +4 -1
  7. payi-0.1.0a6/src/payi/_utils/_reflection.py +42 -0
  8. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_version.py +1 -1
  9. payi-0.1.0a6/src/payi/lib/helpers.py +32 -0
  10. payi-0.1.0a5/.release-please-manifest.json +0 -3
  11. payi-0.1.0a5/src/payi/_utils/_reflection.py +0 -8
  12. {payi-0.1.0a5 → payi-0.1.0a6}/CONTRIBUTING.md +0 -0
  13. {payi-0.1.0a5 → payi-0.1.0a6}/LICENSE +0 -0
  14. {payi-0.1.0a5 → payi-0.1.0a6}/README.md +0 -0
  15. {payi-0.1.0a5 → payi-0.1.0a6}/SECURITY.md +0 -0
  16. {payi-0.1.0a5 → payi-0.1.0a6}/api.md +0 -0
  17. {payi-0.1.0a5 → payi-0.1.0a6}/bin/check-release-environment +0 -0
  18. {payi-0.1.0a5 → payi-0.1.0a6}/bin/publish-pypi +0 -0
  19. {payi-0.1.0a5 → payi-0.1.0a6}/examples/.keep +0 -0
  20. {payi-0.1.0a5 → payi-0.1.0a6}/mypy.ini +0 -0
  21. {payi-0.1.0a5 → payi-0.1.0a6}/noxfile.py +0 -0
  22. {payi-0.1.0a5 → payi-0.1.0a6}/release-please-config.json +0 -0
  23. {payi-0.1.0a5 → payi-0.1.0a6}/requirements-dev.lock +0 -0
  24. {payi-0.1.0a5 → payi-0.1.0a6}/requirements.lock +0 -0
  25. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/__init__.py +0 -0
  26. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_base_client.py +0 -0
  27. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_client.py +0 -0
  28. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_compat.py +0 -0
  29. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_constants.py +0 -0
  30. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_exceptions.py +0 -0
  31. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_files.py +0 -0
  32. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_models.py +0 -0
  33. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_qs.py +0 -0
  34. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_resource.py +0 -0
  35. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_response.py +0 -0
  36. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_streaming.py +0 -0
  37. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_types.py +0 -0
  38. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_utils/_logs.py +0 -0
  39. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_utils/_proxy.py +0 -0
  40. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_utils/_streams.py +0 -0
  41. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_utils/_sync.py +0 -0
  42. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_utils/_transform.py +0 -0
  43. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_utils/_typing.py +0 -0
  44. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/_utils/_utils.py +0 -0
  45. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/lib/.keep +0 -0
  46. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/py.typed +0 -0
  47. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/resources/__init__.py +0 -0
  48. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/resources/budgets/__init__.py +0 -0
  49. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/resources/budgets/budgets.py +0 -0
  50. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/resources/budgets/tags.py +0 -0
  51. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/resources/ingest.py +0 -0
  52. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/__init__.py +0 -0
  53. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/budget_create_params.py +0 -0
  54. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/budget_history_response.py +0 -0
  55. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/budget_list_params.py +0 -0
  56. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/budget_response.py +0 -0
  57. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/budget_update_params.py +0 -0
  58. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/budgets/__init__.py +0 -0
  59. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/budgets/budget_tags_response.py +0 -0
  60. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/budgets/tag_create_params.py +0 -0
  61. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/budgets/tag_create_response.py +0 -0
  62. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/budgets/tag_delete_response.py +0 -0
  63. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/budgets/tag_list_response.py +0 -0
  64. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/budgets/tag_remove_params.py +0 -0
  65. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/budgets/tag_remove_response.py +0 -0
  66. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/budgets/tag_update_params.py +0 -0
  67. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/budgets/tag_update_response.py +0 -0
  68. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/default_response.py +0 -0
  69. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/ingest_units_params.py +0 -0
  70. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/paged_budget_list.py +0 -0
  71. {payi-0.1.0a5 → payi-0.1.0a6}/src/payi/types/successful_proxy_result.py +0 -0
  72. {payi-0.1.0a5 → payi-0.1.0a6}/tests/__init__.py +0 -0
  73. {payi-0.1.0a5 → payi-0.1.0a6}/tests/api_resources/__init__.py +0 -0
  74. {payi-0.1.0a5 → payi-0.1.0a6}/tests/api_resources/budgets/__init__.py +0 -0
  75. {payi-0.1.0a5 → payi-0.1.0a6}/tests/api_resources/budgets/test_tags.py +0 -0
  76. {payi-0.1.0a5 → payi-0.1.0a6}/tests/api_resources/test_budgets.py +0 -0
  77. {payi-0.1.0a5 → payi-0.1.0a6}/tests/api_resources/test_ingest.py +0 -0
  78. {payi-0.1.0a5 → payi-0.1.0a6}/tests/conftest.py +0 -0
  79. {payi-0.1.0a5 → payi-0.1.0a6}/tests/sample_file.txt +0 -0
  80. {payi-0.1.0a5 → payi-0.1.0a6}/tests/test_client.py +0 -0
  81. {payi-0.1.0a5 → payi-0.1.0a6}/tests/test_deepcopy.py +0 -0
  82. {payi-0.1.0a5 → payi-0.1.0a6}/tests/test_extract_files.py +0 -0
  83. {payi-0.1.0a5 → payi-0.1.0a6}/tests/test_files.py +0 -0
  84. {payi-0.1.0a5 → payi-0.1.0a6}/tests/test_models.py +0 -0
  85. {payi-0.1.0a5 → payi-0.1.0a6}/tests/test_qs.py +0 -0
  86. {payi-0.1.0a5 → payi-0.1.0a6}/tests/test_required_args.py +0 -0
  87. {payi-0.1.0a5 → payi-0.1.0a6}/tests/test_response.py +0 -0
  88. {payi-0.1.0a5 → payi-0.1.0a6}/tests/test_streaming.py +0 -0
  89. {payi-0.1.0a5 → payi-0.1.0a6}/tests/test_transform.py +0 -0
  90. {payi-0.1.0a5 → payi-0.1.0a6}/tests/test_utils/test_proxy.py +0 -0
  91. {payi-0.1.0a5 → payi-0.1.0a6}/tests/test_utils/test_typing.py +0 -0
  92. {payi-0.1.0a5 → payi-0.1.0a6}/tests/utils.py +0 -0
@@ -1,3 +1,4 @@
1
+ .prism.log
1
2
  .vscode
2
3
  _dev
3
4
 
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.6"
3
+ }
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.6 (2024-06-30)
4
+
5
+ Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.5...v0.1.0-alpha.6)
6
+
7
+ ### Features
8
+
9
+ * **api:** update via SDK Studio ([#21](https://github.com/Pay-i/pay-i-python/issues/21)) ([daa4259](https://github.com/Pay-i/pay-i-python/commit/daa4259dc2156dd84843d3264362a6a53ee842c4))
10
+
3
11
  ## 0.1.0-alpha.5 (2024-06-28)
4
12
 
5
13
  Full Changelog: [v0.1.0-alpha.4...v0.1.0-alpha.5](https://github.com/Pay-i/pay-i-python/compare/v0.1.0-alpha.4...v0.1.0-alpha.5)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: payi
3
- Version: 0.1.0a5
3
+ Version: 0.1.0a6
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.5"
3
+ version = "0.1.0-alpha.6"
4
4
  description = "The official Python library for the payi API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -49,4 +49,7 @@ from ._transform import (
49
49
  maybe_transform as maybe_transform,
50
50
  async_maybe_transform as async_maybe_transform,
51
51
  )
52
- from ._reflection import function_has_argument as function_has_argument
52
+ from ._reflection import (
53
+ function_has_argument as function_has_argument,
54
+ assert_signatures_in_sync as assert_signatures_in_sync,
55
+ )
@@ -0,0 +1,42 @@
1
+ from __future__ import annotations
2
+
3
+ import inspect
4
+ from typing import Any, Callable
5
+
6
+
7
+ def function_has_argument(func: Callable[..., Any], arg_name: str) -> bool:
8
+ """Returns whether or not the given function has a specific parameter"""
9
+ sig = inspect.signature(func)
10
+ return arg_name in sig.parameters
11
+
12
+
13
+ def assert_signatures_in_sync(
14
+ source_func: Callable[..., Any],
15
+ check_func: Callable[..., Any],
16
+ *,
17
+ exclude_params: set[str] = set(),
18
+ ) -> None:
19
+ """Ensure that the signature of the second function matches the first."""
20
+
21
+ check_sig = inspect.signature(check_func)
22
+ source_sig = inspect.signature(source_func)
23
+
24
+ errors: list[str] = []
25
+
26
+ for name, source_param in source_sig.parameters.items():
27
+ if name in exclude_params:
28
+ continue
29
+
30
+ custom_param = check_sig.parameters.get(name)
31
+ if not custom_param:
32
+ errors.append(f"the `{name}` param is missing")
33
+ continue
34
+
35
+ if custom_param.annotation != source_param.annotation:
36
+ errors.append(
37
+ f"types for the `{name}` param are do not match; source={repr(source_param.annotation)} checking={repr(source_param.annotation)}"
38
+ )
39
+ continue
40
+
41
+ if errors:
42
+ raise AssertionError(f"{len(errors)} errors encountered when comparing signatures:\n\n" + "\n\n".join(errors))
@@ -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.5" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.6" # x-release-please-version
@@ -0,0 +1,32 @@
1
+ # Step 1: Define the new methods outside of the Payi class definition
2
+ from typing import Dict, List, Union
3
+
4
+
5
+ def create_budget_header_from_ids(budget_ids: List[str]) -> Dict[str, str]:
6
+ if not isinstance(budget_ids, list): # type: ignore
7
+ raise TypeError("budget_ids must be a list")
8
+
9
+ valid_ids = [id.strip() for id in budget_ids if isinstance(id, str) and id.strip()] # type: ignore
10
+
11
+ return {"xProxy-Budget-IDs": ",".join(valid_ids)} if valid_ids else {}
12
+
13
+ def create_request_header_from_tags(request_tags: List[str]) -> Dict[str, str]:
14
+ if not isinstance(request_tags, list): # type: ignore
15
+ raise TypeError("request_tags must be a list")
16
+
17
+ valid_tags = [tag.strip() for tag in request_tags if isinstance(tag, str) and tag.strip()] # type: ignore
18
+
19
+ return {"xProxy-Request-Tags": ",".join(valid_tags)} if valid_tags else {}
20
+
21
+ def create_headers(
22
+ budget_ids: Union[List[str], None] = None,
23
+ request_tags: Union[List[str], None] = None
24
+ ) -> Dict[str, str]:
25
+ headers: Dict[str, str] = {}
26
+
27
+ if budget_ids:
28
+ headers.update(create_budget_header_from_ids(budget_ids))
29
+ if request_tags:
30
+ headers.update(create_request_header_from_tags(request_tags))
31
+
32
+ return headers
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.1.0-alpha.5"
3
- }
@@ -1,8 +0,0 @@
1
- import inspect
2
- from typing import Any, Callable
3
-
4
-
5
- def function_has_argument(func: Callable[..., Any], arg_name: str) -> bool:
6
- """Returns whether or not the given function has a specific parameter"""
7
- sig = inspect.signature(func)
8
- return arg_name in sig.parameters
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