rayrun-sdk 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.
- rayrun_sdk-0.8.0/.gitignore +48 -0
- rayrun_sdk-0.8.0/PKG-INFO +57 -0
- rayrun_sdk-0.8.0/README.md +41 -0
- rayrun_sdk-0.8.0/dist/.gitignore +1 -0
- rayrun_sdk-0.8.0/pyproject.toml +28 -0
- rayrun_sdk-0.8.0/src/rayrun/__init__.py +3 -0
- rayrun_sdk-0.8.0/src/rayrun/client.py +257 -0
- rayrun_sdk-0.8.0/src/rayrun/py.typed +1 -0
- rayrun_sdk-0.8.0/tests/test_client.py +79 -0
- rayrun_sdk-0.8.0/uv.lock +271 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
**/*.log
|
|
2
|
+
**/*.tsbuildinfo
|
|
3
|
+
**/.*
|
|
4
|
+
/apps/rayrun-web/build
|
|
5
|
+
/apps/rayrun-web/dist
|
|
6
|
+
/apps/rayrun-web/playwright-report
|
|
7
|
+
/apps/rayrun-web/server
|
|
8
|
+
/apps/rayrun-web/storybook-static
|
|
9
|
+
/apps/rayrun-web/test-results
|
|
10
|
+
/apps/rayrun-web/app/styled-system/
|
|
11
|
+
/coverage
|
|
12
|
+
node_modules
|
|
13
|
+
!**/.dockerignore
|
|
14
|
+
!**/.envrc.example
|
|
15
|
+
!**/.gitignore
|
|
16
|
+
!**/.oxfmtrc.json
|
|
17
|
+
# `**/`, not `/`: the Storybook config lives in the workspace (apps/rayrun-web/.storybook), so a
|
|
18
|
+
# root-anchored exception leaves it untracked and a fresh clone has no Storybook at all.
|
|
19
|
+
!**/.storybook
|
|
20
|
+
!**/.storybook/**
|
|
21
|
+
!/.claude
|
|
22
|
+
# Claude Code's Workflow worktrees — full checkouts of this repository, created under `.claude/`
|
|
23
|
+
# and therefore un-ignored by the line above. Four tools walk them and all four break: `oxfmt`
|
|
24
|
+
# formats 8,000 files instead of 1,500, `oxlint` dies on a duplicate plugin registration in a
|
|
25
|
+
# worktree's own config so `--fix` never runs, `knip` reports every worktree file as unused
|
|
26
|
+
# (7,350 of them), and `git status` carries a `??` line that never clears.
|
|
27
|
+
/.claude/worktrees
|
|
28
|
+
!/.github
|
|
29
|
+
!/.husky
|
|
30
|
+
!/.nvmrc
|
|
31
|
+
!/.vscode
|
|
32
|
+
!/apps/rayrun-web/.env.ci.encrypted
|
|
33
|
+
!/apps/rayrun-web/.env.production.encrypted
|
|
34
|
+
# The certificate itself is gitignored below, but the directory has to exist for the mkcert
|
|
35
|
+
# command in certs/README.md to write into.
|
|
36
|
+
!/certs/local.ray.run/.gitkeep
|
|
37
|
+
!/pnpm-lock.yaml
|
|
38
|
+
/apps/rayrun-web/vite.config.ts.*
|
|
39
|
+
|
|
40
|
+
/apps/rayrun-web/app/types/safe-routes.d.ts
|
|
41
|
+
/tilt_modules
|
|
42
|
+
|
|
43
|
+
# mkcert-generated; tied to each developer's local CA, see certs/README.md
|
|
44
|
+
/certs/local.ray.run/fullchain.pem
|
|
45
|
+
/certs/local.ray.run/private.key
|
|
46
|
+
|
|
47
|
+
# GitHub App private keys are downloaded into the repository root by GitHub's setup flow.
|
|
48
|
+
/*.private-key.pem
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: rayrun-sdk
|
|
3
|
+
Version: 0.8.0
|
|
4
|
+
Summary: Python SDK for Rayrun embedded agents and MCP infrastructure
|
|
5
|
+
Project-URL: Documentation, https://ray.run/docs/public-api
|
|
6
|
+
Project-URL: Homepage, https://ray.run
|
|
7
|
+
Project-URL: Repository, https://github.com/rayrundev/rayrun
|
|
8
|
+
Author-email: Rayrun <support@ray.run>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
Keywords: agents,mcp,model-context-protocol,rayrun
|
|
11
|
+
Requires-Python: >=3.9
|
|
12
|
+
Requires-Dist: httpx<1,>=0.28
|
|
13
|
+
Provides-Extra: test
|
|
14
|
+
Requires-Dist: pytest<9,>=8; extra == 'test'
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
|
|
17
|
+
# Rayrun Python SDK
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
pip install rayrun-sdk
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Create one short-lived MCP session for an application user:
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
import os
|
|
27
|
+
|
|
28
|
+
from rayrun import Rayrun
|
|
29
|
+
|
|
30
|
+
with Rayrun(os.environ["RAYRUN_API_KEY"]) as rayrun:
|
|
31
|
+
principal = rayrun.external_principals.upsert(
|
|
32
|
+
"customer_123",
|
|
33
|
+
display_name="Ada",
|
|
34
|
+
metadata={"plan": "pro"},
|
|
35
|
+
)
|
|
36
|
+
session = rayrun.external_principals.create_session(
|
|
37
|
+
principal["uid"],
|
|
38
|
+
runtime_context={"accountId": "customer_123", "plan": "pro"},
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
page = rayrun.external_principals.list_sessions(principal["uid"], limit=50)
|
|
42
|
+
if page["page"]["nextCursor"]:
|
|
43
|
+
next_page = rayrun.external_principals.list_sessions(
|
|
44
|
+
principal["uid"], cursor=page["page"]["nextCursor"], limit=50
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
print(session["endpoint"], session["sessionToken"])
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`AsyncRayrun` exposes the same methods for async applications. Use a key with
|
|
51
|
+
`principals:read`, `principals:write`, `sessions:read`, and `sessions:write`. Create a Connect Link
|
|
52
|
+
with `create_connect_link(principal_uid, connection_uid)` when the user must authorize an upstream
|
|
53
|
+
OAuth account. Correlate the returned `uid` with `connectLinkUid` in either terminal webhook:
|
|
54
|
+
`external.authorization.completed` or `external.authorization.failed` (`provider_denied`,
|
|
55
|
+
`incomplete_response`, `authorization_failed`, or `expired`). A session created without
|
|
56
|
+
`tool_access_profile_uid` is read-only; pass an access profile to define an explicit tool ceiling that
|
|
57
|
+
includes approved mutations.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Rayrun Python SDK
|
|
2
|
+
|
|
3
|
+
```sh
|
|
4
|
+
pip install rayrun-sdk
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
Create one short-lived MCP session for an application user:
|
|
8
|
+
|
|
9
|
+
```python
|
|
10
|
+
import os
|
|
11
|
+
|
|
12
|
+
from rayrun import Rayrun
|
|
13
|
+
|
|
14
|
+
with Rayrun(os.environ["RAYRUN_API_KEY"]) as rayrun:
|
|
15
|
+
principal = rayrun.external_principals.upsert(
|
|
16
|
+
"customer_123",
|
|
17
|
+
display_name="Ada",
|
|
18
|
+
metadata={"plan": "pro"},
|
|
19
|
+
)
|
|
20
|
+
session = rayrun.external_principals.create_session(
|
|
21
|
+
principal["uid"],
|
|
22
|
+
runtime_context={"accountId": "customer_123", "plan": "pro"},
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
page = rayrun.external_principals.list_sessions(principal["uid"], limit=50)
|
|
26
|
+
if page["page"]["nextCursor"]:
|
|
27
|
+
next_page = rayrun.external_principals.list_sessions(
|
|
28
|
+
principal["uid"], cursor=page["page"]["nextCursor"], limit=50
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
print(session["endpoint"], session["sessionToken"])
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
`AsyncRayrun` exposes the same methods for async applications. Use a key with
|
|
35
|
+
`principals:read`, `principals:write`, `sessions:read`, and `sessions:write`. Create a Connect Link
|
|
36
|
+
with `create_connect_link(principal_uid, connection_uid)` when the user must authorize an upstream
|
|
37
|
+
OAuth account. Correlate the returned `uid` with `connectLinkUid` in either terminal webhook:
|
|
38
|
+
`external.authorization.completed` or `external.authorization.failed` (`provider_denied`,
|
|
39
|
+
`incomplete_response`, `authorization_failed`, or `expired`). A session created without
|
|
40
|
+
`tool_access_profile_uid` is read-only; pass an access profile to define an explicit tool ceiling that
|
|
41
|
+
includes approved mutations.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling>=1.27"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "rayrun-sdk"
|
|
7
|
+
version = "0.8.0"
|
|
8
|
+
description = "Python SDK for Rayrun embedded agents and MCP infrastructure"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [{ name = "Rayrun", email = "support@ray.run" }]
|
|
13
|
+
keywords = ["agents", "mcp", "model-context-protocol", "rayrun"]
|
|
14
|
+
dependencies = ["httpx>=0.28,<1"]
|
|
15
|
+
|
|
16
|
+
[project.urls]
|
|
17
|
+
Documentation = "https://ray.run/docs/public-api"
|
|
18
|
+
Homepage = "https://ray.run"
|
|
19
|
+
Repository = "https://github.com/rayrundev/rayrun"
|
|
20
|
+
|
|
21
|
+
[project.optional-dependencies]
|
|
22
|
+
test = ["pytest>=8,<9"]
|
|
23
|
+
|
|
24
|
+
[tool.pytest.ini_options]
|
|
25
|
+
testpaths = ["tests"]
|
|
26
|
+
|
|
27
|
+
[tool.hatch.build.targets.wheel]
|
|
28
|
+
packages = ["src/rayrun"]
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Any, Dict, Mapping, Optional
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
JsonObject = Mapping[str, Any]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def _page_params(limit: int, cursor: Optional[str]) -> Dict[str, Any]:
|
|
12
|
+
return {"limit": limit, **({"cursor": cursor} if cursor is not None else {})}
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class RayrunApiError(RuntimeError):
|
|
16
|
+
def __init__(
|
|
17
|
+
self,
|
|
18
|
+
message: str,
|
|
19
|
+
*,
|
|
20
|
+
code: str,
|
|
21
|
+
request_id: Optional[str],
|
|
22
|
+
status: int,
|
|
23
|
+
) -> None:
|
|
24
|
+
super().__init__(message)
|
|
25
|
+
self.code = code
|
|
26
|
+
self.request_id = request_id
|
|
27
|
+
self.status = status
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def _raise_for_status(response: httpx.Response) -> None:
|
|
31
|
+
if response.is_success:
|
|
32
|
+
return
|
|
33
|
+
try:
|
|
34
|
+
body = response.json()
|
|
35
|
+
except ValueError:
|
|
36
|
+
body = {}
|
|
37
|
+
error = body.get("error", {}) if isinstance(body, dict) else {}
|
|
38
|
+
raise RayrunApiError(
|
|
39
|
+
error.get("message", f"Rayrun API request failed with HTTP {response.status_code}."),
|
|
40
|
+
code=error.get("code", "request_failed"),
|
|
41
|
+
request_id=error.get("requestId") or response.headers.get("rayrun-request-id"),
|
|
42
|
+
status=response.status_code,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class ExternalPrincipals:
|
|
47
|
+
def __init__(self, client: httpx.Client) -> None:
|
|
48
|
+
self._client = client
|
|
49
|
+
|
|
50
|
+
def _request(self, method: str, path: str, **kwargs: Any) -> Any:
|
|
51
|
+
response = self._client.request(method, path, **kwargs)
|
|
52
|
+
_raise_for_status(response)
|
|
53
|
+
return None if response.status_code == 204 else response.json()
|
|
54
|
+
|
|
55
|
+
def upsert(
|
|
56
|
+
self,
|
|
57
|
+
external_id: str,
|
|
58
|
+
*,
|
|
59
|
+
display_name: Optional[str] = None,
|
|
60
|
+
metadata: Optional[JsonObject] = None,
|
|
61
|
+
) -> Dict[str, str]:
|
|
62
|
+
return self._request(
|
|
63
|
+
"POST",
|
|
64
|
+
"/external-principals",
|
|
65
|
+
json={
|
|
66
|
+
"displayName": display_name,
|
|
67
|
+
"externalId": external_id,
|
|
68
|
+
"metadata": dict(metadata or {}),
|
|
69
|
+
},
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
def list(self, *, limit: int = 50, cursor: Optional[str] = None) -> Dict[str, Any]:
|
|
73
|
+
return self._request(
|
|
74
|
+
"GET", "/external-principals", params=_page_params(limit, cursor)
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
def delete(self, principal_uid: str) -> None:
|
|
78
|
+
self._request("DELETE", f"/external-principals/{principal_uid}")
|
|
79
|
+
|
|
80
|
+
def create_session(
|
|
81
|
+
self,
|
|
82
|
+
principal_uid: str,
|
|
83
|
+
*,
|
|
84
|
+
expires_in_seconds: int = 3600,
|
|
85
|
+
runtime_context: Optional[JsonObject] = None,
|
|
86
|
+
tool_access_profile_uid: Optional[str] = None,
|
|
87
|
+
) -> Dict[str, Any]:
|
|
88
|
+
return self._request(
|
|
89
|
+
"POST",
|
|
90
|
+
f"/external-principals/{principal_uid}/sessions",
|
|
91
|
+
json={
|
|
92
|
+
"expiresInSeconds": expires_in_seconds,
|
|
93
|
+
"runtimeContext": dict(runtime_context or {}),
|
|
94
|
+
"toolAccessProfileUid": tool_access_profile_uid,
|
|
95
|
+
},
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
def list_sessions(
|
|
99
|
+
self,
|
|
100
|
+
principal_uid: str,
|
|
101
|
+
*,
|
|
102
|
+
limit: int = 50,
|
|
103
|
+
cursor: Optional[str] = None,
|
|
104
|
+
) -> Dict[str, Any]:
|
|
105
|
+
return self._request(
|
|
106
|
+
"GET",
|
|
107
|
+
f"/external-principals/{principal_uid}/sessions",
|
|
108
|
+
params=_page_params(limit, cursor),
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
def revoke_session(self, principal_uid: str, session_uid: str) -> None:
|
|
112
|
+
self._request("DELETE", f"/external-principals/{principal_uid}/sessions/{session_uid}")
|
|
113
|
+
|
|
114
|
+
def create_connect_link(self, principal_uid: str, connection_uid: str) -> Dict[str, str]:
|
|
115
|
+
return self._request(
|
|
116
|
+
"POST",
|
|
117
|
+
f"/external-principals/{principal_uid}/connect-links",
|
|
118
|
+
json={"connectionUid": connection_uid},
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class AsyncExternalPrincipals:
|
|
123
|
+
def __init__(self, client: httpx.AsyncClient) -> None:
|
|
124
|
+
self._client = client
|
|
125
|
+
|
|
126
|
+
async def _request(self, method: str, path: str, **kwargs: Any) -> Any:
|
|
127
|
+
response = await self._client.request(method, path, **kwargs)
|
|
128
|
+
_raise_for_status(response)
|
|
129
|
+
return None if response.status_code == 204 else response.json()
|
|
130
|
+
|
|
131
|
+
async def upsert(
|
|
132
|
+
self,
|
|
133
|
+
external_id: str,
|
|
134
|
+
*,
|
|
135
|
+
display_name: Optional[str] = None,
|
|
136
|
+
metadata: Optional[JsonObject] = None,
|
|
137
|
+
) -> Dict[str, str]:
|
|
138
|
+
return await self._request(
|
|
139
|
+
"POST",
|
|
140
|
+
"/external-principals",
|
|
141
|
+
json={
|
|
142
|
+
"displayName": display_name,
|
|
143
|
+
"externalId": external_id,
|
|
144
|
+
"metadata": dict(metadata or {}),
|
|
145
|
+
},
|
|
146
|
+
)
|
|
147
|
+
|
|
148
|
+
async def list(
|
|
149
|
+
self, *, limit: int = 50, cursor: Optional[str] = None
|
|
150
|
+
) -> Dict[str, Any]:
|
|
151
|
+
return await self._request(
|
|
152
|
+
"GET", "/external-principals", params=_page_params(limit, cursor)
|
|
153
|
+
)
|
|
154
|
+
|
|
155
|
+
async def delete(self, principal_uid: str) -> None:
|
|
156
|
+
await self._request("DELETE", f"/external-principals/{principal_uid}")
|
|
157
|
+
|
|
158
|
+
async def create_session(
|
|
159
|
+
self,
|
|
160
|
+
principal_uid: str,
|
|
161
|
+
*,
|
|
162
|
+
expires_in_seconds: int = 3600,
|
|
163
|
+
runtime_context: Optional[JsonObject] = None,
|
|
164
|
+
tool_access_profile_uid: Optional[str] = None,
|
|
165
|
+
) -> Dict[str, Any]:
|
|
166
|
+
return await self._request(
|
|
167
|
+
"POST",
|
|
168
|
+
f"/external-principals/{principal_uid}/sessions",
|
|
169
|
+
json={
|
|
170
|
+
"expiresInSeconds": expires_in_seconds,
|
|
171
|
+
"runtimeContext": dict(runtime_context or {}),
|
|
172
|
+
"toolAccessProfileUid": tool_access_profile_uid,
|
|
173
|
+
},
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
async def list_sessions(
|
|
177
|
+
self,
|
|
178
|
+
principal_uid: str,
|
|
179
|
+
*,
|
|
180
|
+
limit: int = 50,
|
|
181
|
+
cursor: Optional[str] = None,
|
|
182
|
+
) -> Dict[str, Any]:
|
|
183
|
+
return await self._request(
|
|
184
|
+
"GET",
|
|
185
|
+
f"/external-principals/{principal_uid}/sessions",
|
|
186
|
+
params=_page_params(limit, cursor),
|
|
187
|
+
)
|
|
188
|
+
|
|
189
|
+
async def revoke_session(self, principal_uid: str, session_uid: str) -> None:
|
|
190
|
+
await self._request("DELETE", f"/external-principals/{principal_uid}/sessions/{session_uid}")
|
|
191
|
+
|
|
192
|
+
async def create_connect_link(
|
|
193
|
+
self, principal_uid: str, connection_uid: str
|
|
194
|
+
) -> Dict[str, str]:
|
|
195
|
+
return await self._request(
|
|
196
|
+
"POST",
|
|
197
|
+
f"/external-principals/{principal_uid}/connect-links",
|
|
198
|
+
json={"connectionUid": connection_uid},
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
class Rayrun:
|
|
203
|
+
def __init__(
|
|
204
|
+
self,
|
|
205
|
+
api_key: str,
|
|
206
|
+
*,
|
|
207
|
+
base_url: str = "https://ray.run",
|
|
208
|
+
timeout: float = 30.0,
|
|
209
|
+
transport: Optional[httpx.BaseTransport] = None,
|
|
210
|
+
) -> None:
|
|
211
|
+
if not api_key:
|
|
212
|
+
raise ValueError("Rayrun requires an api_key.")
|
|
213
|
+
self._client = httpx.Client(
|
|
214
|
+
base_url=f"{base_url.rstrip('/')}/v1",
|
|
215
|
+
headers={"Authorization": f"Bearer {api_key}", "User-Agent": "rayrun-python/0.8.0"},
|
|
216
|
+
timeout=timeout,
|
|
217
|
+
transport=transport,
|
|
218
|
+
)
|
|
219
|
+
self.external_principals = ExternalPrincipals(self._client)
|
|
220
|
+
|
|
221
|
+
def close(self) -> None:
|
|
222
|
+
self._client.close()
|
|
223
|
+
|
|
224
|
+
def __enter__(self) -> "Rayrun":
|
|
225
|
+
return self
|
|
226
|
+
|
|
227
|
+
def __exit__(self, *_args: Any) -> None:
|
|
228
|
+
self.close()
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
class AsyncRayrun:
|
|
232
|
+
def __init__(
|
|
233
|
+
self,
|
|
234
|
+
api_key: str,
|
|
235
|
+
*,
|
|
236
|
+
base_url: str = "https://ray.run",
|
|
237
|
+
timeout: float = 30.0,
|
|
238
|
+
transport: Optional[httpx.AsyncBaseTransport] = None,
|
|
239
|
+
) -> None:
|
|
240
|
+
if not api_key:
|
|
241
|
+
raise ValueError("Rayrun requires an api_key.")
|
|
242
|
+
self._client = httpx.AsyncClient(
|
|
243
|
+
base_url=f"{base_url.rstrip('/')}/v1",
|
|
244
|
+
headers={"Authorization": f"Bearer {api_key}", "User-Agent": "rayrun-python/0.8.0"},
|
|
245
|
+
timeout=timeout,
|
|
246
|
+
transport=transport,
|
|
247
|
+
)
|
|
248
|
+
self.external_principals = AsyncExternalPrincipals(self._client)
|
|
249
|
+
|
|
250
|
+
async def close(self) -> None:
|
|
251
|
+
await self._client.aclose()
|
|
252
|
+
|
|
253
|
+
async def __aenter__(self) -> "AsyncRayrun":
|
|
254
|
+
return self
|
|
255
|
+
|
|
256
|
+
async def __aexit__(self, *_args: Any) -> None:
|
|
257
|
+
await self.close()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
|
|
3
|
+
import httpx
|
|
4
|
+
import pytest
|
|
5
|
+
|
|
6
|
+
from rayrun import AsyncRayrun, Rayrun, RayrunApiError
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def test_external_principal_lifecycle() -> None:
|
|
10
|
+
requests = []
|
|
11
|
+
|
|
12
|
+
def handler(request: httpx.Request) -> httpx.Response:
|
|
13
|
+
requests.append(request)
|
|
14
|
+
if request.method == "DELETE":
|
|
15
|
+
return httpx.Response(204)
|
|
16
|
+
return httpx.Response(
|
|
17
|
+
200 if request.method == "GET" else 201,
|
|
18
|
+
json={"items": [], "page": {"nextCursor": None}, "uid": "p1"},
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
with Rayrun("rak_test", base_url="https://example.test", transport=httpx.MockTransport(handler)) as rayrun:
|
|
22
|
+
rayrun.external_principals.upsert("customer_123", metadata={"plan": "pro"})
|
|
23
|
+
rayrun.external_principals.list(limit=10, cursor="principal-page")
|
|
24
|
+
rayrun.external_principals.create_session("p1", runtime_context={"accountId": "customer_123"})
|
|
25
|
+
rayrun.external_principals.list_sessions("p1", cursor="session-page")
|
|
26
|
+
rayrun.external_principals.create_connect_link("p1", "connection1")
|
|
27
|
+
rayrun.external_principals.revoke_session("p1", "session1")
|
|
28
|
+
rayrun.external_principals.delete("p1")
|
|
29
|
+
|
|
30
|
+
assert [request.url.path for request in requests] == [
|
|
31
|
+
"/v1/external-principals",
|
|
32
|
+
"/v1/external-principals",
|
|
33
|
+
"/v1/external-principals/p1/sessions",
|
|
34
|
+
"/v1/external-principals/p1/sessions",
|
|
35
|
+
"/v1/external-principals/p1/connect-links",
|
|
36
|
+
"/v1/external-principals/p1/sessions/session1",
|
|
37
|
+
"/v1/external-principals/p1",
|
|
38
|
+
]
|
|
39
|
+
assert requests[0].headers["authorization"] == "Bearer rak_test"
|
|
40
|
+
assert dict(requests[1].url.params) == {"cursor": "principal-page", "limit": "10"}
|
|
41
|
+
assert dict(requests[3].url.params) == {"cursor": "session-page", "limit": "50"}
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def test_async_principal_list() -> None:
|
|
45
|
+
async def exercise() -> None:
|
|
46
|
+
async def handler(request: httpx.Request) -> httpx.Response:
|
|
47
|
+
return httpx.Response(
|
|
48
|
+
200,
|
|
49
|
+
json={"items": [{"externalId": "customer_123"}], "page": {"nextCursor": "next"}},
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
async with AsyncRayrun(
|
|
53
|
+
"rak_test",
|
|
54
|
+
base_url="https://example.test",
|
|
55
|
+
transport=httpx.MockTransport(handler),
|
|
56
|
+
) as rayrun:
|
|
57
|
+
assert await rayrun.external_principals.list() == {
|
|
58
|
+
"items": [{"externalId": "customer_123"}],
|
|
59
|
+
"page": {"nextCursor": "next"},
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
asyncio.run(exercise())
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def test_structured_api_error() -> None:
|
|
66
|
+
def handler(request: httpx.Request) -> httpx.Response:
|
|
67
|
+
return httpx.Response(
|
|
68
|
+
403,
|
|
69
|
+
headers={"rayrun-request-id": "request1"},
|
|
70
|
+
json={"error": {"code": "insufficient_scope", "message": "No access"}},
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
with Rayrun("rak_test", transport=httpx.MockTransport(handler)) as rayrun:
|
|
74
|
+
with pytest.raises(RayrunApiError) as raised:
|
|
75
|
+
rayrun.external_principals.list()
|
|
76
|
+
|
|
77
|
+
assert raised.value.code == "insufficient_scope"
|
|
78
|
+
assert raised.value.request_id == "request1"
|
|
79
|
+
assert raised.value.status == 403
|
rayrun_sdk-0.8.0/uv.lock
ADDED
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
version = 1
|
|
2
|
+
revision = 3
|
|
3
|
+
requires-python = ">=3.9"
|
|
4
|
+
resolution-markers = [
|
|
5
|
+
"python_full_version >= '3.10'",
|
|
6
|
+
"python_full_version < '3.10'",
|
|
7
|
+
]
|
|
8
|
+
|
|
9
|
+
[[package]]
|
|
10
|
+
name = "anyio"
|
|
11
|
+
version = "4.12.1"
|
|
12
|
+
source = { registry = "https://pypi.org/simple" }
|
|
13
|
+
resolution-markers = [
|
|
14
|
+
"python_full_version < '3.10'",
|
|
15
|
+
]
|
|
16
|
+
dependencies = [
|
|
17
|
+
{ name = "exceptiongroup" },
|
|
18
|
+
{ name = "idna" },
|
|
19
|
+
{ name = "typing-extensions" },
|
|
20
|
+
]
|
|
21
|
+
sdist = { url = "https://files.pythonhosted.org/packages/96/f0/5eb65b2bb0d09ac6776f2eb54adee6abe8228ea05b20a5ad0e4945de8aac/anyio-4.12.1.tar.gz", hash = "sha256:41cfcc3a4c85d3f05c932da7c26d0201ac36f72abd4435ba90d0464a3ffed703", size = 228685, upload-time = "2026-01-06T11:45:21.246Z" }
|
|
22
|
+
wheels = [
|
|
23
|
+
{ url = "https://files.pythonhosted.org/packages/38/0e/27be9fdef66e72d64c0cdc3cc2823101b80585f8119b5c112c2e8f5f7dab/anyio-4.12.1-py3-none-any.whl", hash = "sha256:d405828884fc140aa80a3c667b8beed277f1dfedec42ba031bd6ac3db606ab6c", size = 113592, upload-time = "2026-01-06T11:45:19.497Z" },
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[[package]]
|
|
27
|
+
name = "anyio"
|
|
28
|
+
version = "4.14.2"
|
|
29
|
+
source = { registry = "https://pypi.org/simple" }
|
|
30
|
+
resolution-markers = [
|
|
31
|
+
"python_full_version >= '3.10'",
|
|
32
|
+
]
|
|
33
|
+
dependencies = [
|
|
34
|
+
{ name = "exceptiongroup", marker = "python_full_version < '3.11'" },
|
|
35
|
+
{ name = "idna" },
|
|
36
|
+
{ name = "typing-extensions", marker = "python_full_version < '3.13'" },
|
|
37
|
+
]
|
|
38
|
+
sdist = { url = "https://files.pythonhosted.org/packages/61/cc/a381afa6efea9f496eff839d4a6a1aed3bfafc7b3ab4b0d1b243a12573dd/anyio-4.14.2.tar.gz", hash = "sha256:cfa139f3ed1a23ee8f88a145ddb5ac7605b8bbfd8592baacd7ce3d8bb4313c7f", size = 260176, upload-time = "2026-07-12T20:29:07.082Z" }
|
|
39
|
+
wheels = [
|
|
40
|
+
{ url = "https://files.pythonhosted.org/packages/da/35/f2287558c17e29fafc8ef3daf819bb9834061cfa43bff8014f7df7f63bdc/anyio-4.14.2-py3-none-any.whl", hash = "sha256:9f505dda5ac9f0c8309b5e8bd445a8c2bf7246f3ce950121e45ea15bc41d1494", size = 125813, upload-time = "2026-07-12T20:29:05.763Z" },
|
|
41
|
+
]
|
|
42
|
+
|
|
43
|
+
[[package]]
|
|
44
|
+
name = "certifi"
|
|
45
|
+
version = "2026.7.22"
|
|
46
|
+
source = { registry = "https://pypi.org/simple" }
|
|
47
|
+
sdist = { url = "https://files.pythonhosted.org/packages/a3/c2/24167ea9858356b47a87a50d39908bfdb72ceeefe0041586e704e5376b3a/certifi-2026.7.22.tar.gz", hash = "sha256:741e2c3b351ddf169a738da9f2c048608ff7f2c5cc02f1ebc6b118bb090d5d55", size = 138112, upload-time = "2026-07-22T03:35:12.644Z" }
|
|
48
|
+
wheels = [
|
|
49
|
+
{ url = "https://files.pythonhosted.org/packages/0b/a7/71ac2cff56fec219ed242bb11b8efb69fcc4bec75db06fb7bfe35de520e6/certifi-2026.7.22-py3-none-any.whl", hash = "sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775", size = 136983, upload-time = "2026-07-22T03:35:11.276Z" },
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
[[package]]
|
|
53
|
+
name = "colorama"
|
|
54
|
+
version = "0.4.6"
|
|
55
|
+
source = { registry = "https://pypi.org/simple" }
|
|
56
|
+
sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" }
|
|
57
|
+
wheels = [
|
|
58
|
+
{ url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
[[package]]
|
|
62
|
+
name = "exceptiongroup"
|
|
63
|
+
version = "1.3.1"
|
|
64
|
+
source = { registry = "https://pypi.org/simple" }
|
|
65
|
+
dependencies = [
|
|
66
|
+
{ name = "typing-extensions" },
|
|
67
|
+
]
|
|
68
|
+
sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" }
|
|
69
|
+
wheels = [
|
|
70
|
+
{ url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" },
|
|
71
|
+
]
|
|
72
|
+
|
|
73
|
+
[[package]]
|
|
74
|
+
name = "h11"
|
|
75
|
+
version = "0.16.0"
|
|
76
|
+
source = { registry = "https://pypi.org/simple" }
|
|
77
|
+
sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" }
|
|
78
|
+
wheels = [
|
|
79
|
+
{ url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" },
|
|
80
|
+
]
|
|
81
|
+
|
|
82
|
+
[[package]]
|
|
83
|
+
name = "httpcore"
|
|
84
|
+
version = "1.0.9"
|
|
85
|
+
source = { registry = "https://pypi.org/simple" }
|
|
86
|
+
dependencies = [
|
|
87
|
+
{ name = "certifi" },
|
|
88
|
+
{ name = "h11" },
|
|
89
|
+
]
|
|
90
|
+
sdist = { url = "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8", size = 85484, upload-time = "2025-04-24T22:06:22.219Z" }
|
|
91
|
+
wheels = [
|
|
92
|
+
{ url = "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", size = 78784, upload-time = "2025-04-24T22:06:20.566Z" },
|
|
93
|
+
]
|
|
94
|
+
|
|
95
|
+
[[package]]
|
|
96
|
+
name = "httpx"
|
|
97
|
+
version = "0.28.1"
|
|
98
|
+
source = { registry = "https://pypi.org/simple" }
|
|
99
|
+
dependencies = [
|
|
100
|
+
{ name = "anyio", version = "4.12.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" },
|
|
101
|
+
{ name = "anyio", version = "4.14.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" },
|
|
102
|
+
{ name = "certifi" },
|
|
103
|
+
{ name = "httpcore" },
|
|
104
|
+
{ name = "idna" },
|
|
105
|
+
]
|
|
106
|
+
sdist = { url = "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc", size = 141406, upload-time = "2024-12-06T15:37:23.222Z" }
|
|
107
|
+
wheels = [
|
|
108
|
+
{ url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517, upload-time = "2024-12-06T15:37:21.509Z" },
|
|
109
|
+
]
|
|
110
|
+
|
|
111
|
+
[[package]]
|
|
112
|
+
name = "idna"
|
|
113
|
+
version = "3.19"
|
|
114
|
+
source = { registry = "https://pypi.org/simple" }
|
|
115
|
+
sdist = { url = "https://files.pythonhosted.org/packages/5f/f7/abb373e5757eaec4b922b92f97ec8d6d7e057cf06778247604fbc4e7c3f3/idna-3.19.tar.gz", hash = "sha256:5e0811a4383b21dc5838069f801c4fb62113b7447663d2530d2bd6e77b49bf15", size = 215237, upload-time = "2026-08-18T05:14:24.27Z" }
|
|
116
|
+
wheels = [
|
|
117
|
+
{ url = "https://files.pythonhosted.org/packages/57/b0/0e52c878c53f245edd3a11020f20979b3f490f245af532c7cae3027754b5/idna-3.19-py3-none-any.whl", hash = "sha256:815e7be7a7806d54abb586dc943addc79e8b2ee16915059658cbeff4b1b43bf4", size = 68550, upload-time = "2026-08-18T05:14:22.343Z" },
|
|
118
|
+
]
|
|
119
|
+
|
|
120
|
+
[[package]]
|
|
121
|
+
name = "iniconfig"
|
|
122
|
+
version = "2.1.0"
|
|
123
|
+
source = { registry = "https://pypi.org/simple" }
|
|
124
|
+
resolution-markers = [
|
|
125
|
+
"python_full_version < '3.10'",
|
|
126
|
+
]
|
|
127
|
+
sdist = { url = "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7", size = 4793, upload-time = "2025-03-19T20:09:59.721Z" }
|
|
128
|
+
wheels = [
|
|
129
|
+
{ url = "https://files.pythonhosted.org/packages/2c/e1/e6716421ea10d38022b952c159d5161ca1193197fb744506875fbb87ea7b/iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760", size = 6050, upload-time = "2025-03-19T20:10:01.071Z" },
|
|
130
|
+
]
|
|
131
|
+
|
|
132
|
+
[[package]]
|
|
133
|
+
name = "iniconfig"
|
|
134
|
+
version = "2.3.0"
|
|
135
|
+
source = { registry = "https://pypi.org/simple" }
|
|
136
|
+
resolution-markers = [
|
|
137
|
+
"python_full_version >= '3.10'",
|
|
138
|
+
]
|
|
139
|
+
sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" }
|
|
140
|
+
wheels = [
|
|
141
|
+
{ url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" },
|
|
142
|
+
]
|
|
143
|
+
|
|
144
|
+
[[package]]
|
|
145
|
+
name = "packaging"
|
|
146
|
+
version = "26.3"
|
|
147
|
+
source = { registry = "https://pypi.org/simple" }
|
|
148
|
+
sdist = { url = "https://files.pythonhosted.org/packages/7d/fa/3944b40b07da9ce895c0e6303a5ab7d53da063554f534556b134a54d6093/packaging-26.3.tar.gz", hash = "sha256:94edc256424af38762eb31306eed28beb9f0efc50a8837492c9d6fd6004aed79", size = 313412, upload-time = "2026-08-04T18:15:28.737Z" }
|
|
149
|
+
wheels = [
|
|
150
|
+
{ url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956, upload-time = "2026-08-04T18:15:27.159Z" },
|
|
151
|
+
]
|
|
152
|
+
|
|
153
|
+
[[package]]
|
|
154
|
+
name = "pluggy"
|
|
155
|
+
version = "1.6.0"
|
|
156
|
+
source = { registry = "https://pypi.org/simple" }
|
|
157
|
+
sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" }
|
|
158
|
+
wheels = [
|
|
159
|
+
{ url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" },
|
|
160
|
+
]
|
|
161
|
+
|
|
162
|
+
[[package]]
|
|
163
|
+
name = "pygments"
|
|
164
|
+
version = "2.21.0"
|
|
165
|
+
source = { registry = "https://pypi.org/simple" }
|
|
166
|
+
sdist = { url = "https://files.pythonhosted.org/packages/49/2e/ced460408999b33da6b31b0021b0f37d329e202d4169aeb164493778f25b/pygments-2.21.0.tar.gz", hash = "sha256:610ca751c9bc2492b38eb9a38a7fbc93edbbb2d7182edaf34e66ae493dee5c8c", size = 5005329, upload-time = "2026-08-17T08:02:48.824Z" }
|
|
167
|
+
wheels = [
|
|
168
|
+
{ url = "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", hash = "sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", size = 1250147, upload-time = "2026-08-17T08:02:44.912Z" },
|
|
169
|
+
]
|
|
170
|
+
|
|
171
|
+
[[package]]
|
|
172
|
+
name = "pytest"
|
|
173
|
+
version = "8.4.2"
|
|
174
|
+
source = { registry = "https://pypi.org/simple" }
|
|
175
|
+
dependencies = [
|
|
176
|
+
{ name = "colorama", marker = "sys_platform == 'win32'" },
|
|
177
|
+
{ name = "exceptiongroup", marker = "python_full_version < '3.11'" },
|
|
178
|
+
{ name = "iniconfig", version = "2.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" },
|
|
179
|
+
{ name = "iniconfig", version = "2.3.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" },
|
|
180
|
+
{ name = "packaging" },
|
|
181
|
+
{ name = "pluggy" },
|
|
182
|
+
{ name = "pygments" },
|
|
183
|
+
{ name = "tomli", marker = "python_full_version < '3.11'" },
|
|
184
|
+
]
|
|
185
|
+
sdist = { url = "https://files.pythonhosted.org/packages/a3/5c/00a0e072241553e1a7496d638deababa67c5058571567b92a7eaa258397c/pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01", size = 1519618, upload-time = "2025-09-04T14:34:22.711Z" }
|
|
186
|
+
wheels = [
|
|
187
|
+
{ url = "https://files.pythonhosted.org/packages/a8/a4/20da314d277121d6534b3a980b29035dcd51e6744bd79075a6ce8fa4eb8d/pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79", size = 365750, upload-time = "2025-09-04T14:34:20.226Z" },
|
|
188
|
+
]
|
|
189
|
+
|
|
190
|
+
[[package]]
|
|
191
|
+
name = "rayrun-sdk"
|
|
192
|
+
version = "0.8.0"
|
|
193
|
+
source = { editable = "." }
|
|
194
|
+
dependencies = [
|
|
195
|
+
{ name = "httpx" },
|
|
196
|
+
]
|
|
197
|
+
|
|
198
|
+
[package.optional-dependencies]
|
|
199
|
+
test = [
|
|
200
|
+
{ name = "pytest" },
|
|
201
|
+
]
|
|
202
|
+
|
|
203
|
+
[package.metadata]
|
|
204
|
+
requires-dist = [
|
|
205
|
+
{ name = "httpx", specifier = ">=0.28,<1" },
|
|
206
|
+
{ name = "pytest", marker = "extra == 'test'", specifier = ">=8,<9" },
|
|
207
|
+
]
|
|
208
|
+
provides-extras = ["test"]
|
|
209
|
+
|
|
210
|
+
[[package]]
|
|
211
|
+
name = "tomli"
|
|
212
|
+
version = "2.4.1"
|
|
213
|
+
source = { registry = "https://pypi.org/simple" }
|
|
214
|
+
sdist = { url = "https://files.pythonhosted.org/packages/22/de/48c59722572767841493b26183a0d1cc411d54fd759c5607c4590b6563a6/tomli-2.4.1.tar.gz", hash = "sha256:7c7e1a961a0b2f2472c1ac5b69affa0ae1132c39adcb67aba98568702b9cc23f", size = 17543, upload-time = "2026-03-25T20:22:03.828Z" }
|
|
215
|
+
wheels = [
|
|
216
|
+
{ url = "https://files.pythonhosted.org/packages/f4/11/db3d5885d8528263d8adc260bb2d28ebf1270b96e98f0e0268d32b8d9900/tomli-2.4.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f8f0fc26ec2cc2b965b7a3b87cd19c5c6b8c5e5f436b984e85f486d652285c30", size = 154704, upload-time = "2026-03-25T20:21:10.473Z" },
|
|
217
|
+
{ url = "https://files.pythonhosted.org/packages/6d/f7/675db52c7e46064a9aa928885a9b20f4124ecb9bc2e1ce74c9106648d202/tomli-2.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4ab97e64ccda8756376892c53a72bd1f964e519c77236368527f758fbc36a53a", size = 149454, upload-time = "2026-03-25T20:21:12.036Z" },
|
|
218
|
+
{ url = "https://files.pythonhosted.org/packages/61/71/81c50943cf953efa35bce7646caab3cf457a7d8c030b27cfb40d7235f9ee/tomli-2.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:96481a5786729fd470164b47cdb3e0e58062a496f455ee41b4403be77cb5a076", size = 237561, upload-time = "2026-03-25T20:21:13.098Z" },
|
|
219
|
+
{ url = "https://files.pythonhosted.org/packages/48/c1/f41d9cb618acccca7df82aaf682f9b49013c9397212cb9f53219e3abac37/tomli-2.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5a881ab208c0baf688221f8cecc5401bd291d67e38a1ac884d6736cbcd8247e9", size = 243824, upload-time = "2026-03-25T20:21:14.569Z" },
|
|
220
|
+
{ url = "https://files.pythonhosted.org/packages/22/e4/5a816ecdd1f8ca51fb756ef684b90f2780afc52fc67f987e3c61d800a46d/tomli-2.4.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:47149d5bd38761ac8be13a84864bf0b7b70bc051806bc3669ab1cbc56216b23c", size = 242227, upload-time = "2026-03-25T20:21:15.712Z" },
|
|
221
|
+
{ url = "https://files.pythonhosted.org/packages/6b/49/2b2a0ef529aa6eec245d25f0c703e020a73955ad7edf73e7f54ddc608aa5/tomli-2.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ec9bfaf3ad2df51ace80688143a6a4ebc09a248f6ff781a9945e51937008fcbc", size = 247859, upload-time = "2026-03-25T20:21:17.001Z" },
|
|
222
|
+
{ url = "https://files.pythonhosted.org/packages/83/bd/6c1a630eaca337e1e78c5903104f831bda934c426f9231429396ce3c3467/tomli-2.4.1-cp311-cp311-win32.whl", hash = "sha256:ff2983983d34813c1aeb0fa89091e76c3a22889ee83ab27c5eeb45100560c049", size = 97204, upload-time = "2026-03-25T20:21:18.079Z" },
|
|
223
|
+
{ url = "https://files.pythonhosted.org/packages/42/59/71461df1a885647e10b6bb7802d0b8e66480c61f3f43079e0dcd315b3954/tomli-2.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:5ee18d9ebdb417e384b58fe414e8d6af9f4e7a0ae761519fb50f721de398dd4e", size = 108084, upload-time = "2026-03-25T20:21:18.978Z" },
|
|
224
|
+
{ url = "https://files.pythonhosted.org/packages/b8/83/dceca96142499c069475b790e7913b1044c1a4337e700751f48ed723f883/tomli-2.4.1-cp311-cp311-win_arm64.whl", hash = "sha256:c2541745709bad0264b7d4705ad453b76ccd191e64aa6f0fc66b69a293a45ece", size = 95285, upload-time = "2026-03-25T20:21:20.309Z" },
|
|
225
|
+
{ url = "https://files.pythonhosted.org/packages/c1/ba/42f134a3fe2b370f555f44b1d72feebb94debcab01676bf918d0cb70e9aa/tomli-2.4.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c742f741d58a28940ce01d58f0ab2ea3ced8b12402f162f4d534dfe18ba1cd6a", size = 155924, upload-time = "2026-03-25T20:21:21.626Z" },
|
|
226
|
+
{ url = "https://files.pythonhosted.org/packages/dc/c7/62d7a17c26487ade21c5422b646110f2162f1fcc95980ef7f63e73c68f14/tomli-2.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7f86fd587c4ed9dd76f318225e7d9b29cfc5a9d43de44e5754db8d1128487085", size = 150018, upload-time = "2026-03-25T20:21:23.002Z" },
|
|
227
|
+
{ url = "https://files.pythonhosted.org/packages/5c/05/79d13d7c15f13bdef410bdd49a6485b1c37d28968314eabee452c22a7fda/tomli-2.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ff18e6a727ee0ab0388507b89d1bc6a22b138d1e2fa56d1ad494586d61d2eae9", size = 244948, upload-time = "2026-03-25T20:21:24.04Z" },
|
|
228
|
+
{ url = "https://files.pythonhosted.org/packages/10/90/d62ce007a1c80d0b2c93e02cab211224756240884751b94ca72df8a875ca/tomli-2.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:136443dbd7e1dee43c68ac2694fde36b2849865fa258d39bf822c10e8068eac5", size = 253341, upload-time = "2026-03-25T20:21:25.177Z" },
|
|
229
|
+
{ url = "https://files.pythonhosted.org/packages/1a/7e/caf6496d60152ad4ed09282c1885cca4eea150bfd007da84aea07bcc0a3e/tomli-2.4.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5e262d41726bc187e69af7825504c933b6794dc3fbd5945e41a79bb14c31f585", size = 248159, upload-time = "2026-03-25T20:21:26.364Z" },
|
|
230
|
+
{ url = "https://files.pythonhosted.org/packages/99/e7/c6f69c3120de34bbd882c6fba7975f3d7a746e9218e56ab46a1bc4b42552/tomli-2.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5cb41aa38891e073ee49d55fbc7839cfdb2bc0e600add13874d048c94aadddd1", size = 253290, upload-time = "2026-03-25T20:21:27.46Z" },
|
|
231
|
+
{ url = "https://files.pythonhosted.org/packages/d6/2f/4a3c322f22c5c66c4b836ec58211641a4067364f5dcdd7b974b4c5da300c/tomli-2.4.1-cp312-cp312-win32.whl", hash = "sha256:da25dc3563bff5965356133435b757a795a17b17d01dbc0f42fb32447ddfd917", size = 98141, upload-time = "2026-03-25T20:21:28.492Z" },
|
|
232
|
+
{ url = "https://files.pythonhosted.org/packages/24/22/4daacd05391b92c55759d55eaee21e1dfaea86ce5c571f10083360adf534/tomli-2.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:52c8ef851d9a240f11a88c003eacb03c31fc1c9c4ec64a99a0f922b93874fda9", size = 108847, upload-time = "2026-03-25T20:21:29.386Z" },
|
|
233
|
+
{ url = "https://files.pythonhosted.org/packages/68/fd/70e768887666ddd9e9f5d85129e84910f2db2796f9096aa02b721a53098d/tomli-2.4.1-cp312-cp312-win_arm64.whl", hash = "sha256:f758f1b9299d059cc3f6546ae2af89670cb1c4d48ea29c3cacc4fe7de3058257", size = 95088, upload-time = "2026-03-25T20:21:30.677Z" },
|
|
234
|
+
{ url = "https://files.pythonhosted.org/packages/07/06/b823a7e818c756d9a7123ba2cda7d07bc2dd32835648d1a7b7b7a05d848d/tomli-2.4.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:36d2bd2ad5fb9eaddba5226aa02c8ec3fa4f192631e347b3ed28186d43be6b54", size = 155866, upload-time = "2026-03-25T20:21:31.65Z" },
|
|
235
|
+
{ url = "https://files.pythonhosted.org/packages/14/6f/12645cf7f08e1a20c7eb8c297c6f11d31c1b50f316a7e7e1e1de6e2e7b7e/tomli-2.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:eb0dc4e38e6a1fd579e5d50369aa2e10acfc9cace504579b2faabb478e76941a", size = 149887, upload-time = "2026-03-25T20:21:33.028Z" },
|
|
236
|
+
{ url = "https://files.pythonhosted.org/packages/5c/e0/90637574e5e7212c09099c67ad349b04ec4d6020324539297b634a0192b0/tomli-2.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c7f2c7f2b9ca6bdeef8f0fa897f8e05085923eb091721675170254cbc5b02897", size = 243704, upload-time = "2026-03-25T20:21:34.51Z" },
|
|
237
|
+
{ url = "https://files.pythonhosted.org/packages/10/8f/d3ddb16c5a4befdf31a23307f72828686ab2096f068eaf56631e136c1fdd/tomli-2.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f3c6818a1a86dd6dca7ddcaaf76947d5ba31aecc28cb1b67009a5877c9a64f3f", size = 251628, upload-time = "2026-03-25T20:21:36.012Z" },
|
|
238
|
+
{ url = "https://files.pythonhosted.org/packages/e3/f1/dbeeb9116715abee2485bf0a12d07a8f31af94d71608c171c45f64c0469d/tomli-2.4.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d312ef37c91508b0ab2cee7da26ec0b3ed2f03ce12bd87a588d771ae15dcf82d", size = 247180, upload-time = "2026-03-25T20:21:37.136Z" },
|
|
239
|
+
{ url = "https://files.pythonhosted.org/packages/d3/74/16336ffd19ed4da28a70959f92f506233bd7cfc2332b20bdb01591e8b1d1/tomli-2.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:51529d40e3ca50046d7606fa99ce3956a617f9b36380da3b7f0dd3dd28e68cb5", size = 251674, upload-time = "2026-03-25T20:21:38.298Z" },
|
|
240
|
+
{ url = "https://files.pythonhosted.org/packages/16/f9/229fa3434c590ddf6c0aa9af64d3af4b752540686cace29e6281e3458469/tomli-2.4.1-cp313-cp313-win32.whl", hash = "sha256:2190f2e9dd7508d2a90ded5ed369255980a1bcdd58e52f7fe24b8162bf9fedbd", size = 97976, upload-time = "2026-03-25T20:21:39.316Z" },
|
|
241
|
+
{ url = "https://files.pythonhosted.org/packages/6a/1e/71dfd96bcc1c775420cb8befe7a9d35f2e5b1309798f009dca17b7708c1e/tomli-2.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:8d65a2fbf9d2f8352685bc1364177ee3923d6baf5e7f43ea4959d7d8bc326a36", size = 108755, upload-time = "2026-03-25T20:21:40.248Z" },
|
|
242
|
+
{ url = "https://files.pythonhosted.org/packages/83/7a/d34f422a021d62420b78f5c538e5b102f62bea616d1d75a13f0a88acb04a/tomli-2.4.1-cp313-cp313-win_arm64.whl", hash = "sha256:4b605484e43cdc43f0954ddae319fb75f04cc10dd80d830540060ee7cd0243cd", size = 95265, upload-time = "2026-03-25T20:21:41.219Z" },
|
|
243
|
+
{ url = "https://files.pythonhosted.org/packages/3c/fb/9a5c8d27dbab540869f7c1f8eb0abb3244189ce780ba9cd73f3770662072/tomli-2.4.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:fd0409a3653af6c147209d267a0e4243f0ae46b011aa978b1080359fddc9b6cf", size = 155726, upload-time = "2026-03-25T20:21:42.23Z" },
|
|
244
|
+
{ url = "https://files.pythonhosted.org/packages/62/05/d2f816630cc771ad836af54f5001f47a6f611d2d39535364f148b6a92d6b/tomli-2.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:a120733b01c45e9a0c34aeef92bf0cf1d56cfe81ed9d47d562f9ed591a9828ac", size = 149859, upload-time = "2026-03-25T20:21:43.386Z" },
|
|
245
|
+
{ url = "https://files.pythonhosted.org/packages/ce/48/66341bdb858ad9bd0ceab5a86f90eddab127cf8b046418009f2125630ecb/tomli-2.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:559db847dc486944896521f68d8190be1c9e719fced785720d2216fe7022b662", size = 244713, upload-time = "2026-03-25T20:21:44.474Z" },
|
|
246
|
+
{ url = "https://files.pythonhosted.org/packages/df/6d/c5fad00d82b3c7a3ab6189bd4b10e60466f22cfe8a08a9394185c8a8111c/tomli-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:01f520d4f53ef97964a240a035ec2a869fe1a37dde002b57ebc4417a27ccd853", size = 252084, upload-time = "2026-03-25T20:21:45.62Z" },
|
|
247
|
+
{ url = "https://files.pythonhosted.org/packages/00/71/3a69e86f3eafe8c7a59d008d245888051005bd657760e96d5fbfb0b740c2/tomli-2.4.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7f94b27a62cfad8496c8d2513e1a222dd446f095fca8987fceef261225538a15", size = 247973, upload-time = "2026-03-25T20:21:46.937Z" },
|
|
248
|
+
{ url = "https://files.pythonhosted.org/packages/67/50/361e986652847fec4bd5e4a0208752fbe64689c603c7ae5ea7cb16b1c0ca/tomli-2.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:ede3e6487c5ef5d28634ba3f31f989030ad6af71edfb0055cbbd14189ff240ba", size = 256223, upload-time = "2026-03-25T20:21:48.467Z" },
|
|
249
|
+
{ url = "https://files.pythonhosted.org/packages/8c/9a/b4173689a9203472e5467217e0154b00e260621caa227b6fa01feab16998/tomli-2.4.1-cp314-cp314-win32.whl", hash = "sha256:3d48a93ee1c9b79c04bb38772ee1b64dcf18ff43085896ea460ca8dec96f35f6", size = 98973, upload-time = "2026-03-25T20:21:49.526Z" },
|
|
250
|
+
{ url = "https://files.pythonhosted.org/packages/14/58/640ac93bf230cd27d002462c9af0d837779f8773bc03dee06b5835208214/tomli-2.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:88dceee75c2c63af144e456745e10101eb67361050196b0b6af5d717254dddf7", size = 109082, upload-time = "2026-03-25T20:21:50.506Z" },
|
|
251
|
+
{ url = "https://files.pythonhosted.org/packages/d5/2f/702d5e05b227401c1068f0d386d79a589bb12bf64c3d2c72ce0631e3bc49/tomli-2.4.1-cp314-cp314-win_arm64.whl", hash = "sha256:b8c198f8c1805dc42708689ed6864951fd2494f924149d3e4bce7710f8eb5232", size = 96490, upload-time = "2026-03-25T20:21:51.474Z" },
|
|
252
|
+
{ url = "https://files.pythonhosted.org/packages/45/4b/b877b05c8ba62927d9865dd980e34a755de541eb65fffba52b4cc495d4d2/tomli-2.4.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:d4d8fe59808a54658fcc0160ecfb1b30f9089906c50b23bcb4c69eddc19ec2b4", size = 164263, upload-time = "2026-03-25T20:21:52.543Z" },
|
|
253
|
+
{ url = "https://files.pythonhosted.org/packages/24/79/6ab420d37a270b89f7195dec5448f79400d9e9c1826df982f3f8e97b24fd/tomli-2.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7008df2e7655c495dd12d2a4ad038ff878d4ca4b81fccaf82b714e07eae4402c", size = 160736, upload-time = "2026-03-25T20:21:53.674Z" },
|
|
254
|
+
{ url = "https://files.pythonhosted.org/packages/02/e0/3630057d8eb170310785723ed5adcdfb7d50cb7e6455f85ba8a3deed642b/tomli-2.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1d8591993e228b0c930c4bb0db464bdad97b3289fb981255d6c9a41aedc84b2d", size = 270717, upload-time = "2026-03-25T20:21:55.129Z" },
|
|
255
|
+
{ url = "https://files.pythonhosted.org/packages/7a/b4/1613716072e544d1a7891f548d8f9ec6ce2faf42ca65acae01d76ea06bb0/tomli-2.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:734e20b57ba95624ecf1841e72b53f6e186355e216e5412de414e3c51e5e3c41", size = 278461, upload-time = "2026-03-25T20:21:56.228Z" },
|
|
256
|
+
{ url = "https://files.pythonhosted.org/packages/05/38/30f541baf6a3f6df77b3df16b01ba319221389e2da59427e221ef417ac0c/tomli-2.4.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:8a650c2dbafa08d42e51ba0b62740dae4ecb9338eefa093aa5c78ceb546fcd5c", size = 274855, upload-time = "2026-03-25T20:21:57.653Z" },
|
|
257
|
+
{ url = "https://files.pythonhosted.org/packages/77/a3/ec9dd4fd2c38e98de34223b995a3b34813e6bdadf86c75314c928350ed14/tomli-2.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:504aa796fe0569bb43171066009ead363de03675276d2d121ac1a4572397870f", size = 283144, upload-time = "2026-03-25T20:21:59.089Z" },
|
|
258
|
+
{ url = "https://files.pythonhosted.org/packages/ef/be/605a6261cac79fba2ec0c9827e986e00323a1945700969b8ee0b30d85453/tomli-2.4.1-cp314-cp314t-win32.whl", hash = "sha256:b1d22e6e9387bf4739fbe23bfa80e93f6b0373a7f1b96c6227c32bef95a4d7a8", size = 108683, upload-time = "2026-03-25T20:22:00.214Z" },
|
|
259
|
+
{ url = "https://files.pythonhosted.org/packages/12/64/da524626d3b9cc40c168a13da8335fe1c51be12c0a63685cc6db7308daae/tomli-2.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:2c1c351919aca02858f740c6d33adea0c5deea37f9ecca1cc1ef9e884a619d26", size = 121196, upload-time = "2026-03-25T20:22:01.169Z" },
|
|
260
|
+
{ url = "https://files.pythonhosted.org/packages/5a/cd/e80b62269fc78fc36c9af5a6b89c835baa8af28ff5ad28c7028d60860320/tomli-2.4.1-cp314-cp314t-win_arm64.whl", hash = "sha256:eab21f45c7f66c13f2a9e0e1535309cee140182a9cdae1e041d02e47291e8396", size = 100393, upload-time = "2026-03-25T20:22:02.137Z" },
|
|
261
|
+
{ url = "https://files.pythonhosted.org/packages/7b/61/cceae43728b7de99d9b847560c262873a1f6c98202171fd5ed62640b494b/tomli-2.4.1-py3-none-any.whl", hash = "sha256:0d85819802132122da43cb86656f8d1f8c6587d54ae7dcaf30e90533028b49fe", size = 14583, upload-time = "2026-03-25T20:22:03.012Z" },
|
|
262
|
+
]
|
|
263
|
+
|
|
264
|
+
[[package]]
|
|
265
|
+
name = "typing-extensions"
|
|
266
|
+
version = "4.16.0"
|
|
267
|
+
source = { registry = "https://pypi.org/simple" }
|
|
268
|
+
sdist = { url = "https://files.pythonhosted.org/packages/f6/cc/6253133b5bb138fc3306cebfbda2c520f545d36b5be2c7255cc528bb45d6/typing_extensions-4.16.0.tar.gz", hash = "sha256:dc983d19a509c94dba722ee6abd33940f7c05a89e243c47e907eb4db6f1a43e5", size = 113555, upload-time = "2026-07-02T08:40:05.92Z" }
|
|
269
|
+
wheels = [
|
|
270
|
+
{ url = "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", hash = "sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", size = 45571, upload-time = "2026-07-02T08:40:04.659Z" },
|
|
271
|
+
]
|