libentry 1.25__py3-none-any.whl → 1.25.1__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.
libentry/mcp/client.py CHANGED
@@ -9,7 +9,7 @@ from threading import Semaphore, Thread
9
9
  from time import sleep
10
10
  from types import GeneratorType
11
11
  from typing import Any, Dict, Iterable, List, Optional, Tuple, Type, Union
12
- from urllib.parse import urlencode, urljoin
12
+ from urllib.parse import urlencode
13
13
 
14
14
  import httpx
15
15
  from pydantic import BaseModel, TypeAdapter
@@ -371,7 +371,7 @@ class APIClient(SubroutineMixIn, MCPMixIn):
371
371
  raise err
372
372
 
373
373
  def _http_request(self, request: HTTPRequest, timeout: float) -> HTTPResponse:
374
- full_url = urljoin(self.base_url, request.path)
374
+ full_url = self.base_url.rstrip("/") + "/" + request.path.lstrip("/")
375
375
  headers = (
376
376
  {**self.headers}
377
377
  if request.options.headers is None else
libentry/mcp/service.py CHANGED
@@ -10,7 +10,7 @@ from dataclasses import dataclass
10
10
  from queue import Empty, Queue
11
11
  from threading import Lock
12
12
  from types import GeneratorType
13
- from typing import Any, Callable, Dict, Generator, Iterable, List, Literal, Optional, Type, Union
13
+ from typing import Any, Callable, Dict, Generator, Iterable, List, Literal, Optional, Tuple, Type, Union
14
14
 
15
15
  from flask import Flask, request as flask_request
16
16
  from pydantic import BaseModel, Field, TypeAdapter
@@ -805,9 +805,11 @@ class FlaskServer(Flask):
805
805
  logger.info("Initializing Flask application.")
806
806
  existing_routes = {}
807
807
 
808
- routes = self._create_routes(self.service)
809
- self.service_routes.update(routes)
810
- existing_routes.update(self.service_routes)
808
+ input_services = self.service if isinstance(self.service, (List, Tuple)) else [self.service]
809
+ for input_service in input_services:
810
+ routes = self._create_routes(input_service)
811
+ self.service_routes.update(routes)
812
+ existing_routes.update(self.service_routes)
811
813
 
812
814
  for builtin_service in self.builtin_services:
813
815
  routes = self._create_routes(builtin_service, existing_routes)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: libentry
3
- Version: 1.25
3
+ Version: 1.25.1
4
4
  Summary: Entries for experimental utilities.
5
5
  Home-page: https://github.com/XoriieInpottn/libentry
6
6
  Author: xi
@@ -12,8 +12,8 @@ libentry/test_api.py,sha256=Xw7B7sH6g1iCTV5sFzyBF3JAJzeOr9xg0AyezTNsnIk,4452
12
12
  libentry/utils.py,sha256=O7P6GadtUIjq0N2IZH7PhHZDUM3NebzcqyDqytet7CM,683
13
13
  libentry/mcp/__init__.py,sha256=1oLL20yLB1GL9IbFiZD8OReDqiCpFr-yetIR6x1cNkI,23
14
14
  libentry/mcp/api.py,sha256=GDErVCz_hh_ZeMxLS8bTPyBUhCTHw3Mm-nGFMV2W2yo,3669
15
- libentry/mcp/client.py,sha256=3HmKAsFenPlDk1lfSdXL9GJwfCSU92uQS04zvZGeJfQ,23065
16
- libentry/mcp/service.py,sha256=VTLA9dS85NJ64OCf1zBKLWvvE9l76I-U8WV5crCmBlM,37943
15
+ libentry/mcp/client.py,sha256=qFbigNIOJvEf8ZICN2K8nnmVcITIzDhJgaw3c0P-WXM,23078
16
+ libentry/mcp/service.py,sha256=PpdQBxqKPiZ2tpnsqDYiC29_yjMjK9J3VWynn4uvpVg,38109
17
17
  libentry/mcp/types.py,sha256=aAoVO4jjqEvDzNneuZapmRYonLLnGsbcLoypVyRNNYg,12389
18
18
  libentry/service/__init__.py,sha256=1oLL20yLB1GL9IbFiZD8OReDqiCpFr-yetIR6x1cNkI,23
19
19
  libentry/service/common.py,sha256=OVaW2afgKA6YqstJmtnprBCqQEUZEWotZ6tHavmJJeU,42
@@ -22,10 +22,10 @@ libentry/service/list.py,sha256=ElHWhTgShGOhaxMUEwVbMXos0NQKjHsODboiQ-3AMwE,1397
22
22
  libentry/service/running.py,sha256=FrPJoJX6wYxcHIysoatAxhW3LajCCm0Gx6l7__6sULQ,5105
23
23
  libentry/service/start.py,sha256=mZT7b9rVULvzy9GTZwxWnciCHgv9dbGN2JbxM60OMn4,1270
24
24
  libentry/service/stop.py,sha256=wOpwZgrEJ7QirntfvibGq-XsTC6b3ELhzRW2zezh-0s,1187
25
- libentry-1.25.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
26
- libentry-1.25.dist-info/METADATA,sha256=mlgd255AfSGCHpiUuPqHMVipyfRm-Xal71qb5dQAJlg,1133
27
- libentry-1.25.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
28
- libentry-1.25.dist-info/entry_points.txt,sha256=1v_nLVDsjvVJp9SWhl4ef2zZrsLTBtFWgrYFgqvQBgc,61
29
- libentry-1.25.dist-info/top_level.txt,sha256=u2uF6-X5fn2Erf9PYXOg_6tntPqTpyT-yzUZrltEd6I,9
30
- libentry-1.25.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
31
- libentry-1.25.dist-info/RECORD,,
25
+ libentry-1.25.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
26
+ libentry-1.25.1.dist-info/METADATA,sha256=7HVCqasAkkqvvXhodRtTmaoZTG4FC70Q6CxsgZWnC8U,1135
27
+ libentry-1.25.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
28
+ libentry-1.25.1.dist-info/entry_points.txt,sha256=1v_nLVDsjvVJp9SWhl4ef2zZrsLTBtFWgrYFgqvQBgc,61
29
+ libentry-1.25.1.dist-info/top_level.txt,sha256=u2uF6-X5fn2Erf9PYXOg_6tntPqTpyT-yzUZrltEd6I,9
30
+ libentry-1.25.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
31
+ libentry-1.25.1.dist-info/RECORD,,