raccoonai 0.1.0a6__tar.gz → 0.1.0a8__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 (108) hide show
  1. raccoonai-0.1.0a8/.release-please-manifest.json +3 -0
  2. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/CHANGELOG.md +33 -0
  3. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/PKG-INFO +33 -16
  4. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/README.md +32 -15
  5. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/SECURITY.md +2 -2
  6. raccoonai-0.1.0a8/api.md +91 -0
  7. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/pyproject.toml +1 -1
  8. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_base_client.py +7 -1
  9. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_client.py +20 -3
  10. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_files.py +1 -1
  11. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_version.py +1 -1
  12. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/resources/__init__.py +28 -0
  13. raccoonai-0.1.0a8/src/raccoonai/resources/extensions.py +400 -0
  14. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/resources/fleet.py +176 -14
  15. raccoonai-0.1.0a8/src/raccoonai/resources/lam.py +700 -0
  16. raccoonai-0.1.0a8/src/raccoonai/resources/tail/__init__.py +47 -0
  17. raccoonai-0.1.0a8/src/raccoonai/resources/tail/apps.py +225 -0
  18. raccoonai-0.1.0a8/src/raccoonai/resources/tail/auth.py +186 -0
  19. raccoonai-0.1.0a8/src/raccoonai/resources/tail/tail.py +273 -0
  20. raccoonai-0.1.0a8/src/raccoonai/types/__init__.py +21 -0
  21. raccoonai-0.1.0a8/src/raccoonai/types/extension_all_response.py +22 -0
  22. raccoonai-0.1.0a8/src/raccoonai/types/extension_get_response.py +16 -0
  23. raccoonai-0.1.0a8/src/raccoonai/types/extension_upload_params.py +13 -0
  24. raccoonai-0.1.0a8/src/raccoonai/types/extension_upload_response.py +16 -0
  25. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/types/fleet_create_params.py +26 -12
  26. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/types/fleet_create_response.py +3 -5
  27. raccoonai-0.1.0a8/src/raccoonai/types/fleet_sessions_params.py +42 -0
  28. raccoonai-0.1.0a8/src/raccoonai/types/fleet_sessions_response.py +58 -0
  29. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/types/fleet_status_response.py +3 -5
  30. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/types/fleet_terminate_response.py +3 -5
  31. raccoonai-0.1.0a6/src/raccoonai/types/lam_extract_params.py → raccoonai-0.1.0a8/src/raccoonai/types/lam_run_params.py +30 -7
  32. raccoonai-0.1.0a6/src/raccoonai/types/lam_extract_response.py → raccoonai-0.1.0a8/src/raccoonai/types/lam_run_response.py +5 -4
  33. raccoonai-0.1.0a8/src/raccoonai/types/lam_tasks_params.py +39 -0
  34. raccoonai-0.1.0a8/src/raccoonai/types/lam_tasks_response.py +52 -0
  35. raccoonai-0.1.0a8/src/raccoonai/types/tail/__init__.py +9 -0
  36. raccoonai-0.1.0a8/src/raccoonai/types/tail/app_all_response.py +38 -0
  37. raccoonai-0.1.0a8/src/raccoonai/types/tail/app_linked_params.py +13 -0
  38. raccoonai-0.1.0a8/src/raccoonai/types/tail/app_linked_response.py +14 -0
  39. raccoonai-0.1.0a8/src/raccoonai/types/tail/auth_status_params.py +15 -0
  40. raccoonai-0.1.0a8/src/raccoonai/types/tail/auth_status_response.py +17 -0
  41. raccoonai-0.1.0a8/src/raccoonai/types/tail_users_params.py +26 -0
  42. raccoonai-0.1.0a8/src/raccoonai/types/tail_users_response.py +48 -0
  43. raccoonai-0.1.0a8/tests/api_resources/tail/__init__.py +1 -0
  44. raccoonai-0.1.0a8/tests/api_resources/tail/test_apps.py +134 -0
  45. raccoonai-0.1.0a8/tests/api_resources/tail/test_auth.py +90 -0
  46. raccoonai-0.1.0a8/tests/api_resources/test_extensions.py +286 -0
  47. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/api_resources/test_fleet.py +99 -36
  48. raccoonai-0.1.0a8/tests/api_resources/test_lam.py +374 -0
  49. raccoonai-0.1.0a8/tests/api_resources/test_tail.py +98 -0
  50. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/test_client.py +10 -10
  51. raccoonai-0.1.0a6/.release-please-manifest.json +0 -3
  52. raccoonai-0.1.0a6/api.md +0 -33
  53. raccoonai-0.1.0a6/src/raccoonai/resources/lam.py +0 -1245
  54. raccoonai-0.1.0a6/src/raccoonai/types/__init__.py +0 -15
  55. raccoonai-0.1.0a6/src/raccoonai/types/lam_integration_run_params.py +0 -57
  56. raccoonai-0.1.0a6/src/raccoonai/types/lam_integration_run_response.py +0 -53
  57. raccoonai-0.1.0a6/src/raccoonai/types/lam_run_params.py +0 -58
  58. raccoonai-0.1.0a6/src/raccoonai/types/lam_run_response.py +0 -24
  59. raccoonai-0.1.0a6/tests/api_resources/test_lam.py +0 -708
  60. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/.gitignore +0 -0
  61. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/CONTRIBUTING.md +0 -0
  62. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/LICENSE +0 -0
  63. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/bin/check-release-environment +0 -0
  64. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/bin/publish-pypi +0 -0
  65. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/examples/.keep +0 -0
  66. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/mypy.ini +0 -0
  67. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/noxfile.py +0 -0
  68. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/release-please-config.json +0 -0
  69. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/requirements-dev.lock +0 -0
  70. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/requirements.lock +0 -0
  71. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/__init__.py +0 -0
  72. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_compat.py +0 -0
  73. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_constants.py +0 -0
  74. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_exceptions.py +0 -0
  75. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_models.py +0 -0
  76. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_qs.py +0 -0
  77. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_resource.py +0 -0
  78. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_response.py +0 -0
  79. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_streaming.py +0 -0
  80. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_types.py +0 -0
  81. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_utils/__init__.py +0 -0
  82. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_utils/_logs.py +0 -0
  83. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_utils/_proxy.py +0 -0
  84. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_utils/_reflection.py +0 -0
  85. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_utils/_streams.py +0 -0
  86. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_utils/_sync.py +0 -0
  87. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_utils/_transform.py +0 -0
  88. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_utils/_typing.py +0 -0
  89. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/_utils/_utils.py +0 -0
  90. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/lib/.keep +0 -0
  91. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/py.typed +0 -0
  92. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/src/raccoonai/types/fleet_logs_response.py +0 -0
  93. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/__init__.py +0 -0
  94. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/api_resources/__init__.py +0 -0
  95. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/conftest.py +0 -0
  96. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/sample_file.txt +0 -0
  97. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/test_deepcopy.py +0 -0
  98. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/test_extract_files.py +0 -0
  99. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/test_files.py +0 -0
  100. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/test_models.py +0 -0
  101. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/test_qs.py +0 -0
  102. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/test_required_args.py +0 -0
  103. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/test_response.py +0 -0
  104. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/test_streaming.py +0 -0
  105. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/test_transform.py +0 -0
  106. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/test_utils/test_proxy.py +0 -0
  107. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/test_utils/test_typing.py +0 -0
  108. {raccoonai-0.1.0a6 → raccoonai-0.1.0a8}/tests/utils.py +0 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ ".": "0.1.0-alpha.8"
3
+ }
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.0-alpha.8 (2025-03-03)
4
+
5
+ Full Changelog: [v0.1.0-alpha.7...v0.1.0-alpha.8](https://github.com/raccoonaihq/raccoonai-python/compare/v0.1.0-alpha.7...v0.1.0-alpha.8)
6
+
7
+ ### Features
8
+
9
+ * **api:** add tail and extensions resources + update old ones ([#34](https://github.com/raccoonaihq/raccoonai-python/issues/34)) ([46e7bc7](https://github.com/raccoonaihq/raccoonai-python/commit/46e7bc7a131e41a47f05ff3103ad2859997719b9))
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * **api:** tail users get path ([#36](https://github.com/raccoonaihq/raccoonai-python/issues/36)) ([00b9303](https://github.com/raccoonaihq/raccoonai-python/commit/00b9303a013a4202f4d4e9c824f8065013d1e236))
15
+
16
+ ## 0.1.0-alpha.7 (2025-03-03)
17
+
18
+ Full Changelog: [v0.1.0-alpha.6...v0.1.0-alpha.7](https://github.com/raccoonaihq/raccoonai-python/compare/v0.1.0-alpha.6...v0.1.0-alpha.7)
19
+
20
+ ### Features
21
+
22
+ * **api:** api update ([#32](https://github.com/raccoonaihq/raccoonai-python/issues/32)) ([122dfbd](https://github.com/raccoonaihq/raccoonai-python/commit/122dfbdab0b497c7baa5c1e30e8c53d971a99b0c))
23
+
24
+
25
+ ### Chores
26
+
27
+ * **docs:** update client docstring ([#31](https://github.com/raccoonaihq/raccoonai-python/issues/31)) ([7d5b1cb](https://github.com/raccoonaihq/raccoonai-python/commit/7d5b1cbbbc21e7d7daf7860951236ebbfcc3ba70))
28
+ * **internal:** fix devcontainers setup ([#27](https://github.com/raccoonaihq/raccoonai-python/issues/27)) ([8b3178e](https://github.com/raccoonaihq/raccoonai-python/commit/8b3178e30fe72e1326eb46c49891b668a15db3ca))
29
+ * **internal:** properly set __pydantic_private__ ([#29](https://github.com/raccoonaihq/raccoonai-python/issues/29)) ([f457c28](https://github.com/raccoonaihq/raccoonai-python/commit/f457c28d9b5bbe682cc83156bfad97a0d5216444))
30
+
31
+
32
+ ### Documentation
33
+
34
+ * update URLs from stainlessapi.com to stainless.com ([#30](https://github.com/raccoonaihq/raccoonai-python/issues/30)) ([a90f1af](https://github.com/raccoonaihq/raccoonai-python/commit/a90f1afa15b717ae8b8df892b56ee29c1061d441))
35
+
3
36
  ## 0.1.0-alpha.6 (2025-02-21)
4
37
 
5
38
  Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/raccoonaihq/raccoonai-python/compare/v0.1.0-alpha.5...v0.1.0-alpha.6)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: raccoonai
3
- Version: 0.1.0a6
3
+ Version: 0.1.0a8
4
4
  Summary: The official Python library for the raccoonAI API
5
5
  Project-URL: Homepage, https://github.com/raccoonaihq/raccoonai-python
6
6
  Project-URL: Repository, https://github.com/raccoonaihq/raccoonai-python
@@ -38,7 +38,7 @@ The Raccoon AI Python library provides convenient access to the Raccoon AI REST
38
38
  application. The library includes type definitions for all request params and response fields,
39
39
  and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
40
40
 
41
- It is generated with [Stainless](https://www.stainlessapi.com/).
41
+ It is generated with [Stainless](https://www.stainless.com/).
42
42
 
43
43
  ## Documentation
44
44
 
@@ -66,10 +66,10 @@ client = RaccoonAI(
66
66
  )
67
67
 
68
68
  response = client.lam.run(
69
- query="Find the price of iphone 16 on Amazon.",
69
+ query="Find YCombinator startups who got funded in W24.",
70
70
  raccoon_passcode="<end-user-raccoon-passcode>",
71
71
  )
72
- print(response.livestream_url)
72
+ print(response.data)
73
73
  ```
74
74
 
75
75
  While you can provide a `secret_key` keyword argument,
@@ -95,10 +95,10 @@ client = AsyncRaccoonAI(
95
95
 
96
96
  async def main() -> None:
97
97
  response = await client.lam.run(
98
- query="Find the price of iphone 16 on Amazon.",
98
+ query="Find YCombinator startups who got funded in W24.",
99
99
  raccoon_passcode="<end-user-raccoon-passcode>",
100
100
  )
101
- print(response.livestream_url)
101
+ print(response.data)
102
102
 
103
103
 
104
104
  asyncio.run(main())
@@ -116,12 +116,12 @@ from raccoonai import RaccoonAI
116
116
  client = RaccoonAI()
117
117
 
118
118
  stream = client.lam.run(
119
- query="Find the price of iphone 16 on Amazon.",
119
+ query="Find YCombinator startups who got funded in W24.",
120
120
  raccoon_passcode="<end-user-raccoon-passcode>",
121
121
  stream=True,
122
122
  )
123
123
  for response in stream:
124
- print(response.livestream_url)
124
+ print(response.data)
125
125
  ```
126
126
 
127
127
  The async client uses the exact same interface.
@@ -132,12 +132,12 @@ from raccoonai import AsyncRaccoonAI
132
132
  client = AsyncRaccoonAI()
133
133
 
134
134
  stream = await client.lam.run(
135
- query="Find the price of iphone 16 on Amazon.",
135
+ query="Find YCombinator startups who got funded in W24.",
136
136
  raccoon_passcode="<end-user-raccoon-passcode>",
137
137
  stream=True,
138
138
  )
139
139
  async for response in stream:
140
- print(response.livestream_url)
140
+ print(response.data)
141
141
  ```
142
142
 
143
143
  ## Using types
@@ -149,6 +149,23 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ
149
149
 
150
150
  Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
151
151
 
152
+ ## File uploads
153
+
154
+ Request parameters that correspond to file uploads can be passed as `bytes`, a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.
155
+
156
+ ```python
157
+ from pathlib import Path
158
+ from raccoonai import RaccoonAI
159
+
160
+ client = RaccoonAI()
161
+
162
+ client.extensions.upload(
163
+ file=Path("/path/to/file"),
164
+ )
165
+ ```
166
+
167
+ The async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.
168
+
152
169
  ## Handling errors
153
170
 
154
171
  When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `raccoonai.APIConnectionError` is raised.
@@ -166,7 +183,7 @@ client = RaccoonAI()
166
183
 
167
184
  try:
168
185
  client.lam.run(
169
- query="Find the price of iphone 16 on Amazon.",
186
+ query="Find YCombinator startups who got funded in W24.",
170
187
  raccoon_passcode="<end-user-raccoon-passcode>",
171
188
  )
172
189
  except raccoonai.APIConnectionError as e:
@@ -212,7 +229,7 @@ client = RaccoonAI(
212
229
 
213
230
  # Or, configure per-request:
214
231
  client.with_options(max_retries=5).lam.run(
215
- query="Find the price of iphone 16 on Amazon.",
232
+ query="Find YCombinator startups who got funded in W24.",
216
233
  raccoon_passcode="<end-user-raccoon-passcode>",
217
234
  )
218
235
  ```
@@ -238,7 +255,7 @@ client = RaccoonAI(
238
255
 
239
256
  # Override per-request:
240
257
  client.with_options(timeout=5.0).lam.run(
241
- query="Find the price of iphone 16 on Amazon.",
258
+ query="Find YCombinator startups who got funded in W24.",
242
259
  raccoon_passcode="<end-user-raccoon-passcode>",
243
260
  )
244
261
  ```
@@ -282,13 +299,13 @@ from raccoonai import RaccoonAI
282
299
 
283
300
  client = RaccoonAI()
284
301
  response = client.lam.with_raw_response.run(
285
- query="Find the price of iphone 16 on Amazon.",
302
+ query="Find YCombinator startups who got funded in W24.",
286
303
  raccoon_passcode="<end-user-raccoon-passcode>",
287
304
  )
288
305
  print(response.headers.get('X-My-Header'))
289
306
 
290
307
  lam = response.parse() # get the object that `lam.run()` would have returned
291
- print(lam.livestream_url)
308
+ print(lam.data)
292
309
  ```
293
310
 
294
311
  These methods return an [`APIResponse`](https://github.com/raccoonaihq/raccoonai-python/tree/main/src/raccoonai/_response.py) object.
@@ -303,7 +320,7 @@ To stream the response body, use `.with_streaming_response` instead, which requi
303
320
 
304
321
  ```python
305
322
  with client.lam.with_streaming_response.run(
306
- query="Find the price of iphone 16 on Amazon.",
323
+ query="Find YCombinator startups who got funded in W24.",
307
324
  raccoon_passcode="<end-user-raccoon-passcode>",
308
325
  ) as response:
309
326
  print(response.headers.get("X-My-Header"))
@@ -6,7 +6,7 @@ The Raccoon AI Python library provides convenient access to the Raccoon AI REST
6
6
  application. The library includes type definitions for all request params and response fields,
7
7
  and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).
8
8
 
9
- It is generated with [Stainless](https://www.stainlessapi.com/).
9
+ It is generated with [Stainless](https://www.stainless.com/).
10
10
 
11
11
  ## Documentation
12
12
 
@@ -34,10 +34,10 @@ client = RaccoonAI(
34
34
  )
35
35
 
36
36
  response = client.lam.run(
37
- query="Find the price of iphone 16 on Amazon.",
37
+ query="Find YCombinator startups who got funded in W24.",
38
38
  raccoon_passcode="<end-user-raccoon-passcode>",
39
39
  )
40
- print(response.livestream_url)
40
+ print(response.data)
41
41
  ```
42
42
 
43
43
  While you can provide a `secret_key` keyword argument,
@@ -63,10 +63,10 @@ client = AsyncRaccoonAI(
63
63
 
64
64
  async def main() -> None:
65
65
  response = await client.lam.run(
66
- query="Find the price of iphone 16 on Amazon.",
66
+ query="Find YCombinator startups who got funded in W24.",
67
67
  raccoon_passcode="<end-user-raccoon-passcode>",
68
68
  )
69
- print(response.livestream_url)
69
+ print(response.data)
70
70
 
71
71
 
72
72
  asyncio.run(main())
@@ -84,12 +84,12 @@ from raccoonai import RaccoonAI
84
84
  client = RaccoonAI()
85
85
 
86
86
  stream = client.lam.run(
87
- query="Find the price of iphone 16 on Amazon.",
87
+ query="Find YCombinator startups who got funded in W24.",
88
88
  raccoon_passcode="<end-user-raccoon-passcode>",
89
89
  stream=True,
90
90
  )
91
91
  for response in stream:
92
- print(response.livestream_url)
92
+ print(response.data)
93
93
  ```
94
94
 
95
95
  The async client uses the exact same interface.
@@ -100,12 +100,12 @@ from raccoonai import AsyncRaccoonAI
100
100
  client = AsyncRaccoonAI()
101
101
 
102
102
  stream = await client.lam.run(
103
- query="Find the price of iphone 16 on Amazon.",
103
+ query="Find YCombinator startups who got funded in W24.",
104
104
  raccoon_passcode="<end-user-raccoon-passcode>",
105
105
  stream=True,
106
106
  )
107
107
  async for response in stream:
108
- print(response.livestream_url)
108
+ print(response.data)
109
109
  ```
110
110
 
111
111
  ## Using types
@@ -117,6 +117,23 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ
117
117
 
118
118
  Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
119
119
 
120
+ ## File uploads
121
+
122
+ Request parameters that correspond to file uploads can be passed as `bytes`, a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.
123
+
124
+ ```python
125
+ from pathlib import Path
126
+ from raccoonai import RaccoonAI
127
+
128
+ client = RaccoonAI()
129
+
130
+ client.extensions.upload(
131
+ file=Path("/path/to/file"),
132
+ )
133
+ ```
134
+
135
+ The async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.
136
+
120
137
  ## Handling errors
121
138
 
122
139
  When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `raccoonai.APIConnectionError` is raised.
@@ -134,7 +151,7 @@ client = RaccoonAI()
134
151
 
135
152
  try:
136
153
  client.lam.run(
137
- query="Find the price of iphone 16 on Amazon.",
154
+ query="Find YCombinator startups who got funded in W24.",
138
155
  raccoon_passcode="<end-user-raccoon-passcode>",
139
156
  )
140
157
  except raccoonai.APIConnectionError as e:
@@ -180,7 +197,7 @@ client = RaccoonAI(
180
197
 
181
198
  # Or, configure per-request:
182
199
  client.with_options(max_retries=5).lam.run(
183
- query="Find the price of iphone 16 on Amazon.",
200
+ query="Find YCombinator startups who got funded in W24.",
184
201
  raccoon_passcode="<end-user-raccoon-passcode>",
185
202
  )
186
203
  ```
@@ -206,7 +223,7 @@ client = RaccoonAI(
206
223
 
207
224
  # Override per-request:
208
225
  client.with_options(timeout=5.0).lam.run(
209
- query="Find the price of iphone 16 on Amazon.",
226
+ query="Find YCombinator startups who got funded in W24.",
210
227
  raccoon_passcode="<end-user-raccoon-passcode>",
211
228
  )
212
229
  ```
@@ -250,13 +267,13 @@ from raccoonai import RaccoonAI
250
267
 
251
268
  client = RaccoonAI()
252
269
  response = client.lam.with_raw_response.run(
253
- query="Find the price of iphone 16 on Amazon.",
270
+ query="Find YCombinator startups who got funded in W24.",
254
271
  raccoon_passcode="<end-user-raccoon-passcode>",
255
272
  )
256
273
  print(response.headers.get('X-My-Header'))
257
274
 
258
275
  lam = response.parse() # get the object that `lam.run()` would have returned
259
- print(lam.livestream_url)
276
+ print(lam.data)
260
277
  ```
261
278
 
262
279
  These methods return an [`APIResponse`](https://github.com/raccoonaihq/raccoonai-python/tree/main/src/raccoonai/_response.py) object.
@@ -271,7 +288,7 @@ To stream the response body, use `.with_streaming_response` instead, which requi
271
288
 
272
289
  ```python
273
290
  with client.lam.with_streaming_response.run(
274
- query="Find the price of iphone 16 on Amazon.",
291
+ query="Find YCombinator startups who got funded in W24.",
275
292
  raccoon_passcode="<end-user-raccoon-passcode>",
276
293
  ) as response:
277
294
  print(response.headers.get("X-My-Header"))
@@ -2,9 +2,9 @@
2
2
 
3
3
  ## Reporting Security Issues
4
4
 
5
- This SDK is generated by [Stainless Software Inc](http://stainlessapi.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.
5
+ This SDK is generated by [Stainless Software Inc](http://stainless.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.
6
6
 
7
- To report a security issue, please contact the Stainless team at security@stainlessapi.com.
7
+ To report a security issue, please contact the Stainless team at security@stainless.com.
8
8
 
9
9
  ## Responsible Disclosure
10
10
 
@@ -0,0 +1,91 @@
1
+ # Lam
2
+
3
+ Types:
4
+
5
+ ```python
6
+ from raccoonai.types import LamRunResponse, LamTasksResponse
7
+ ```
8
+
9
+ Methods:
10
+
11
+ - <code title="post /lam/run">client.lam.<a href="./src/raccoonai/resources/lam.py">run</a>(\*\*<a href="src/raccoonai/types/lam_run_params.py">params</a>) -> <a href="./src/raccoonai/types/lam_run_response.py">LamRunResponse</a></code>
12
+ - <code title="get /lam/tasks">client.lam.<a href="./src/raccoonai/resources/lam.py">tasks</a>(\*\*<a href="src/raccoonai/types/lam_tasks_params.py">params</a>) -> <a href="./src/raccoonai/types/lam_tasks_response.py">LamTasksResponse</a></code>
13
+
14
+ # Tail
15
+
16
+ Types:
17
+
18
+ ```python
19
+ from raccoonai.types import TailUsersResponse
20
+ ```
21
+
22
+ Methods:
23
+
24
+ - <code title="get /tail/users">client.tail.<a href="./src/raccoonai/resources/tail/tail.py">users</a>(\*\*<a href="src/raccoonai/types/tail_users_params.py">params</a>) -> <a href="./src/raccoonai/types/tail_users_response.py">TailUsersResponse</a></code>
25
+
26
+ ## Apps
27
+
28
+ Types:
29
+
30
+ ```python
31
+ from raccoonai.types.tail import AppAllResponse, AppLinkedResponse
32
+ ```
33
+
34
+ Methods:
35
+
36
+ - <code title="get /tail/apps">client.tail.apps.<a href="./src/raccoonai/resources/tail/apps.py">all</a>() -> <a href="./src/raccoonai/types/tail/app_all_response.py">AppAllResponse</a></code>
37
+ - <code title="get /tail/linked-apps">client.tail.apps.<a href="./src/raccoonai/resources/tail/apps.py">linked</a>(\*\*<a href="src/raccoonai/types/tail/app_linked_params.py">params</a>) -> <a href="./src/raccoonai/types/tail/app_linked_response.py">AppLinkedResponse</a></code>
38
+
39
+ ## Auth
40
+
41
+ Types:
42
+
43
+ ```python
44
+ from raccoonai.types.tail import AuthStatusResponse
45
+ ```
46
+
47
+ Methods:
48
+
49
+ - <code title="get /tail/app/auth-status">client.tail.auth.<a href="./src/raccoonai/resources/tail/auth.py">status</a>(\*\*<a href="src/raccoonai/types/tail/auth_status_params.py">params</a>) -> <a href="./src/raccoonai/types/tail/auth_status_response.py">AuthStatusResponse</a></code>
50
+
51
+ # Fleet
52
+
53
+ Types:
54
+
55
+ ```python
56
+ from raccoonai.types import (
57
+ FleetCreateResponse,
58
+ FleetLogsResponse,
59
+ FleetSessionsResponse,
60
+ FleetStatusResponse,
61
+ FleetTerminateResponse,
62
+ )
63
+ ```
64
+
65
+ Methods:
66
+
67
+ - <code title="post /sessions/create">client.fleet.<a href="./src/raccoonai/resources/fleet.py">create</a>(\*\*<a href="src/raccoonai/types/fleet_create_params.py">params</a>) -> <a href="./src/raccoonai/types/fleet_create_response.py">FleetCreateResponse</a></code>
68
+ - <code title="get /sessions/{session_id}/logs">client.fleet.<a href="./src/raccoonai/resources/fleet.py">logs</a>(session_id) -> <a href="./src/raccoonai/types/fleet_logs_response.py">FleetLogsResponse</a></code>
69
+ - <code title="get /sessions">client.fleet.<a href="./src/raccoonai/resources/fleet.py">sessions</a>(\*\*<a href="src/raccoonai/types/fleet_sessions_params.py">params</a>) -> <a href="./src/raccoonai/types/fleet_sessions_response.py">FleetSessionsResponse</a></code>
70
+ - <code title="get /sessions/{session_id}/status">client.fleet.<a href="./src/raccoonai/resources/fleet.py">status</a>(session_id) -> <a href="./src/raccoonai/types/fleet_status_response.py">FleetStatusResponse</a></code>
71
+ - <code title="delete /sessions/{session_id}/terminate">client.fleet.<a href="./src/raccoonai/resources/fleet.py">terminate</a>(session_id) -> <a href="./src/raccoonai/types/fleet_terminate_response.py">FleetTerminateResponse</a></code>
72
+
73
+ # Extensions
74
+
75
+ Types:
76
+
77
+ ```python
78
+ from raccoonai.types import (
79
+ ExtensionDeleteResponse,
80
+ ExtensionAllResponse,
81
+ ExtensionGetResponse,
82
+ ExtensionUploadResponse,
83
+ )
84
+ ```
85
+
86
+ Methods:
87
+
88
+ - <code title="delete /extensions/{extensionId}">client.extensions.<a href="./src/raccoonai/resources/extensions.py">delete</a>(extension_id) -> <a href="./src/raccoonai/types/extension_delete_response.py">object</a></code>
89
+ - <code title="get /extensions">client.extensions.<a href="./src/raccoonai/resources/extensions.py">all</a>() -> <a href="./src/raccoonai/types/extension_all_response.py">ExtensionAllResponse</a></code>
90
+ - <code title="get /extensions/{extensionId}">client.extensions.<a href="./src/raccoonai/resources/extensions.py">get</a>(extension_id) -> <a href="./src/raccoonai/types/extension_get_response.py">ExtensionGetResponse</a></code>
91
+ - <code title="post /extensions">client.extensions.<a href="./src/raccoonai/resources/extensions.py">upload</a>(\*\*<a href="src/raccoonai/types/extension_upload_params.py">params</a>) -> <a href="./src/raccoonai/types/extension_upload_response.py">ExtensionUploadResponse</a></code>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "raccoonai"
3
- version = "0.1.0-alpha.6"
3
+ version = "0.1.0-alpha.8"
4
4
  description = "The official Python library for the raccoonAI API"
5
5
  dynamic = ["readme"]
6
6
  license = "Apache-2.0"
@@ -63,7 +63,7 @@ from ._types import (
63
63
  ModelBuilderProtocol,
64
64
  )
65
65
  from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping
66
- from ._compat import model_copy, model_dump
66
+ from ._compat import PYDANTIC_V2, model_copy, model_dump
67
67
  from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type
68
68
  from ._response import (
69
69
  APIResponse,
@@ -207,6 +207,9 @@ class BaseSyncPage(BasePage[_T], Generic[_T]):
207
207
  model: Type[_T],
208
208
  options: FinalRequestOptions,
209
209
  ) -> None:
210
+ if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None:
211
+ self.__pydantic_private__ = {}
212
+
210
213
  self._model = model
211
214
  self._client = client
212
215
  self._options = options
@@ -292,6 +295,9 @@ class BaseAsyncPage(BasePage[_T], Generic[_T]):
292
295
  client: AsyncAPIClient,
293
296
  options: FinalRequestOptions,
294
297
  ) -> None:
298
+ if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None:
299
+ self.__pydantic_private__ = {}
300
+
295
301
  self._model = model
296
302
  self._client = client
297
303
  self._options = options
@@ -24,7 +24,7 @@ from ._utils import (
24
24
  get_async_library,
25
25
  )
26
26
  from ._version import __version__
27
- from .resources import lam, fleet
27
+ from .resources import lam, fleet, extensions
28
28
  from ._streaming import Stream as Stream, AsyncStream as AsyncStream
29
29
  from ._exceptions import APIStatusError, RaccoonAIError
30
30
  from ._base_client import (
@@ -32,6 +32,7 @@ from ._base_client import (
32
32
  SyncAPIClient,
33
33
  AsyncAPIClient,
34
34
  )
35
+ from .resources.tail import tail
35
36
 
36
37
  __all__ = [
37
38
  "ENVIRONMENTS",
@@ -54,7 +55,9 @@ ENVIRONMENTS: Dict[str, str] = {
54
55
 
55
56
  class RaccoonAI(SyncAPIClient):
56
57
  lam: lam.LamResource
58
+ tail: tail.TailResource
57
59
  fleet: fleet.FleetResource
60
+ extensions: extensions.ExtensionsResource
58
61
  with_raw_response: RaccoonAIWithRawResponse
59
62
  with_streaming_response: RaccoonAIWithStreamedResponse
60
63
 
@@ -87,7 +90,7 @@ class RaccoonAI(SyncAPIClient):
87
90
  # part of our public interface in the future.
88
91
  _strict_response_validation: bool = False,
89
92
  ) -> None:
90
- """Construct a new synchronous raccoonAI client instance.
93
+ """Construct a new synchronous RaccoonAI client instance.
91
94
 
92
95
  This automatically infers the `secret_key` argument from the `RACCOON_SECRET_KEY` environment variable if it is not provided.
93
96
  """
@@ -137,7 +140,9 @@ class RaccoonAI(SyncAPIClient):
137
140
  )
138
141
 
139
142
  self.lam = lam.LamResource(self)
143
+ self.tail = tail.TailResource(self)
140
144
  self.fleet = fleet.FleetResource(self)
145
+ self.extensions = extensions.ExtensionsResource(self)
141
146
  self.with_raw_response = RaccoonAIWithRawResponse(self)
142
147
  self.with_streaming_response = RaccoonAIWithStreamedResponse(self)
143
148
 
@@ -250,7 +255,9 @@ class RaccoonAI(SyncAPIClient):
250
255
 
251
256
  class AsyncRaccoonAI(AsyncAPIClient):
252
257
  lam: lam.AsyncLamResource
258
+ tail: tail.AsyncTailResource
253
259
  fleet: fleet.AsyncFleetResource
260
+ extensions: extensions.AsyncExtensionsResource
254
261
  with_raw_response: AsyncRaccoonAIWithRawResponse
255
262
  with_streaming_response: AsyncRaccoonAIWithStreamedResponse
256
263
 
@@ -283,7 +290,7 @@ class AsyncRaccoonAI(AsyncAPIClient):
283
290
  # part of our public interface in the future.
284
291
  _strict_response_validation: bool = False,
285
292
  ) -> None:
286
- """Construct a new async raccoonAI client instance.
293
+ """Construct a new async AsyncRaccoonAI client instance.
287
294
 
288
295
  This automatically infers the `secret_key` argument from the `RACCOON_SECRET_KEY` environment variable if it is not provided.
289
296
  """
@@ -333,7 +340,9 @@ class AsyncRaccoonAI(AsyncAPIClient):
333
340
  )
334
341
 
335
342
  self.lam = lam.AsyncLamResource(self)
343
+ self.tail = tail.AsyncTailResource(self)
336
344
  self.fleet = fleet.AsyncFleetResource(self)
345
+ self.extensions = extensions.AsyncExtensionsResource(self)
337
346
  self.with_raw_response = AsyncRaccoonAIWithRawResponse(self)
338
347
  self.with_streaming_response = AsyncRaccoonAIWithStreamedResponse(self)
339
348
 
@@ -447,25 +456,33 @@ class AsyncRaccoonAI(AsyncAPIClient):
447
456
  class RaccoonAIWithRawResponse:
448
457
  def __init__(self, client: RaccoonAI) -> None:
449
458
  self.lam = lam.LamResourceWithRawResponse(client.lam)
459
+ self.tail = tail.TailResourceWithRawResponse(client.tail)
450
460
  self.fleet = fleet.FleetResourceWithRawResponse(client.fleet)
461
+ self.extensions = extensions.ExtensionsResourceWithRawResponse(client.extensions)
451
462
 
452
463
 
453
464
  class AsyncRaccoonAIWithRawResponse:
454
465
  def __init__(self, client: AsyncRaccoonAI) -> None:
455
466
  self.lam = lam.AsyncLamResourceWithRawResponse(client.lam)
467
+ self.tail = tail.AsyncTailResourceWithRawResponse(client.tail)
456
468
  self.fleet = fleet.AsyncFleetResourceWithRawResponse(client.fleet)
469
+ self.extensions = extensions.AsyncExtensionsResourceWithRawResponse(client.extensions)
457
470
 
458
471
 
459
472
  class RaccoonAIWithStreamedResponse:
460
473
  def __init__(self, client: RaccoonAI) -> None:
461
474
  self.lam = lam.LamResourceWithStreamingResponse(client.lam)
475
+ self.tail = tail.TailResourceWithStreamingResponse(client.tail)
462
476
  self.fleet = fleet.FleetResourceWithStreamingResponse(client.fleet)
477
+ self.extensions = extensions.ExtensionsResourceWithStreamingResponse(client.extensions)
463
478
 
464
479
 
465
480
  class AsyncRaccoonAIWithStreamedResponse:
466
481
  def __init__(self, client: AsyncRaccoonAI) -> None:
467
482
  self.lam = lam.AsyncLamResourceWithStreamingResponse(client.lam)
483
+ self.tail = tail.AsyncTailResourceWithStreamingResponse(client.tail)
468
484
  self.fleet = fleet.AsyncFleetResourceWithStreamingResponse(client.fleet)
485
+ self.extensions = extensions.AsyncExtensionsResourceWithStreamingResponse(client.extensions)
469
486
 
470
487
 
471
488
  Client = RaccoonAI
@@ -34,7 +34,7 @@ def assert_is_file_content(obj: object, *, key: str | None = None) -> None:
34
34
  if not is_file_content(obj):
35
35
  prefix = f"Expected entry at `{key}`" if key is not None else f"Expected file input `{obj!r}`"
36
36
  raise RuntimeError(
37
- f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead."
37
+ f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead. See https://github.com/raccoonaihq/raccoonai-python/tree/main#file-uploads"
38
38
  ) from None
39
39
 
40
40
 
@@ -1,4 +1,4 @@
1
1
  # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
2
 
3
3
  __title__ = "raccoonai"
4
- __version__ = "0.1.0-alpha.6" # x-release-please-version
4
+ __version__ = "0.1.0-alpha.8" # x-release-please-version
@@ -8,6 +8,14 @@ from .lam import (
8
8
  LamResourceWithStreamingResponse,
9
9
  AsyncLamResourceWithStreamingResponse,
10
10
  )
11
+ from .tail import (
12
+ TailResource,
13
+ AsyncTailResource,
14
+ TailResourceWithRawResponse,
15
+ AsyncTailResourceWithRawResponse,
16
+ TailResourceWithStreamingResponse,
17
+ AsyncTailResourceWithStreamingResponse,
18
+ )
11
19
  from .fleet import (
12
20
  FleetResource,
13
21
  AsyncFleetResource,
@@ -16,6 +24,14 @@ from .fleet import (
16
24
  FleetResourceWithStreamingResponse,
17
25
  AsyncFleetResourceWithStreamingResponse,
18
26
  )
27
+ from .extensions import (
28
+ ExtensionsResource,
29
+ AsyncExtensionsResource,
30
+ ExtensionsResourceWithRawResponse,
31
+ AsyncExtensionsResourceWithRawResponse,
32
+ ExtensionsResourceWithStreamingResponse,
33
+ AsyncExtensionsResourceWithStreamingResponse,
34
+ )
19
35
 
20
36
  __all__ = [
21
37
  "LamResource",
@@ -24,10 +40,22 @@ __all__ = [
24
40
  "AsyncLamResourceWithRawResponse",
25
41
  "LamResourceWithStreamingResponse",
26
42
  "AsyncLamResourceWithStreamingResponse",
43
+ "TailResource",
44
+ "AsyncTailResource",
45
+ "TailResourceWithRawResponse",
46
+ "AsyncTailResourceWithRawResponse",
47
+ "TailResourceWithStreamingResponse",
48
+ "AsyncTailResourceWithStreamingResponse",
27
49
  "FleetResource",
28
50
  "AsyncFleetResource",
29
51
  "FleetResourceWithRawResponse",
30
52
  "AsyncFleetResourceWithRawResponse",
31
53
  "FleetResourceWithStreamingResponse",
32
54
  "AsyncFleetResourceWithStreamingResponse",
55
+ "ExtensionsResource",
56
+ "AsyncExtensionsResource",
57
+ "ExtensionsResourceWithRawResponse",
58
+ "AsyncExtensionsResourceWithRawResponse",
59
+ "ExtensionsResourceWithStreamingResponse",
60
+ "AsyncExtensionsResourceWithStreamingResponse",
33
61
  ]