raccoonai 0.1.0a7__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 raccoonai might be problematic. Click here for more details.
- raccoonai-0.1.0a9/.release-please-manifest.json +3 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/CHANGELOG.md +21 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/PKG-INFO +18 -1
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/README.md +17 -0
- raccoonai-0.1.0a9/api.md +91 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/pyproject.toml +1 -1
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_base_client.py +1 -96
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_client.py +18 -1
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_files.py +1 -1
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_version.py +1 -1
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/resources/__init__.py +28 -0
- raccoonai-0.1.0a9/src/raccoonai/resources/extensions.py +400 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/resources/fleet.py +173 -2
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/resources/lam.py +151 -347
- raccoonai-0.1.0a9/src/raccoonai/resources/tail/__init__.py +47 -0
- raccoonai-0.1.0a9/src/raccoonai/resources/tail/apps.py +225 -0
- raccoonai-0.1.0a9/src/raccoonai/resources/tail/auth.py +186 -0
- raccoonai-0.1.0a9/src/raccoonai/resources/tail/tail.py +273 -0
- raccoonai-0.1.0a9/src/raccoonai/types/__init__.py +21 -0
- raccoonai-0.1.0a9/src/raccoonai/types/extension_all_response.py +22 -0
- raccoonai-0.1.0a9/src/raccoonai/types/extension_get_response.py +16 -0
- raccoonai-0.1.0a9/src/raccoonai/types/extension_upload_params.py +13 -0
- raccoonai-0.1.0a9/src/raccoonai/types/extension_upload_response.py +16 -0
- raccoonai-0.1.0a9/src/raccoonai/types/fleet_sessions_params.py +42 -0
- raccoonai-0.1.0a9/src/raccoonai/types/fleet_sessions_response.py +58 -0
- raccoonai-0.1.0a9/src/raccoonai/types/lam_tasks_params.py +39 -0
- raccoonai-0.1.0a9/src/raccoonai/types/lam_tasks_response.py +52 -0
- raccoonai-0.1.0a9/src/raccoonai/types/tail/__init__.py +9 -0
- raccoonai-0.1.0a9/src/raccoonai/types/tail/app_all_response.py +38 -0
- raccoonai-0.1.0a9/src/raccoonai/types/tail/app_linked_params.py +13 -0
- raccoonai-0.1.0a9/src/raccoonai/types/tail/app_linked_response.py +14 -0
- raccoonai-0.1.0a9/src/raccoonai/types/tail/auth_status_params.py +15 -0
- raccoonai-0.1.0a9/src/raccoonai/types/tail/auth_status_response.py +17 -0
- raccoonai-0.1.0a9/src/raccoonai/types/tail_users_params.py +26 -0
- raccoonai-0.1.0a9/src/raccoonai/types/tail_users_response.py +48 -0
- raccoonai-0.1.0a9/tests/api_resources/tail/__init__.py +1 -0
- raccoonai-0.1.0a9/tests/api_resources/tail/test_apps.py +134 -0
- raccoonai-0.1.0a9/tests/api_resources/tail/test_auth.py +90 -0
- raccoonai-0.1.0a9/tests/api_resources/test_extensions.py +286 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/api_resources/test_fleet.py +83 -32
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/api_resources/test_lam.py +66 -252
- raccoonai-0.1.0a9/tests/api_resources/test_tail.py +98 -0
- raccoonai-0.1.0a7/.release-please-manifest.json +0 -3
- raccoonai-0.1.0a7/api.md +0 -32
- raccoonai-0.1.0a7/src/raccoonai/types/__init__.py +0 -13
- raccoonai-0.1.0a7/src/raccoonai/types/lam_integration_run_params.py +0 -78
- raccoonai-0.1.0a7/src/raccoonai/types/lam_integration_run_response.py +0 -53
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/.gitignore +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/CONTRIBUTING.md +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/LICENSE +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/SECURITY.md +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/bin/check-release-environment +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/bin/publish-pypi +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/examples/.keep +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/mypy.ini +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/noxfile.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/release-please-config.json +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/requirements-dev.lock +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/requirements.lock +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/__init__.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_compat.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_constants.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_exceptions.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_models.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_qs.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_resource.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_response.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_streaming.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_types.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_utils/__init__.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_utils/_logs.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_utils/_proxy.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_utils/_reflection.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_utils/_streams.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_utils/_sync.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_utils/_transform.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_utils/_typing.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/_utils/_utils.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/lib/.keep +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/py.typed +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/types/fleet_create_params.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/types/fleet_create_response.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/types/fleet_logs_response.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/types/fleet_status_response.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/types/fleet_terminate_response.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/types/lam_run_params.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/src/raccoonai/types/lam_run_response.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/__init__.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/api_resources/__init__.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/conftest.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/sample_file.txt +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/test_client.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/test_deepcopy.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/test_extract_files.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/test_files.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/test_models.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/test_qs.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/test_required_args.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/test_response.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/test_streaming.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/test_transform.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/test_utils/test_proxy.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/test_utils/test_typing.py +0 -0
- {raccoonai-0.1.0a7 → raccoonai-0.1.0a9}/tests/utils.py +0 -0
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.9 (2025-03-04)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.1.0-alpha.8...v0.1.0-alpha.9](https://github.com/raccoonaihq/raccoonai-python/compare/v0.1.0-alpha.8...v0.1.0-alpha.9)
|
|
6
|
+
|
|
7
|
+
### Chores
|
|
8
|
+
|
|
9
|
+
* **internal:** remove unused http client options forwarding ([#38](https://github.com/raccoonaihq/raccoonai-python/issues/38)) ([3f63c81](https://github.com/raccoonaihq/raccoonai-python/commit/3f63c811fbd58e6a91beb1e03f26cb9fa084a529))
|
|
10
|
+
|
|
11
|
+
## 0.1.0-alpha.8 (2025-03-03)
|
|
12
|
+
|
|
13
|
+
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)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **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))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **api:** tail users get path ([#36](https://github.com/raccoonaihq/raccoonai-python/issues/36)) ([00b9303](https://github.com/raccoonaihq/raccoonai-python/commit/00b9303a013a4202f4d4e9c824f8065013d1e236))
|
|
23
|
+
|
|
3
24
|
## 0.1.0-alpha.7 (2025-03-03)
|
|
4
25
|
|
|
5
26
|
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)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: raccoonai
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a9
|
|
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
|
|
@@ -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.
|
|
@@ -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.
|
raccoonai-0.1.0a9/api.md
ADDED
|
@@ -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>
|
|
@@ -9,7 +9,6 @@ import asyncio
|
|
|
9
9
|
import inspect
|
|
10
10
|
import logging
|
|
11
11
|
import platform
|
|
12
|
-
import warnings
|
|
13
12
|
import email.utils
|
|
14
13
|
from types import TracebackType
|
|
15
14
|
from random import random
|
|
@@ -36,7 +35,7 @@ import anyio
|
|
|
36
35
|
import httpx
|
|
37
36
|
import distro
|
|
38
37
|
import pydantic
|
|
39
|
-
from httpx import URL
|
|
38
|
+
from httpx import URL
|
|
40
39
|
from pydantic import PrivateAttr
|
|
41
40
|
|
|
42
41
|
from . import _exceptions
|
|
@@ -51,13 +50,10 @@ from ._types import (
|
|
|
51
50
|
Timeout,
|
|
52
51
|
NotGiven,
|
|
53
52
|
ResponseT,
|
|
54
|
-
Transport,
|
|
55
53
|
AnyMapping,
|
|
56
54
|
PostParser,
|
|
57
|
-
ProxiesTypes,
|
|
58
55
|
RequestFiles,
|
|
59
56
|
HttpxSendArgs,
|
|
60
|
-
AsyncTransport,
|
|
61
57
|
RequestOptions,
|
|
62
58
|
HttpxRequestFiles,
|
|
63
59
|
ModelBuilderProtocol,
|
|
@@ -337,9 +333,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
337
333
|
_base_url: URL
|
|
338
334
|
max_retries: int
|
|
339
335
|
timeout: Union[float, Timeout, None]
|
|
340
|
-
_limits: httpx.Limits
|
|
341
|
-
_proxies: ProxiesTypes | None
|
|
342
|
-
_transport: Transport | AsyncTransport | None
|
|
343
336
|
_strict_response_validation: bool
|
|
344
337
|
_idempotency_header: str | None
|
|
345
338
|
_default_stream_cls: type[_DefaultStreamT] | None = None
|
|
@@ -352,9 +345,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
352
345
|
_strict_response_validation: bool,
|
|
353
346
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
354
347
|
timeout: float | Timeout | None = DEFAULT_TIMEOUT,
|
|
355
|
-
limits: httpx.Limits,
|
|
356
|
-
transport: Transport | AsyncTransport | None,
|
|
357
|
-
proxies: ProxiesTypes | None,
|
|
358
348
|
custom_headers: Mapping[str, str] | None = None,
|
|
359
349
|
custom_query: Mapping[str, object] | None = None,
|
|
360
350
|
) -> None:
|
|
@@ -362,9 +352,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]):
|
|
|
362
352
|
self._base_url = self._enforce_trailing_slash(URL(base_url))
|
|
363
353
|
self.max_retries = max_retries
|
|
364
354
|
self.timeout = timeout
|
|
365
|
-
self._limits = limits
|
|
366
|
-
self._proxies = proxies
|
|
367
|
-
self._transport = transport
|
|
368
355
|
self._custom_headers = custom_headers or {}
|
|
369
356
|
self._custom_query = custom_query or {}
|
|
370
357
|
self._strict_response_validation = _strict_response_validation
|
|
@@ -800,46 +787,11 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
800
787
|
base_url: str | URL,
|
|
801
788
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
802
789
|
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
|
|
803
|
-
transport: Transport | None = None,
|
|
804
|
-
proxies: ProxiesTypes | None = None,
|
|
805
|
-
limits: Limits | None = None,
|
|
806
790
|
http_client: httpx.Client | None = None,
|
|
807
791
|
custom_headers: Mapping[str, str] | None = None,
|
|
808
792
|
custom_query: Mapping[str, object] | None = None,
|
|
809
793
|
_strict_response_validation: bool,
|
|
810
794
|
) -> None:
|
|
811
|
-
kwargs: dict[str, Any] = {}
|
|
812
|
-
if limits is not None:
|
|
813
|
-
warnings.warn(
|
|
814
|
-
"The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead",
|
|
815
|
-
category=DeprecationWarning,
|
|
816
|
-
stacklevel=3,
|
|
817
|
-
)
|
|
818
|
-
if http_client is not None:
|
|
819
|
-
raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`")
|
|
820
|
-
else:
|
|
821
|
-
limits = DEFAULT_CONNECTION_LIMITS
|
|
822
|
-
|
|
823
|
-
if transport is not None:
|
|
824
|
-
kwargs["transport"] = transport
|
|
825
|
-
warnings.warn(
|
|
826
|
-
"The `transport` argument is deprecated. The `http_client` argument should be passed instead",
|
|
827
|
-
category=DeprecationWarning,
|
|
828
|
-
stacklevel=3,
|
|
829
|
-
)
|
|
830
|
-
if http_client is not None:
|
|
831
|
-
raise ValueError("The `http_client` argument is mutually exclusive with `transport`")
|
|
832
|
-
|
|
833
|
-
if proxies is not None:
|
|
834
|
-
kwargs["proxies"] = proxies
|
|
835
|
-
warnings.warn(
|
|
836
|
-
"The `proxies` argument is deprecated. The `http_client` argument should be passed instead",
|
|
837
|
-
category=DeprecationWarning,
|
|
838
|
-
stacklevel=3,
|
|
839
|
-
)
|
|
840
|
-
if http_client is not None:
|
|
841
|
-
raise ValueError("The `http_client` argument is mutually exclusive with `proxies`")
|
|
842
|
-
|
|
843
795
|
if not is_given(timeout):
|
|
844
796
|
# if the user passed in a custom http client with a non-default
|
|
845
797
|
# timeout set then we use that timeout.
|
|
@@ -860,12 +812,9 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
860
812
|
|
|
861
813
|
super().__init__(
|
|
862
814
|
version=version,
|
|
863
|
-
limits=limits,
|
|
864
815
|
# cast to a valid type because mypy doesn't understand our type narrowing
|
|
865
816
|
timeout=cast(Timeout, timeout),
|
|
866
|
-
proxies=proxies,
|
|
867
817
|
base_url=base_url,
|
|
868
|
-
transport=transport,
|
|
869
818
|
max_retries=max_retries,
|
|
870
819
|
custom_query=custom_query,
|
|
871
820
|
custom_headers=custom_headers,
|
|
@@ -875,9 +824,6 @@ class SyncAPIClient(BaseClient[httpx.Client, Stream[Any]]):
|
|
|
875
824
|
base_url=base_url,
|
|
876
825
|
# cast to a valid type because mypy doesn't understand our type narrowing
|
|
877
826
|
timeout=cast(Timeout, timeout),
|
|
878
|
-
limits=limits,
|
|
879
|
-
follow_redirects=True,
|
|
880
|
-
**kwargs, # type: ignore
|
|
881
827
|
)
|
|
882
828
|
|
|
883
829
|
def is_closed(self) -> bool:
|
|
@@ -1372,45 +1318,10 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1372
1318
|
_strict_response_validation: bool,
|
|
1373
1319
|
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
1374
1320
|
timeout: float | Timeout | None | NotGiven = NOT_GIVEN,
|
|
1375
|
-
transport: AsyncTransport | None = None,
|
|
1376
|
-
proxies: ProxiesTypes | None = None,
|
|
1377
|
-
limits: Limits | None = None,
|
|
1378
1321
|
http_client: httpx.AsyncClient | None = None,
|
|
1379
1322
|
custom_headers: Mapping[str, str] | None = None,
|
|
1380
1323
|
custom_query: Mapping[str, object] | None = None,
|
|
1381
1324
|
) -> None:
|
|
1382
|
-
kwargs: dict[str, Any] = {}
|
|
1383
|
-
if limits is not None:
|
|
1384
|
-
warnings.warn(
|
|
1385
|
-
"The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead",
|
|
1386
|
-
category=DeprecationWarning,
|
|
1387
|
-
stacklevel=3,
|
|
1388
|
-
)
|
|
1389
|
-
if http_client is not None:
|
|
1390
|
-
raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`")
|
|
1391
|
-
else:
|
|
1392
|
-
limits = DEFAULT_CONNECTION_LIMITS
|
|
1393
|
-
|
|
1394
|
-
if transport is not None:
|
|
1395
|
-
kwargs["transport"] = transport
|
|
1396
|
-
warnings.warn(
|
|
1397
|
-
"The `transport` argument is deprecated. The `http_client` argument should be passed instead",
|
|
1398
|
-
category=DeprecationWarning,
|
|
1399
|
-
stacklevel=3,
|
|
1400
|
-
)
|
|
1401
|
-
if http_client is not None:
|
|
1402
|
-
raise ValueError("The `http_client` argument is mutually exclusive with `transport`")
|
|
1403
|
-
|
|
1404
|
-
if proxies is not None:
|
|
1405
|
-
kwargs["proxies"] = proxies
|
|
1406
|
-
warnings.warn(
|
|
1407
|
-
"The `proxies` argument is deprecated. The `http_client` argument should be passed instead",
|
|
1408
|
-
category=DeprecationWarning,
|
|
1409
|
-
stacklevel=3,
|
|
1410
|
-
)
|
|
1411
|
-
if http_client is not None:
|
|
1412
|
-
raise ValueError("The `http_client` argument is mutually exclusive with `proxies`")
|
|
1413
|
-
|
|
1414
1325
|
if not is_given(timeout):
|
|
1415
1326
|
# if the user passed in a custom http client with a non-default
|
|
1416
1327
|
# timeout set then we use that timeout.
|
|
@@ -1432,11 +1343,8 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1432
1343
|
super().__init__(
|
|
1433
1344
|
version=version,
|
|
1434
1345
|
base_url=base_url,
|
|
1435
|
-
limits=limits,
|
|
1436
1346
|
# cast to a valid type because mypy doesn't understand our type narrowing
|
|
1437
1347
|
timeout=cast(Timeout, timeout),
|
|
1438
|
-
proxies=proxies,
|
|
1439
|
-
transport=transport,
|
|
1440
1348
|
max_retries=max_retries,
|
|
1441
1349
|
custom_query=custom_query,
|
|
1442
1350
|
custom_headers=custom_headers,
|
|
@@ -1446,9 +1354,6 @@ class AsyncAPIClient(BaseClient[httpx.AsyncClient, AsyncStream[Any]]):
|
|
|
1446
1354
|
base_url=base_url,
|
|
1447
1355
|
# cast to a valid type because mypy doesn't understand our type narrowing
|
|
1448
1356
|
timeout=cast(Timeout, timeout),
|
|
1449
|
-
limits=limits,
|
|
1450
|
-
follow_redirects=True,
|
|
1451
|
-
**kwargs, # type: ignore
|
|
1452
1357
|
)
|
|
1453
1358
|
|
|
1454
1359
|
def is_closed(self) -> bool:
|
|
@@ -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
|
|
|
@@ -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
|
|
|
@@ -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
|
|
|
@@ -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
|
]
|