streak_crm 0.8.0__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.
Files changed (155) hide show
  1. streak_crm-0.8.0/PKG-INFO +208 -0
  2. streak_crm-0.8.0/README.md +176 -0
  3. streak_crm-0.8.0/pyproject.toml +96 -0
  4. streak_crm-0.8.0/src/streak_crm/__init__.py +355 -0
  5. streak_crm-0.8.0/src/streak_crm/_default_clients.py +30 -0
  6. streak_crm-0.8.0/src/streak_crm/api_keys/__init__.py +4 -0
  7. streak_crm-0.8.0/src/streak_crm/api_keys/client.py +265 -0
  8. streak_crm-0.8.0/src/streak_crm/api_keys/raw_client.py +307 -0
  9. streak_crm-0.8.0/src/streak_crm/boxes/__init__.py +4 -0
  10. streak_crm-0.8.0/src/streak_crm/boxes/client.py +127 -0
  11. streak_crm-0.8.0/src/streak_crm/boxes/raw_client.py +112 -0
  12. streak_crm-0.8.0/src/streak_crm/client.py +442 -0
  13. streak_crm-0.8.0/src/streak_crm/comments/__init__.py +4 -0
  14. streak_crm-0.8.0/src/streak_crm/comments/client.py +646 -0
  15. streak_crm-0.8.0/src/streak_crm/comments/raw_client.py +763 -0
  16. streak_crm-0.8.0/src/streak_crm/contact/__init__.py +4 -0
  17. streak_crm-0.8.0/src/streak_crm/contact/client.py +848 -0
  18. streak_crm-0.8.0/src/streak_crm/contact/raw_client.py +947 -0
  19. streak_crm-0.8.0/src/streak_crm/core/__init__.py +127 -0
  20. streak_crm-0.8.0/src/streak_crm/core/api_error.py +23 -0
  21. streak_crm-0.8.0/src/streak_crm/core/client_wrapper.py +147 -0
  22. streak_crm-0.8.0/src/streak_crm/core/datetime_utils.py +70 -0
  23. streak_crm-0.8.0/src/streak_crm/core/file.py +67 -0
  24. streak_crm-0.8.0/src/streak_crm/core/force_multipart.py +18 -0
  25. streak_crm-0.8.0/src/streak_crm/core/http_client.py +940 -0
  26. streak_crm-0.8.0/src/streak_crm/core/http_response.py +63 -0
  27. streak_crm-0.8.0/src/streak_crm/core/http_sse/__init__.py +42 -0
  28. streak_crm-0.8.0/src/streak_crm/core/http_sse/_api.py +455 -0
  29. streak_crm-0.8.0/src/streak_crm/core/http_sse/_decoders.py +74 -0
  30. streak_crm-0.8.0/src/streak_crm/core/http_sse/_exceptions.py +7 -0
  31. streak_crm-0.8.0/src/streak_crm/core/http_sse/_models.py +17 -0
  32. streak_crm-0.8.0/src/streak_crm/core/jsonable_encoder.py +133 -0
  33. streak_crm-0.8.0/src/streak_crm/core/logging.py +107 -0
  34. streak_crm-0.8.0/src/streak_crm/core/parse_error.py +36 -0
  35. streak_crm-0.8.0/src/streak_crm/core/pydantic_utilities.py +486 -0
  36. streak_crm-0.8.0/src/streak_crm/core/query_encoder.py +58 -0
  37. streak_crm-0.8.0/src/streak_crm/core/remove_none_from_dict.py +11 -0
  38. streak_crm-0.8.0/src/streak_crm/core/request_options.py +40 -0
  39. streak_crm-0.8.0/src/streak_crm/core/serialization.py +347 -0
  40. streak_crm-0.8.0/src/streak_crm/environment.py +7 -0
  41. streak_crm-0.8.0/src/streak_crm/meetings/__init__.py +4 -0
  42. streak_crm-0.8.0/src/streak_crm/meetings/client.py +576 -0
  43. streak_crm-0.8.0/src/streak_crm/meetings/raw_client.py +636 -0
  44. streak_crm-0.8.0/src/streak_crm/organization/__init__.py +4 -0
  45. streak_crm-0.8.0/src/streak_crm/organization/client.py +821 -0
  46. streak_crm-0.8.0/src/streak_crm/organization/raw_client.py +916 -0
  47. streak_crm-0.8.0/src/streak_crm/pipeline/__init__.py +4 -0
  48. streak_crm-0.8.0/src/streak_crm/pipeline/client.py +1135 -0
  49. streak_crm-0.8.0/src/streak_crm/pipeline/raw_client.py +1294 -0
  50. streak_crm-0.8.0/src/streak_crm/pipeline_stage/__init__.py +4 -0
  51. streak_crm-0.8.0/src/streak_crm/pipeline_stage/client.py +477 -0
  52. streak_crm-0.8.0/src/streak_crm/pipeline_stage/raw_client.py +548 -0
  53. streak_crm-0.8.0/src/streak_crm/py.typed +0 -0
  54. streak_crm-0.8.0/src/streak_crm/search/__init__.py +4 -0
  55. streak_crm-0.8.0/src/streak_crm/search/client.py +172 -0
  56. streak_crm-0.8.0/src/streak_crm/search/raw_client.py +171 -0
  57. streak_crm-0.8.0/src/streak_crm/tasks/__init__.py +4 -0
  58. streak_crm-0.8.0/src/streak_crm/tasks/client.py +730 -0
  59. streak_crm-0.8.0/src/streak_crm/tasks/raw_client.py +817 -0
  60. streak_crm-0.8.0/src/streak_crm/team/__init__.py +4 -0
  61. streak_crm-0.8.0/src/streak_crm/team/client.py +474 -0
  62. streak_crm-0.8.0/src/streak_crm/team/raw_client.py +567 -0
  63. streak_crm-0.8.0/src/streak_crm/types/__init__.py +299 -0
  64. streak_crm-0.8.0/src/streak_crm/types/action.py +30 -0
  65. streak_crm-0.8.0/src/streak_crm/types/action_type.py +5 -0
  66. streak_crm-0.8.0/src/streak_crm/types/activity_source_type.py +5 -0
  67. streak_crm-0.8.0/src/streak_crm/types/api_key.py +77 -0
  68. streak_crm-0.8.0/src/streak_crm/types/api_key_type.py +5 -0
  69. streak_crm-0.8.0/src/streak_crm/types/assignee_input.py +40 -0
  70. streak_crm-0.8.0/src/streak_crm/types/autofill_source.py +5 -0
  71. streak_crm-0.8.0/src/streak_crm/types/comment.py +108 -0
  72. streak_crm-0.8.0/src/streak_crm/types/comment_list_response.py +40 -0
  73. streak_crm-0.8.0/src/streak_crm/types/comment_mention.py +36 -0
  74. streak_crm-0.8.0/src/streak_crm/types/comment_mention_body.py +36 -0
  75. streak_crm-0.8.0/src/streak_crm/types/comment_reaction_body.py +22 -0
  76. streak_crm-0.8.0/src/streak_crm/types/comment_reaction_summary.py +33 -0
  77. streak_crm-0.8.0/src/streak_crm/types/contact.py +239 -0
  78. streak_crm-0.8.0/src/streak_crm/types/contact_key_batch.py +7 -0
  79. streak_crm-0.8.0/src/streak_crm/types/contact_link.py +48 -0
  80. streak_crm-0.8.0/src/streak_crm/types/contact_link_input.py +48 -0
  81. streak_crm-0.8.0/src/streak_crm/types/contact_page.py +32 -0
  82. streak_crm-0.8.0/src/streak_crm/types/email_sharing.py +5 -0
  83. streak_crm-0.8.0/src/streak_crm/types/field_type.py +10 -0
  84. streak_crm-0.8.0/src/streak_crm/types/invite_status.py +5 -0
  85. streak_crm-0.8.0/src/streak_crm/types/meeting.py +121 -0
  86. streak_crm-0.8.0/src/streak_crm/types/meeting_list_response.py +40 -0
  87. streak_crm-0.8.0/src/streak_crm/types/meeting_type.py +5 -0
  88. streak_crm-0.8.0/src/streak_crm/types/operation_response.py +27 -0
  89. streak_crm-0.8.0/src/streak_crm/types/organization.py +220 -0
  90. streak_crm-0.8.0/src/streak_crm/types/organization_link.py +48 -0
  91. streak_crm-0.8.0/src/streak_crm/types/organization_link_input.py +48 -0
  92. streak_crm-0.8.0/src/streak_crm/types/organization_page.py +32 -0
  93. streak_crm-0.8.0/src/streak_crm/types/pipeline.py +199 -0
  94. streak_crm-0.8.0/src/streak_crm/types/pipeline_ai_settings.py +28 -0
  95. streak_crm-0.8.0/src/streak_crm/types/pipeline_autofill_source.py +5 -0
  96. streak_crm-0.8.0/src/streak_crm/types/pipeline_conditional_check.py +10 -0
  97. streak_crm-0.8.0/src/streak_crm/types/pipeline_dropdown_item.py +27 -0
  98. streak_crm-0.8.0/src/streak_crm/types/pipeline_dropdown_settings.py +23 -0
  99. streak_crm-0.8.0/src/streak_crm/types/pipeline_field.py +97 -0
  100. streak_crm-0.8.0/src/streak_crm/types/pipeline_field_ai_settings_update.py +31 -0
  101. streak_crm-0.8.0/src/streak_crm/types/pipeline_field_create.py +41 -0
  102. streak_crm-0.8.0/src/streak_crm/types/pipeline_field_dropdown_item_update.py +31 -0
  103. streak_crm-0.8.0/src/streak_crm/types/pipeline_field_dropdown_settings_update.py +27 -0
  104. streak_crm-0.8.0/src/streak_crm/types/pipeline_field_tag_item_update.py +31 -0
  105. streak_crm-0.8.0/src/streak_crm/types/pipeline_field_tag_settings_update.py +27 -0
  106. streak_crm-0.8.0/src/streak_crm/types/pipeline_list_response.py +40 -0
  107. streak_crm-0.8.0/src/streak_crm/types/pipeline_permission.py +51 -0
  108. streak_crm-0.8.0/src/streak_crm/types/pipeline_permission_input.py +51 -0
  109. streak_crm-0.8.0/src/streak_crm/types/pipeline_permission_set.py +34 -0
  110. streak_crm-0.8.0/src/streak_crm/types/pipeline_permission_set_input.py +34 -0
  111. streak_crm-0.8.0/src/streak_crm/types/pipeline_sharing_entry.py +90 -0
  112. streak_crm-0.8.0/src/streak_crm/types/pipeline_sharing_entry_input.py +45 -0
  113. streak_crm-0.8.0/src/streak_crm/types/pipeline_stage.py +53 -0
  114. streak_crm-0.8.0/src/streak_crm/types/pipeline_stage_color.py +37 -0
  115. streak_crm-0.8.0/src/streak_crm/types/pipeline_tag_item.py +27 -0
  116. streak_crm-0.8.0/src/streak_crm/types/pipeline_tag_settings.py +23 -0
  117. streak_crm-0.8.0/src/streak_crm/types/reminder_status.py +7 -0
  118. streak_crm-0.8.0/src/streak_crm/types/role.py +5 -0
  119. streak_crm-0.8.0/src/streak_crm/types/search_box_result.py +73 -0
  120. streak_crm-0.8.0/src/streak_crm/types/search_contact_result.py +79 -0
  121. streak_crm-0.8.0/src/streak_crm/types/search_organization_result.py +80 -0
  122. streak_crm-0.8.0/src/streak_crm/types/search_response.py +37 -0
  123. streak_crm-0.8.0/src/streak_crm/types/search_results.py +39 -0
  124. streak_crm-0.8.0/src/streak_crm/types/task.py +153 -0
  125. streak_crm-0.8.0/src/streak_crm/types/task_action.py +38 -0
  126. streak_crm-0.8.0/src/streak_crm/types/task_list_response.py +40 -0
  127. streak_crm-0.8.0/src/streak_crm/types/task_status.py +5 -0
  128. streak_crm-0.8.0/src/streak_crm/types/team.py +151 -0
  129. streak_crm-0.8.0/src/streak_crm/types/team_acl_entry.py +52 -0
  130. streak_crm-0.8.0/src/streak_crm/types/team_acl_entry_update.py +41 -0
  131. streak_crm-0.8.0/src/streak_crm/types/team_based_permissions.py +47 -0
  132. streak_crm-0.8.0/src/streak_crm/types/team_based_permissions_update.py +48 -0
  133. streak_crm-0.8.0/src/streak_crm/types/team_dropdown_item.py +31 -0
  134. streak_crm-0.8.0/src/streak_crm/types/team_dropdown_settings.py +27 -0
  135. streak_crm-0.8.0/src/streak_crm/types/team_dropdown_settings_update.py +27 -0
  136. streak_crm-0.8.0/src/streak_crm/types/team_field.py +92 -0
  137. streak_crm-0.8.0/src/streak_crm/types/team_field_settings.py +27 -0
  138. streak_crm-0.8.0/src/streak_crm/types/team_field_settings_update.py +27 -0
  139. streak_crm-0.8.0/src/streak_crm/types/team_field_update.py +92 -0
  140. streak_crm-0.8.0/src/streak_crm/types/team_list_response.py +40 -0
  141. streak_crm-0.8.0/src/streak_crm/types/team_member.py +113 -0
  142. streak_crm-0.8.0/src/streak_crm/types/team_member_create.py +37 -0
  143. streak_crm-0.8.0/src/streak_crm/types/team_member_update.py +63 -0
  144. streak_crm-0.8.0/src/streak_crm/types/team_tag_item.py +31 -0
  145. streak_crm-0.8.0/src/streak_crm/types/team_tag_settings.py +27 -0
  146. streak_crm-0.8.0/src/streak_crm/types/team_tag_settings_update.py +27 -0
  147. streak_crm-0.8.0/src/streak_crm/types/user.py +253 -0
  148. streak_crm-0.8.0/src/streak_crm/types/user_brief.py +67 -0
  149. streak_crm-0.8.0/src/streak_crm/types/user_list_response.py +40 -0
  150. streak_crm-0.8.0/src/streak_crm/types/user_type.py +5 -0
  151. streak_crm-0.8.0/src/streak_crm/types/workflow_theme.py +35 -0
  152. streak_crm-0.8.0/src/streak_crm/users/__init__.py +4 -0
  153. streak_crm-0.8.0/src/streak_crm/users/client.py +388 -0
  154. streak_crm-0.8.0/src/streak_crm/users/raw_client.py +436 -0
  155. streak_crm-0.8.0/src/streak_crm/version.py +3 -0
@@ -0,0 +1,208 @@
1
+ Metadata-Version: 2.4
2
+ Name: streak_crm
3
+ Version: 0.8.0
4
+ Summary:
5
+ Requires-Python: >=3.10,<4.0
6
+ Classifier: Intended Audience :: Developers
7
+ Classifier: Operating System :: MacOS
8
+ Classifier: Operating System :: Microsoft :: Windows
9
+ Classifier: Operating System :: OS Independent
10
+ Classifier: Operating System :: POSIX
11
+ Classifier: Operating System :: POSIX :: Linux
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Programming Language :: Python :: 3.14
19
+ Classifier: Programming Language :: Python :: 3.15
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Typing :: Typed
22
+ Provides-Extra: aiohttp
23
+ Requires-Dist: aiohttp (>=3.14.1,<4) ; (python_version >= "3.10") and (extra == "aiohttp")
24
+ Requires-Dist: httpx (>=0.21.2)
25
+ Requires-Dist: httpx-aiohttp (>=0.1.8,<0.2.0) ; (python_version >= "3.10") and (extra == "aiohttp")
26
+ Requires-Dist: pydantic (>=1.9.2)
27
+ Requires-Dist: pydantic-core (>=2.18.2,<3.0.0)
28
+ Requires-Dist: typing_extensions (>=4.0.0)
29
+ Project-URL: Repository, https://github.com/StreakYC/streak-client-python
30
+ Description-Content-Type: text/markdown
31
+
32
+ # Streak Python Library
33
+
34
+ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FStreakYC%2Fstreak-client-python)
35
+ [![pypi](https://img.shields.io/pypi/v/streak_crm)](https://pypi.python.org/pypi/streak_crm)
36
+
37
+ The Streak Python library provides convenient access to the Streak APIs from Python.
38
+
39
+ ## Table of Contents
40
+
41
+ - [Installation](#installation)
42
+ - [Reference](#reference)
43
+ - [Usage](#usage)
44
+ - [Async Client](#async-client)
45
+ - [Exception Handling](#exception-handling)
46
+ - [Advanced](#advanced)
47
+ - [Access Raw Response Data](#access-raw-response-data)
48
+ - [Retries](#retries)
49
+ - [Timeouts](#timeouts)
50
+ - [Custom Client](#custom-client)
51
+ - [Contributing](#contributing)
52
+
53
+ ## Installation
54
+
55
+ ```sh
56
+ pip install streak_crm
57
+ ```
58
+
59
+ ## Reference
60
+
61
+ A full reference for this library is available [here](https://github.com/StreakYC/streak-client-python/blob/HEAD/./reference.md).
62
+
63
+ ## Usage
64
+
65
+ Instantiate and use the client with the following:
66
+
67
+ ```python
68
+ from streak_crm import Streak
69
+
70
+ client = Streak(
71
+ token="<token>",
72
+ )
73
+
74
+ client.pipeline.update_pipeline_field(
75
+ pipeline_key="pipelineKey",
76
+ field_key="fieldKey",
77
+ )
78
+ ```
79
+
80
+ ## Async Client
81
+
82
+ The SDK also exports an `async` client so that you can make non-blocking calls to our API. Note that if you are constructing an Async httpx client class to pass into this client, use `httpx.AsyncClient()` instead of `httpx.Client()` (e.g. for the `httpx_client` parameter of this client).
83
+
84
+ ```python
85
+ import asyncio
86
+
87
+ from streak_crm import AsyncStreak
88
+
89
+ client = AsyncStreak(
90
+ token="<token>",
91
+ )
92
+
93
+
94
+ async def main() -> None:
95
+ await client.pipeline.update_pipeline_field(
96
+ pipeline_key="pipelineKey",
97
+ field_key="fieldKey",
98
+ )
99
+
100
+
101
+ asyncio.run(main())
102
+ ```
103
+
104
+ ## Exception Handling
105
+
106
+ When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
107
+ will be thrown.
108
+
109
+ ```python
110
+ from streak_crm.core.api_error import ApiError
111
+
112
+ try:
113
+ client.pipeline.update_pipeline_field(...)
114
+ except ApiError as e:
115
+ print(e.status_code)
116
+ print(e.body)
117
+ ```
118
+
119
+ ## Advanced
120
+
121
+ ### Access Raw Response Data
122
+
123
+ The SDK provides access to raw response data, including headers, through the `.with_raw_response` property.
124
+ The `.with_raw_response` property returns a "raw" client that can be used to access the `.headers` and `.data` attributes.
125
+
126
+ ```python
127
+ from streak_crm import Streak
128
+
129
+ client = Streak(...)
130
+ response = client.pipeline.with_raw_response.update_pipeline_field(...)
131
+ print(response.headers) # access the response headers
132
+ print(response.status_code) # access the response status code
133
+ print(response.data) # access the underlying object
134
+ ```
135
+
136
+ ### Retries
137
+
138
+ The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
139
+ as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
140
+ retry limit (default: 2).
141
+
142
+ Which status codes are retried depends on the `retryStatusCodes` generator configuration:
143
+
144
+ **`legacy`** (current default): retries on
145
+ - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
146
+ - [409](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409) (Conflict)
147
+ - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
148
+ - [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#server_error_responses) (All server errors, including 500)
149
+
150
+ **`recommended`**: retries on
151
+ - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
152
+ - [409](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409) (Conflict)
153
+ - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
154
+ - [502](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502) (Bad Gateway)
155
+ - [503](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503) (Service Unavailable)
156
+ - [504](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504) (Gateway Timeout)
157
+
158
+ Use the `max_retries` request option to configure this behavior.
159
+
160
+ ```python
161
+ client.pipeline.update_pipeline_field(..., request_options={
162
+ "max_retries": 1
163
+ })
164
+ ```
165
+
166
+ ### Timeouts
167
+
168
+ The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level.
169
+
170
+ ```python
171
+ from streak_crm import Streak
172
+
173
+ client = Streak(..., timeout=20.0)
174
+
175
+ # Override timeout for a specific method
176
+ client.pipeline.update_pipeline_field(..., request_options={
177
+ "timeout": 1
178
+ })
179
+ ```
180
+
181
+ ### Custom Client
182
+
183
+ You can override the `httpx` client to customize it for your use-case. Some common use-cases include support for proxies
184
+ and transports.
185
+
186
+ ```python
187
+ import httpx
188
+ from streak_crm import Streak
189
+
190
+ client = Streak(
191
+ ...,
192
+ httpx_client=httpx.Client(
193
+ proxy="http://my.test.proxy.example.com",
194
+ transport=httpx.HTTPTransport(local_address="0.0.0.0"),
195
+ ),
196
+ )
197
+ ```
198
+
199
+ ## Contributing
200
+
201
+ While we value open-source contributions to this SDK, this library is generated programmatically.
202
+ Additions made directly to this library would have to be moved over to our generation code,
203
+ otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
204
+ a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
205
+ an issue first to discuss with us!
206
+
207
+ On the other hand, contributions to the README are always very welcome!
208
+
@@ -0,0 +1,176 @@
1
+ # Streak Python Library
2
+
3
+ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FStreakYC%2Fstreak-client-python)
4
+ [![pypi](https://img.shields.io/pypi/v/streak_crm)](https://pypi.python.org/pypi/streak_crm)
5
+
6
+ The Streak Python library provides convenient access to the Streak APIs from Python.
7
+
8
+ ## Table of Contents
9
+
10
+ - [Installation](#installation)
11
+ - [Reference](#reference)
12
+ - [Usage](#usage)
13
+ - [Async Client](#async-client)
14
+ - [Exception Handling](#exception-handling)
15
+ - [Advanced](#advanced)
16
+ - [Access Raw Response Data](#access-raw-response-data)
17
+ - [Retries](#retries)
18
+ - [Timeouts](#timeouts)
19
+ - [Custom Client](#custom-client)
20
+ - [Contributing](#contributing)
21
+
22
+ ## Installation
23
+
24
+ ```sh
25
+ pip install streak_crm
26
+ ```
27
+
28
+ ## Reference
29
+
30
+ A full reference for this library is available [here](https://github.com/StreakYC/streak-client-python/blob/HEAD/./reference.md).
31
+
32
+ ## Usage
33
+
34
+ Instantiate and use the client with the following:
35
+
36
+ ```python
37
+ from streak_crm import Streak
38
+
39
+ client = Streak(
40
+ token="<token>",
41
+ )
42
+
43
+ client.pipeline.update_pipeline_field(
44
+ pipeline_key="pipelineKey",
45
+ field_key="fieldKey",
46
+ )
47
+ ```
48
+
49
+ ## Async Client
50
+
51
+ The SDK also exports an `async` client so that you can make non-blocking calls to our API. Note that if you are constructing an Async httpx client class to pass into this client, use `httpx.AsyncClient()` instead of `httpx.Client()` (e.g. for the `httpx_client` parameter of this client).
52
+
53
+ ```python
54
+ import asyncio
55
+
56
+ from streak_crm import AsyncStreak
57
+
58
+ client = AsyncStreak(
59
+ token="<token>",
60
+ )
61
+
62
+
63
+ async def main() -> None:
64
+ await client.pipeline.update_pipeline_field(
65
+ pipeline_key="pipelineKey",
66
+ field_key="fieldKey",
67
+ )
68
+
69
+
70
+ asyncio.run(main())
71
+ ```
72
+
73
+ ## Exception Handling
74
+
75
+ When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
76
+ will be thrown.
77
+
78
+ ```python
79
+ from streak_crm.core.api_error import ApiError
80
+
81
+ try:
82
+ client.pipeline.update_pipeline_field(...)
83
+ except ApiError as e:
84
+ print(e.status_code)
85
+ print(e.body)
86
+ ```
87
+
88
+ ## Advanced
89
+
90
+ ### Access Raw Response Data
91
+
92
+ The SDK provides access to raw response data, including headers, through the `.with_raw_response` property.
93
+ The `.with_raw_response` property returns a "raw" client that can be used to access the `.headers` and `.data` attributes.
94
+
95
+ ```python
96
+ from streak_crm import Streak
97
+
98
+ client = Streak(...)
99
+ response = client.pipeline.with_raw_response.update_pipeline_field(...)
100
+ print(response.headers) # access the response headers
101
+ print(response.status_code) # access the response status code
102
+ print(response.data) # access the underlying object
103
+ ```
104
+
105
+ ### Retries
106
+
107
+ The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
108
+ as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
109
+ retry limit (default: 2).
110
+
111
+ Which status codes are retried depends on the `retryStatusCodes` generator configuration:
112
+
113
+ **`legacy`** (current default): retries on
114
+ - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
115
+ - [409](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409) (Conflict)
116
+ - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
117
+ - [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#server_error_responses) (All server errors, including 500)
118
+
119
+ **`recommended`**: retries on
120
+ - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
121
+ - [409](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409) (Conflict)
122
+ - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
123
+ - [502](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502) (Bad Gateway)
124
+ - [503](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503) (Service Unavailable)
125
+ - [504](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504) (Gateway Timeout)
126
+
127
+ Use the `max_retries` request option to configure this behavior.
128
+
129
+ ```python
130
+ client.pipeline.update_pipeline_field(..., request_options={
131
+ "max_retries": 1
132
+ })
133
+ ```
134
+
135
+ ### Timeouts
136
+
137
+ The SDK defaults to a 60 second timeout. You can configure this with a timeout option at the client or request level.
138
+
139
+ ```python
140
+ from streak_crm import Streak
141
+
142
+ client = Streak(..., timeout=20.0)
143
+
144
+ # Override timeout for a specific method
145
+ client.pipeline.update_pipeline_field(..., request_options={
146
+ "timeout": 1
147
+ })
148
+ ```
149
+
150
+ ### Custom Client
151
+
152
+ You can override the `httpx` client to customize it for your use-case. Some common use-cases include support for proxies
153
+ and transports.
154
+
155
+ ```python
156
+ import httpx
157
+ from streak_crm import Streak
158
+
159
+ client = Streak(
160
+ ...,
161
+ httpx_client=httpx.Client(
162
+ proxy="http://my.test.proxy.example.com",
163
+ transport=httpx.HTTPTransport(local_address="0.0.0.0"),
164
+ ),
165
+ )
166
+ ```
167
+
168
+ ## Contributing
169
+
170
+ While we value open-source contributions to this SDK, this library is generated programmatically.
171
+ Additions made directly to this library would have to be moved over to our generation code,
172
+ otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
173
+ a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
174
+ an issue first to discuss with us!
175
+
176
+ On the other hand, contributions to the README are always very welcome!
@@ -0,0 +1,96 @@
1
+ [project]
2
+ name = "streak_crm"
3
+ dynamic = ["version"]
4
+
5
+ [tool.poetry]
6
+ name = "streak_crm"
7
+ version = "0.8.0"
8
+ description = ""
9
+ readme = "README.md"
10
+ authors = []
11
+ keywords = []
12
+ classifiers = [
13
+ "Intended Audience :: Developers",
14
+ "Programming Language :: Python",
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3.10",
17
+ "Programming Language :: Python :: 3.11",
18
+ "Programming Language :: Python :: 3.12",
19
+ "Programming Language :: Python :: 3.13",
20
+ "Programming Language :: Python :: 3.14",
21
+ "Programming Language :: Python :: 3.15",
22
+ "Operating System :: OS Independent",
23
+ "Operating System :: POSIX",
24
+ "Operating System :: MacOS",
25
+ "Operating System :: POSIX :: Linux",
26
+ "Operating System :: Microsoft :: Windows",
27
+ "Topic :: Software Development :: Libraries :: Python Modules",
28
+ "Typing :: Typed"
29
+ ]
30
+ packages = [
31
+ { include = "streak_crm", from = "src"}
32
+ ]
33
+
34
+ [tool.poetry.urls]
35
+ Repository = 'https://github.com/StreakYC/streak-client-python'
36
+
37
+ [tool.poetry.dependencies]
38
+ python = "^3.10"
39
+ aiohttp = { version = ">=3.14.1,<4", optional = true, python = ">=3.10"}
40
+ httpx = ">=0.21.2"
41
+ httpx-aiohttp = { version = "^0.1.8", optional = true, python = ">=3.10"}
42
+ pydantic = ">= 1.9.2"
43
+ pydantic-core = ">=2.18.2,<3.0.0"
44
+ typing_extensions = ">= 4.0.0"
45
+
46
+ [tool.poetry.group.dev.dependencies]
47
+ mypy = "==1.13.0"
48
+ pytest = "^9.0.3"
49
+ pytest-asyncio = "^1.0.0"
50
+ pytest-xdist = "^3.6.1"
51
+ python-dateutil = "^2.9.0"
52
+ types-python-dateutil = "^2.9.0.20240316"
53
+ urllib3 = ">=2.6.3,<3.0.0"
54
+ ruff = "==0.11.5"
55
+
56
+ [tool.pytest.ini_options]
57
+ testpaths = [ "tests" ]
58
+ asyncio_mode = "auto"
59
+ norecursedirs = [ "src" ]
60
+ markers = [
61
+ "aiohttp: tests that require httpx_aiohttp to be installed",
62
+ ]
63
+
64
+ [tool.mypy]
65
+ plugins = ["pydantic.mypy"]
66
+
67
+ [tool.ruff]
68
+ line-length = 120
69
+
70
+ [tool.ruff.lint]
71
+ select = [
72
+ "E", # pycodestyle errors
73
+ "F", # pyflakes
74
+ "I", # isort
75
+ ]
76
+ ignore = [
77
+ "E402", # Module level import not at top of file
78
+ "E501", # Line too long
79
+ "E711", # Comparison to `None` should be `cond is not None`
80
+ "E712", # Avoid equality comparisons to `True`; use `if ...:` checks
81
+ "E721", # Use `is` and `is not` for type comparisons, or `isinstance()` for insinstance checks
82
+ "E722", # Do not use bare `except`
83
+ "E731", # Do not assign a `lambda` expression, use a `def`
84
+ "F821", # Undefined name
85
+ "F841" # Local variable ... is assigned to but never used
86
+ ]
87
+
88
+ [tool.ruff.lint.isort]
89
+ section-order = ["future", "standard-library", "third-party", "first-party"]
90
+
91
+ [build-system]
92
+ requires = ["poetry-core"]
93
+ build-backend = "poetry.core.masonry.api"
94
+
95
+ [tool.poetry.extras]
96
+ aiohttp=["aiohttp", "httpx-aiohttp"]