beamlit 0.0.34rc73__py3-none-any.whl → 0.0.34rc75__py3-none-any.whl
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.
- beamlit/agents/__init__.py +2 -1
- beamlit/agents/thread.py +14 -0
- beamlit/models/agent_render.py +45 -0
- beamlit/models/core_status.py +3 -20
- beamlit/models/function_render.py +45 -0
- beamlit/models/model_render.py +45 -0
- {beamlit-0.0.34rc73.dist-info → beamlit-0.0.34rc75.dist-info}/METADATA +2 -1
- {beamlit-0.0.34rc73.dist-info → beamlit-0.0.34rc75.dist-info}/RECORD +9 -5
- {beamlit-0.0.34rc73.dist-info → beamlit-0.0.34rc75.dist-info}/WHEEL +0 -0
beamlit/agents/__init__.py
CHANGED
beamlit/agents/thread.py
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
|
2
|
+
import jwt
|
3
|
+
from fastapi import Request
|
4
|
+
|
5
|
+
|
6
|
+
def get_default_thread(request: Request) -> str:
|
7
|
+
if request.headers.get("X-Beamlit-Sub"):
|
8
|
+
return request.headers.get("X-Beamlit-Sub")
|
9
|
+
authorization = request.headers.get("Authorization", request.headers.get("X-Beamlit-Authorization"))
|
10
|
+
if authorization and len(authorization.split("Bearer ")) > 1:
|
11
|
+
token = authorization.split(" ")[1]
|
12
|
+
decoded = jwt.decode(token, options={"verify_signature": False})
|
13
|
+
return decoded["sub"]
|
14
|
+
return ""
|
@@ -0,0 +1,45 @@
|
|
1
|
+
from typing import Any, TypeVar
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
T = TypeVar("T", bound="AgentRender")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class AgentRender:
|
11
|
+
"""AgentRender"""
|
12
|
+
|
13
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
14
|
+
|
15
|
+
def to_dict(self) -> dict[str, Any]:
|
16
|
+
field_dict: dict[str, Any] = {}
|
17
|
+
field_dict.update(self.additional_properties)
|
18
|
+
|
19
|
+
return field_dict
|
20
|
+
|
21
|
+
@classmethod
|
22
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
23
|
+
if not src_dict:
|
24
|
+
return None
|
25
|
+
d = src_dict.copy()
|
26
|
+
agent_render = cls()
|
27
|
+
|
28
|
+
agent_render.additional_properties = d
|
29
|
+
return agent_render
|
30
|
+
|
31
|
+
@property
|
32
|
+
def additional_keys(self) -> list[str]:
|
33
|
+
return list(self.additional_properties.keys())
|
34
|
+
|
35
|
+
def __getitem__(self, key: str) -> Any:
|
36
|
+
return self.additional_properties[key]
|
37
|
+
|
38
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
39
|
+
self.additional_properties[key] = value
|
40
|
+
|
41
|
+
def __delitem__(self, key: str) -> None:
|
42
|
+
del self.additional_properties[key]
|
43
|
+
|
44
|
+
def __contains__(self, key: str) -> bool:
|
45
|
+
return key in self.additional_properties
|
beamlit/models/core_status.py
CHANGED
@@ -1,33 +1,20 @@
|
|
1
|
-
from typing import Any, TypeVar
|
1
|
+
from typing import Any, TypeVar
|
2
2
|
|
3
3
|
from attrs import define as _attrs_define
|
4
4
|
from attrs import field as _attrs_field
|
5
5
|
|
6
|
-
from ..types import UNSET, Unset
|
7
|
-
|
8
6
|
T = TypeVar("T", bound="CoreStatus")
|
9
7
|
|
10
8
|
|
11
9
|
@_attrs_define
|
12
10
|
class CoreStatus:
|
13
|
-
"""Core status
|
14
|
-
|
15
|
-
Attributes:
|
16
|
-
deployment_status (Union[Unset, str]): The status of the core, can be CREATED, UPDATED, DELETED, DEPLOYED,
|
17
|
-
DISABLED, or FAILED
|
18
|
-
"""
|
11
|
+
"""Core status"""
|
19
12
|
|
20
|
-
deployment_status: Union[Unset, str] = UNSET
|
21
13
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
22
14
|
|
23
15
|
def to_dict(self) -> dict[str, Any]:
|
24
|
-
deployment_status = self.deployment_status
|
25
|
-
|
26
16
|
field_dict: dict[str, Any] = {}
|
27
17
|
field_dict.update(self.additional_properties)
|
28
|
-
field_dict.update({})
|
29
|
-
if deployment_status is not UNSET:
|
30
|
-
field_dict["deploymentStatus"] = deployment_status
|
31
18
|
|
32
19
|
return field_dict
|
33
20
|
|
@@ -36,11 +23,7 @@ class CoreStatus:
|
|
36
23
|
if not src_dict:
|
37
24
|
return None
|
38
25
|
d = src_dict.copy()
|
39
|
-
|
40
|
-
|
41
|
-
core_status = cls(
|
42
|
-
deployment_status=deployment_status,
|
43
|
-
)
|
26
|
+
core_status = cls()
|
44
27
|
|
45
28
|
core_status.additional_properties = d
|
46
29
|
return core_status
|
@@ -0,0 +1,45 @@
|
|
1
|
+
from typing import Any, TypeVar
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
T = TypeVar("T", bound="FunctionRender")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class FunctionRender:
|
11
|
+
"""FunctionRender"""
|
12
|
+
|
13
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
14
|
+
|
15
|
+
def to_dict(self) -> dict[str, Any]:
|
16
|
+
field_dict: dict[str, Any] = {}
|
17
|
+
field_dict.update(self.additional_properties)
|
18
|
+
|
19
|
+
return field_dict
|
20
|
+
|
21
|
+
@classmethod
|
22
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
23
|
+
if not src_dict:
|
24
|
+
return None
|
25
|
+
d = src_dict.copy()
|
26
|
+
function_render = cls()
|
27
|
+
|
28
|
+
function_render.additional_properties = d
|
29
|
+
return function_render
|
30
|
+
|
31
|
+
@property
|
32
|
+
def additional_keys(self) -> list[str]:
|
33
|
+
return list(self.additional_properties.keys())
|
34
|
+
|
35
|
+
def __getitem__(self, key: str) -> Any:
|
36
|
+
return self.additional_properties[key]
|
37
|
+
|
38
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
39
|
+
self.additional_properties[key] = value
|
40
|
+
|
41
|
+
def __delitem__(self, key: str) -> None:
|
42
|
+
del self.additional_properties[key]
|
43
|
+
|
44
|
+
def __contains__(self, key: str) -> bool:
|
45
|
+
return key in self.additional_properties
|
@@ -0,0 +1,45 @@
|
|
1
|
+
from typing import Any, TypeVar
|
2
|
+
|
3
|
+
from attrs import define as _attrs_define
|
4
|
+
from attrs import field as _attrs_field
|
5
|
+
|
6
|
+
T = TypeVar("T", bound="ModelRender")
|
7
|
+
|
8
|
+
|
9
|
+
@_attrs_define
|
10
|
+
class ModelRender:
|
11
|
+
"""ModelRender"""
|
12
|
+
|
13
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
14
|
+
|
15
|
+
def to_dict(self) -> dict[str, Any]:
|
16
|
+
field_dict: dict[str, Any] = {}
|
17
|
+
field_dict.update(self.additional_properties)
|
18
|
+
|
19
|
+
return field_dict
|
20
|
+
|
21
|
+
@classmethod
|
22
|
+
def from_dict(cls: type[T], src_dict: dict[str, Any]) -> T:
|
23
|
+
if not src_dict:
|
24
|
+
return None
|
25
|
+
d = src_dict.copy()
|
26
|
+
model_render = cls()
|
27
|
+
|
28
|
+
model_render.additional_properties = d
|
29
|
+
return model_render
|
30
|
+
|
31
|
+
@property
|
32
|
+
def additional_keys(self) -> list[str]:
|
33
|
+
return list(self.additional_properties.keys())
|
34
|
+
|
35
|
+
def __getitem__(self, key: str) -> Any:
|
36
|
+
return self.additional_properties[key]
|
37
|
+
|
38
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
39
|
+
self.additional_properties[key] = value
|
40
|
+
|
41
|
+
def __delitem__(self, key: str) -> None:
|
42
|
+
del self.additional_properties[key]
|
43
|
+
|
44
|
+
def __contains__(self, key: str) -> bool:
|
45
|
+
return key in self.additional_properties
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: beamlit
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.34rc75
|
4
4
|
Summary: Add your description here
|
5
5
|
Author-email: cploujoux <ch.ploujoux@gmail.com>
|
6
6
|
Requires-Python: >=3.12
|
@@ -21,6 +21,7 @@ Requires-Dist: opentelemetry-instrumentation-system-metrics>=0.50b0
|
|
21
21
|
Requires-Dist: opentelemetry-sdk>=1.28.2
|
22
22
|
Requires-Dist: pydantic-settings<2.7.0,>=2.6.1
|
23
23
|
Requires-Dist: pydantic<2.11.0,>=2.10.3
|
24
|
+
Requires-Dist: pyjwt>=2.10.1
|
24
25
|
Requires-Dist: python-dateutil>=2.8.0
|
25
26
|
Requires-Dist: pyyaml<6.1.0,>=6.0.2
|
26
27
|
Requires-Dist: requests<2.33.0,>=2.32.3
|
@@ -4,10 +4,11 @@ beamlit/errors.py,sha256=gO8GBmKqmSNgAg-E5oT-oOyxztvp7V_6XG7OUTT15q0,546
|
|
4
4
|
beamlit/py.typed,sha256=8ZJUsxZiuOy1oJeVhsTWQhTG_6pTVHVXk5hJL79ebTk,25
|
5
5
|
beamlit/run.py,sha256=HtDYDjD7oVfQ8r3T5_t4qN5UDJOJfsQILi45Z21ArAg,1446
|
6
6
|
beamlit/types.py,sha256=E1hhDh_zXfsSQ0NCt9-uw90_Mr5iIlsdfnfvxv5HarU,1005
|
7
|
-
beamlit/agents/__init__.py,sha256=
|
7
|
+
beamlit/agents/__init__.py,sha256=4aXI1Sp8NuKJ8yVw9qUFRmFhSrWdT5b0bniqRKzZ42U,162
|
8
8
|
beamlit/agents/chain.py,sha256=vfCjiFHuu02uTTGicxMlFzjyICQkIjpXrBGs-7uJEsg,2826
|
9
9
|
beamlit/agents/chat.py,sha256=6PE2f_tf6l4_-9mZ---ZHvxN52pmLkHkgh1ebPoG1BY,4052
|
10
10
|
beamlit/agents/decorator.py,sha256=_N5uYircuULo2EZ1B0vaD1Rsc64534DtojmUVAJGUAw,5921
|
11
|
+
beamlit/agents/thread.py,sha256=LN5Ss-uOf5_hdB0WV1dqpn-N-pDJB3C2hUvlCzdqtdk,519
|
11
12
|
beamlit/api/__init__.py,sha256=zTSiG_ujSjAqWPyc435YXaX9XTlpMjiJWBbV-f-YtdA,45
|
12
13
|
beamlit/api/agents/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
14
|
beamlit/api/agents/create_agent.py,sha256=t5Pr62My2EhQlcIY71MrI73-0_q5Djr3a_Ybt9MIiQQ,3587
|
@@ -160,6 +161,7 @@ beamlit/models/agent_history.py,sha256=76ZHoaz7oq3-2ikNQj25NmzyXOzx5JIPxOlfUyljR
|
|
160
161
|
beamlit/models/agent_history_event.py,sha256=Ed_xaedwLEPNuM807Ldj5xqUBj4Eua9NqpCzpTRi0Og,3820
|
161
162
|
beamlit/models/agent_metadata.py,sha256=61A7i-2lfQrozV3Be2nRfGO-K1vch7FYDdWzt_Cr3oo,4606
|
162
163
|
beamlit/models/agent_release.py,sha256=AXtHX_Ze7cMh2tKnRw2usRWnLf2B9u_iFPTF6WYdJLM,1928
|
164
|
+
beamlit/models/agent_render.py,sha256=gAlf83vJ3AOGVwvFgs_EThe2cQVa8Lo5JXUiV_y9XUg,1221
|
163
165
|
beamlit/models/agent_spec.py,sha256=SEWT_ZuHURLEnd04jVF6usfvyDp-cE0dI7NWI1LjBVU,11155
|
164
166
|
beamlit/models/api_key.py,sha256=oKuqDF0xe2Z2-6yJqulbzlXEQyM3W7lvQn6FXCktaaU,4278
|
165
167
|
beamlit/models/configuration.py,sha256=KujTXl7iihrPcL0jX0hgxN0xAAwMgJsTaFKcMBpCVLs,2761
|
@@ -167,7 +169,7 @@ beamlit/models/continent.py,sha256=_gQJci2_MUmCiGGG4iCMnUDTww9OqcTsNVqwPVigy3U,1
|
|
167
169
|
beamlit/models/core_event.py,sha256=L9GQh2rRPM1RC042IUJHEazha1gHqdNb9XN44zjawSs,2321
|
168
170
|
beamlit/models/core_spec.py,sha256=ZG69MJqqa6Mas-lfIFvOZEfFwZ6G2Ny9M3ai8CyRMa4,8060
|
169
171
|
beamlit/models/core_spec_configurations.py,sha256=Yx_uUwWxlfBmV3SgDoqX3ERgrpbFNzvKn5CtqxtAv9A,2223
|
170
|
-
beamlit/models/core_status.py,sha256=
|
172
|
+
beamlit/models/core_status.py,sha256=nCxzTiQxaRzA084NrU1srY2Du-nio59sXxxXCHjzBak,1216
|
171
173
|
beamlit/models/country.py,sha256=IYUZ6ErVduc3vmB01UEN8nIi6h5htupqFvyhRqEmKW4,1870
|
172
174
|
beamlit/models/create_api_key_for_service_account_body.py,sha256=_D6aHXfZP8ksJeFlP-vEd5kEUuQAvofkaq5_N8ej_XM,2005
|
173
175
|
beamlit/models/create_workspace_service_account_body.py,sha256=UHKYL3MSfVGMj4CNw0CzCsjnxdOxdnw6D8ujPrc76Xw,1958
|
@@ -182,6 +184,7 @@ beamlit/models/function.py,sha256=LF-7y1F3My0hzmOhjzJY2FsMUoANDmBlQ5ZU8YxF55U,40
|
|
182
184
|
beamlit/models/function_kit.py,sha256=VrwV4EOrEqs8QgyaI7MyevRCCt2fhsTkOzfQVWXojt0,3101
|
183
185
|
beamlit/models/function_metadata.py,sha256=cfx10NiqQY4VlQUyl8fH2-kiWpVmOmi8rZhepan2SrQ,4624
|
184
186
|
beamlit/models/function_release.py,sha256=T8SuLZBBdgGDvUg3sVluocvrKTvNxzZ6Wq3kjK4lYk4,1955
|
187
|
+
beamlit/models/function_render.py,sha256=MD2oNhEE15I6BtqLX8O9sD1jbm0vSyVKWHr_CPFjd0s,1239
|
185
188
|
beamlit/models/function_spec.py,sha256=soyg4T_OU015e6d2CnAG3BrR6nZ-wjtDRdSBLryJ2qk,10568
|
186
189
|
beamlit/models/get_trace_ids_response_200.py,sha256=m2uE11a9wE5c7xPTDVd4CuubQc2cPYJNaYpbcj-V1rU,1275
|
187
190
|
beamlit/models/get_trace_logs_response_200.py,sha256=NIFtg8qcE26_oJxoRYkt1KSV2JSYUxdUu45Gxs0Qli0,1280
|
@@ -213,6 +216,7 @@ beamlit/models/model_metadata.py,sha256=W6uJGI_Uu0UPt_dOm2xzXqUS6NxNtsRWyhw7IVOM
|
|
213
216
|
beamlit/models/model_private_cluster.py,sha256=EojXwmxgDLogsUlTDRw9PvhiQVk_b5nQUSBbWQosQpg,2281
|
214
217
|
beamlit/models/model_provider.py,sha256=iqvS1c9GE2u58QttSlATqTIOf-EuN9CtljWqTwHdTpU,5562
|
215
218
|
beamlit/models/model_release.py,sha256=ql8EDbKc9--kre7zp3o5_XoJjpAoXrsgJdYbjYST4vs,1928
|
219
|
+
beamlit/models/model_render.py,sha256=nTs072FL4wOOTwyEYFUkW2xBHPKPqxFShF6GBrZtnko,1221
|
216
220
|
beamlit/models/model_spec.py,sha256=ROGUUXo_Yir3aqca5H0S62GLeL_sfRaQ2pRRYrkySh4,8418
|
217
221
|
beamlit/models/owner_fields.py,sha256=8LsT7inzzFI1hZQma798gYoOfJpdmwK9T8y_0JrKGSU,2022
|
218
222
|
beamlit/models/pending_invitation.py,sha256=YJaUNHXoq-X1ZTBkOpmRQj31R99S6Y7Ik45dHDss6-M,3797
|
@@ -280,6 +284,6 @@ beamlit/serve/app.py,sha256=_aG2UVQ3Y85rUW3ehu9TlzLnowkfh54IIz558ftqOMw,3638
|
|
280
284
|
beamlit/serve/middlewares/__init__.py,sha256=1dVmnOmhAQWvWktqHkKSIX-YoF6fmMU8xkUQuhg_rJU,148
|
281
285
|
beamlit/serve/middlewares/accesslog.py,sha256=Mu4T4_9OvHybjA0ApzZFpgi2C8f3X1NbUk-76v634XM,631
|
282
286
|
beamlit/serve/middlewares/processtime.py,sha256=lDAaIasZ4bwvN-HKHvZpaD9r-yrkVNZYx4abvbjbrCg,411
|
283
|
-
beamlit-0.0.
|
284
|
-
beamlit-0.0.
|
285
|
-
beamlit-0.0.
|
287
|
+
beamlit-0.0.34rc75.dist-info/METADATA,sha256=4i1Oh10zy9z1KQHO2ShsMjv7XherVXJaKqIRgNJDp8w,2441
|
288
|
+
beamlit-0.0.34rc75.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
289
|
+
beamlit-0.0.34rc75.dist-info/RECORD,,
|
File without changes
|