beamlit 0.0.56rc106__py3-none-any.whl → 0.0.56rc107__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.
@@ -17,7 +17,10 @@ from mcp import ClientSession
17
17
  from mcp.client.sse import sse_client
18
18
  from mcp.types import CallToolResult, ListToolsResult
19
19
 
20
+
21
+
20
22
  from beamlit.authentication.authentication import AuthenticatedClient
23
+ from beamlit.authentication import get_authentication_headers
21
24
  from beamlit.common.settings import get_settings
22
25
 
23
26
  from .utils import create_schema_model
@@ -36,7 +39,7 @@ class MCPClient:
36
39
  async def list_sse_tools(self) -> ListToolsResult:
37
40
  # Create a new context for each SSE connection
38
41
  try:
39
- async with sse_client(f"{self.url}/sse") as (read_stream, write_stream):
42
+ async with sse_client(f"{self.url}/sse", headers=get_authentication_headers(settings)) as (read_stream, write_stream):
40
43
  async with ClientSession(read_stream, write_stream) as session:
41
44
  await session.initialize()
42
45
  response = await session.list_tools()
@@ -66,7 +69,7 @@ class MCPClient:
66
69
  arguments: dict[str, Any] = None,
67
70
  ) -> requests.Response | AsyncIterator[CallToolResult]:
68
71
  if self._sse:
69
- async with sse_client(f"{self.url}/sse") as (read_stream, write_stream):
72
+ async with sse_client(f"{self.url}/sse", headers=get_authentication_headers(settings)) as (read_stream, write_stream):
70
73
  async with ClientSession(read_stream, write_stream) as session:
71
74
  await session.initialize()
72
75
  response = await session.call_tool(tool_name, arguments or {})
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: beamlit
3
- Version: 0.0.56rc106
3
+ Version: 0.0.56rc107
4
4
  Summary: Add your description here
5
5
  Author-email: cploujoux <ch.ploujoux@gmail.com>
6
6
  License-File: LICENSE
@@ -149,7 +149,7 @@ beamlit/functions/__init__.py,sha256=Mnoqpa1dm7TXwjodBbF_40JyD78aXsOYWmqjDSnA1lU
149
149
  beamlit/functions/common.py,sha256=4SK1N0VoQiydUT4frGT9OWMRxgHgMHUcsBhicMkcMmc,9996
150
150
  beamlit/functions/decorator.py,sha256=iQbLwUo0K83DFJ3ub8O5jKtkbSINnku6GZcKJ9h7-5E,2292
151
151
  beamlit/functions/local/local.py,sha256=KjkHWBxGlG9fliXnOOwZQEop1g2o10IaLiPo4Zu_XAk,1929
152
- beamlit/functions/mcp/mcp.py,sha256=6pHWTPbglw1-SlqIztAigN284OyYR7ovn29u0IuF73E,5611
152
+ beamlit/functions/mcp/mcp.py,sha256=7qftM5-EyY8DriXgVV1H-7KHoO7_Dn23QzQpMolRFk8,5767
153
153
  beamlit/functions/mcp/utils.py,sha256=V7bah6cymdtjJ_LJUrNcHDeApDHA6uXvaGVeFJGKj2U,1850
154
154
  beamlit/functions/remote/remote.py,sha256=BQkRHOITBndco3ewH2g0_PXMef5OCx2g21GEQlS1_L4,6743
155
155
  beamlit/models/__init__.py,sha256=Pb6m_N_UwQ7N-EgdlhaciTHuXyD-8OCwbLicC9Lee1w,10084
@@ -282,8 +282,8 @@ beamlit/serve/app.py,sha256=lM59fdUtfkfAYNPWSCU9pkXIPBnhgVGvvgfoMkSVtks,4531
282
282
  beamlit/serve/middlewares/__init__.py,sha256=O7fyfE1DIYmajFY9WWdzxCgeAQWZzJfeUjzHGbpWaAk,309
283
283
  beamlit/serve/middlewares/accesslog.py,sha256=lcu33j4epFSHRBaeTpyt8deNb3kaM3K91-andw4fp80,1112
284
284
  beamlit/serve/middlewares/processtime.py,sha256=3x5w1yQexB0xFNKK6fgLbINxT-eLLunfZ6UDV0bIIF4,944
285
- beamlit-0.0.56rc106.dist-info/METADATA,sha256=BAqHlVOBGJ3jN0GS1y9vTHHvRBZDP0ccIU0j9VPzS5o,3515
286
- beamlit-0.0.56rc106.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
287
- beamlit-0.0.56rc106.dist-info/entry_points.txt,sha256=zxhgdn7SP-Otk4rEv7LMPAAa9w4TUCLbu9TJi9-K3xg,115
288
- beamlit-0.0.56rc106.dist-info/licenses/LICENSE,sha256=p5PNQvpvyDT_0aYBDgmV1fFI_vAD2aSV0wWG7VTgRis,1069
289
- beamlit-0.0.56rc106.dist-info/RECORD,,
285
+ beamlit-0.0.56rc107.dist-info/METADATA,sha256=KgH3gUuxMqxqWvDfWar59ZjNAsqE1RrCRivH1PMftvs,3515
286
+ beamlit-0.0.56rc107.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
287
+ beamlit-0.0.56rc107.dist-info/entry_points.txt,sha256=zxhgdn7SP-Otk4rEv7LMPAAa9w4TUCLbu9TJi9-K3xg,115
288
+ beamlit-0.0.56rc107.dist-info/licenses/LICENSE,sha256=p5PNQvpvyDT_0aYBDgmV1fFI_vAD2aSV0wWG7VTgRis,1069
289
+ beamlit-0.0.56rc107.dist-info/RECORD,,