sapiopycommons 2025.9.3a721__py3-none-any.whl → 2025.9.5a726__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.

Potentially problematic release.


This version of sapiopycommons might be problematic. Click here for more details.

@@ -14,13 +14,13 @@ class SapioGrpcServer:
14
14
  """
15
15
  A gRPC server for handling the various Sapio gRPC services.
16
16
  """
17
- port: str
17
+ port: int
18
18
  options: list[tuple[str, Any]]
19
19
  _converter_services: list[ConverterServiceServicer]
20
20
  _script_services: list[ScriptServiceServicer]
21
21
  _tool_services: list[ToolServiceServicer]
22
22
 
23
- def __init__(self, port: str = "50051", message_mb_size: int = 100, options: list[tuple[str, Any]] | None = None) \
23
+ def __init__(self, port: int = 50051, message_mb_size: int = 1024, options: list[tuple[str, Any]] | None = None) \
24
24
  -> None:
25
25
  """
26
26
  Initialize the gRPC server with the specified port and message size.
@@ -30,6 +30,8 @@ class SapioGrpcServer:
30
30
  :param options: Additional gRPC server options to set. This should be a list of tuples where the first item is
31
31
  the option name and the second item is the option value.
32
32
  """
33
+ if isinstance(port, str):
34
+ port = int(port)
33
35
  self.port = port
34
36
  self.options = [
35
37
  ('grpc.max_send_message_length', message_mb_size * 1024 * 1024),
@@ -86,9 +88,9 @@ class SapioGrpcServer:
86
88
  print(f"Registering Tool service: {service.__class__.__name__}")
87
89
  add_ToolServiceServicer_to_server(service, server)
88
90
 
89
- server.add_insecure_port("[::]:" + self.port)
91
+ server.add_insecure_port(f"[::]:{self.port}")
90
92
  await server.start()
91
- print("Server started, listening on " + self.port)
93
+ print(f"Server started, listening on {self.port}")
92
94
  try:
93
95
  await server.wait_for_termination()
94
96
  finally:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: sapiopycommons
3
- Version: 2025.9.3a721
3
+ Version: 2025.9.5a726
4
4
  Summary: Official Sapio Python API Utilities Package
5
5
  Project-URL: Homepage, https://github.com/sapiosciences
6
6
  Author-email: Jonathan Steck <jsteck@sapiosciences.com>, Yechen Qiao <yqiao@sapiosciences.com>
@@ -2,7 +2,7 @@ sapiopycommons/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  sapiopycommons/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  sapiopycommons/ai/converter_service_base.py,sha256=TMSyEekbbqMk9dRuAtLlSJ1sA1H8KpyCDlSOeqGFMWI,5115
4
4
  sapiopycommons/ai/protobuf_utils.py,sha256=cBjbxoFAwU02kNUxEce95WnMU2CMuDD-qFaeWgvQJMQ,24599
5
- sapiopycommons/ai/server.py,sha256=w70KUENxrYoMyDRFunCAlxhhwXXWBNngCwG40Po7vTU,4212
5
+ sapiopycommons/ai/server.py,sha256=jvmAcs4y8qp0d483wCAUgPlSBSoUUQvCjv_OvQXEGUs,4274
6
6
  sapiopycommons/ai/test_client.py,sha256=iPhn7cvKNLmDAXrjpmIkZpW2pDWlUhJZHDLHJbEoWsg,15673
7
7
  sapiopycommons/ai/tool_service_base.py,sha256=Cj4ewRfBSiW1Tdzn4hkm9P-gDa6NS6fh4jc4TUmvNMs,45336
8
8
  sapiopycommons/ai/protoapi/fielddefinitions/fields_pb2.py,sha256=8tKXwLXcqFGdQHHSEBSi6Fd7dcaCFoOqmhjzqhenb_M,2372
@@ -98,7 +98,7 @@ sapiopycommons/webhook/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
98
98
  sapiopycommons/webhook/webhook_context.py,sha256=D793uLsb1691SalaPnBUk3rOSxn_hYLhdvkaIxjNXss,1909
99
99
  sapiopycommons/webhook/webhook_handlers.py,sha256=7o_wXOruhT9auNh8OfhJAh4WhhiPKij67FMBSpGPICc,39939
100
100
  sapiopycommons/webhook/webservice_handlers.py,sha256=cvW6Mk_110BzYqkbk63Kg7jWrltBCDALOlkJRu8h4VQ,14300
101
- sapiopycommons-2025.9.3a721.dist-info/METADATA,sha256=BD5BEUjdqFC1aJR9r9-J92zWfEgPSCc68MyPFHi_WGk,3142
102
- sapiopycommons-2025.9.3a721.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
103
- sapiopycommons-2025.9.3a721.dist-info/licenses/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
104
- sapiopycommons-2025.9.3a721.dist-info/RECORD,,
101
+ sapiopycommons-2025.9.5a726.dist-info/METADATA,sha256=VLxZnp7_F2kc3BrihRHSG3dN_oeBhoDWNazF-dUWsDo,3142
102
+ sapiopycommons-2025.9.5a726.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
103
+ sapiopycommons-2025.9.5a726.dist-info/licenses/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
104
+ sapiopycommons-2025.9.5a726.dist-info/RECORD,,