pryvx 2.4.4__py3-none-any.whl → 2.4.6__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.
pryvx/fl_server.py CHANGED
@@ -34,10 +34,10 @@ class ModelServicer(pryvx_pb2_grpc.ModelServiceServicer):
34
34
 
35
35
  print(f"✅ Received and saved model from {client_id}")
36
36
 
37
- return f"Model from {client_id} received and saved."
37
+ return pryvx_pb2.ModelResponse(message=f"Model from {client_id} received and saved.")
38
38
  except Exception as e:
39
39
  print(f"❌ Error processing model: {e}")
40
- return "Failed to process model"
40
+ return pryvx_pb2.ModelResponse(message="Failed to process model")
41
41
 
42
42
 
43
43
  def start_server():
pryvx/pryvx_pb2.py CHANGED
@@ -1,11 +1,22 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
3
4
  # source: pryvx.proto
5
+ # Protobuf Python Version: 5.29.0
4
6
  """Generated protocol buffer code."""
5
7
  from google.protobuf import descriptor as _descriptor
6
8
  from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
7
10
  from google.protobuf import symbol_database as _symbol_database
8
11
  from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 29,
16
+ 0,
17
+ '',
18
+ 'pryvx.proto'
19
+ )
9
20
  # @@protoc_insertion_point(imports)
10
21
 
11
22
  _sym_db = _symbol_database.Default()
@@ -13,16 +24,17 @@ _sym_db = _symbol_database.Default()
13
24
 
14
25
 
15
26
 
16
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0bpryvx.proto\x12\x05pryvx\"\x1d\n\x0bModelParams\x12\x0e\n\x06params\x18\x01 \x01(\x0c\x32K\n\x0cModelService\x12;\n\x0fSendModelParams\x12\x12.pryvx.ModelParams\x1a\x12.pryvx.ModelParams\"\x00\x62\x06proto3')
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0bpryvx.proto\x12\x05pryvx\"\x1d\n\x0bModelParams\x12\x0e\n\x06params\x18\x01 \x01(\x0c\" \n\rModelResponse\x12\x0f\n\x07message\x18\x01 \x01(\t2M\n\x0cModelService\x12=\n\x0fSendModelParams\x12\x12.pryvx.ModelParams\x1a\x14.pryvx.ModelResponse\"\x00\x62\x06proto3')
17
28
 
18
29
  _globals = globals()
19
30
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
20
31
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'pryvx_pb2', _globals)
21
- if _descriptor._USE_C_DESCRIPTORS == False:
22
-
23
- DESCRIPTOR._options = None
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ DESCRIPTOR._loaded_options = None
24
34
  _globals['_MODELPARAMS']._serialized_start=22
25
35
  _globals['_MODELPARAMS']._serialized_end=51
26
- _globals['_MODELSERVICE']._serialized_start=53
27
- _globals['_MODELSERVICE']._serialized_end=128
36
+ _globals['_MODELRESPONSE']._serialized_start=53
37
+ _globals['_MODELRESPONSE']._serialized_end=85
38
+ _globals['_MODELSERVICE']._serialized_start=87
39
+ _globals['_MODELSERVICE']._serialized_end=164
28
40
  # @@protoc_insertion_point(module_scope)
pryvx/pryvx_pb2_grpc.py CHANGED
@@ -1,8 +1,29 @@
1
1
  # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
2
  """Client and server classes corresponding to protobuf-defined services."""
3
3
  import grpc
4
+ import warnings
5
+
4
6
  from pryvx import pryvx_pb2 as pryvx__pb2
5
7
 
8
+ GRPC_GENERATED_VERSION = '1.70.0'
9
+ GRPC_VERSION = grpc.__version__
10
+ _version_not_supported = False
11
+
12
+ try:
13
+ from grpc._utilities import first_version_is_lower
14
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
15
+ except ImportError:
16
+ _version_not_supported = True
17
+
18
+ if _version_not_supported:
19
+ raise RuntimeError(
20
+ f'The grpc package installed is at version {GRPC_VERSION},'
21
+ + f' but the generated code in pryvx_pb2_grpc.py depends on'
22
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
25
+ )
26
+
6
27
 
7
28
  class ModelServiceStub(object):
8
29
  """Missing associated documentation comment in .proto file."""
@@ -16,8 +37,8 @@ class ModelServiceStub(object):
16
37
  self.SendModelParams = channel.unary_unary(
17
38
  '/pryvx.ModelService/SendModelParams',
18
39
  request_serializer=pryvx__pb2.ModelParams.SerializeToString,
19
- response_deserializer=pryvx__pb2.ModelParams.FromString,
20
- )
40
+ response_deserializer=pryvx__pb2.ModelResponse.FromString,
41
+ _registered_method=True)
21
42
 
22
43
 
23
44
  class ModelServiceServicer(object):
@@ -35,12 +56,13 @@ def add_ModelServiceServicer_to_server(servicer, server):
35
56
  'SendModelParams': grpc.unary_unary_rpc_method_handler(
36
57
  servicer.SendModelParams,
37
58
  request_deserializer=pryvx__pb2.ModelParams.FromString,
38
- response_serializer=pryvx__pb2.ModelParams.SerializeToString,
59
+ response_serializer=pryvx__pb2.ModelResponse.SerializeToString,
39
60
  ),
40
61
  }
41
62
  generic_handler = grpc.method_handlers_generic_handler(
42
63
  'pryvx.ModelService', rpc_method_handlers)
43
64
  server.add_generic_rpc_handlers((generic_handler,))
65
+ server.add_registered_method_handlers('pryvx.ModelService', rpc_method_handlers)
44
66
 
45
67
 
46
68
  # This class is part of an EXPERIMENTAL API.
@@ -58,8 +80,18 @@ class ModelService(object):
58
80
  wait_for_ready=None,
59
81
  timeout=None,
60
82
  metadata=None):
61
- return grpc.experimental.unary_unary(request, target, '/pryvx.ModelService/SendModelParams',
83
+ return grpc.experimental.unary_unary(
84
+ request,
85
+ target,
86
+ '/pryvx.ModelService/SendModelParams',
62
87
  pryvx__pb2.ModelParams.SerializeToString,
63
- pryvx__pb2.ModelParams.FromString,
64
- options, channel_credentials,
65
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
88
+ pryvx__pb2.ModelResponse.FromString,
89
+ options,
90
+ channel_credentials,
91
+ insecure,
92
+ call_credentials,
93
+ compression,
94
+ wait_for_ready,
95
+ timeout,
96
+ metadata,
97
+ _registered_method=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pryvx
3
- Version: 2.4.4
3
+ Version: 2.4.6
4
4
  Summary: A comprehensive package for privacy-enhancing technologies
5
5
  Home-page: UNKNOWN
6
6
  Author: PryvX (Jayesh Kenaudekar)
@@ -1,16 +1,16 @@
1
1
  pryvx/__init__.py,sha256=QvpYISJ8MH7XnbxC5iTMTycq7Svsld0NIbMozcndYjo,111
2
2
  pryvx/fl_client.py,sha256=gQNjv99tDDjaGj0JTdAVomefqR2F3_xNLcnHJ6aGZZo,1152
3
3
  pryvx/fl_ensemble.py,sha256=lvgvd-zJDSBh-RyMAjTyJZwu0eFiUNXfCU7J2Vk7g0g,715
4
- pryvx/fl_server.py,sha256=qAuJqOjdTZ9-DZWx6eeVqGtyMhAqcyTe4vutmtSeglE,1756
4
+ pryvx/fl_server.py,sha256=JqYtlLtLTcKxrNB8oY-hdZmG8VajS7mIqAY3OjOUxmU,1822
5
5
  pryvx/gdp.py,sha256=ToLtWNvBKtSs-3Na1pGe_J6dWvBxXhV2raUJkNtKMg4,925
6
6
  pryvx/ldp.py,sha256=WxBQLnZ_b2wNV1rlN7rtKXaQ5waUPPvnRus-4tUnCB8,810
7
7
  pryvx/phe.py,sha256=HN70aUNTq0w9vRPMaNGfTnNi00gMQ1B7R7Cm6r6rheE,2974
8
- pryvx/pryvx_pb2.py,sha256=-ce40VMW0nQcjyhAJy1BvI32wtWNm425LSIExspK_qg,1200
9
- pryvx/pryvx_pb2_grpc.py,sha256=pRQKblTNIVEwHsMQmhC-HGJFzsLh0sdOzQ-ksFYVK-A,2437
8
+ pryvx/pryvx_pb2.py,sha256=HlwY1zRVFReIaK8WZ8opJ1kd3_PQWSJEx-PZImWYlCM,1621
9
+ pryvx/pryvx_pb2_grpc.py,sha256=yn4mThL3XY8glPvZ9b1Fmj_c8JtAs1pTNp3m0JV9d3s,3425
10
10
  pryvx/psi.py,sha256=V0BUJwYfiFWhKtEL27q45yxY7U-I7B4olKQhaGbgN50,1346
11
11
  pryvx/smpc.py,sha256=FZcE3gZo8WUVPmcBHSgP8iOkWt3AKcBLSLCtKczy8hs,2247
12
- pryvx-2.4.4.dist-info/LICENSE,sha256=pbIMXbaorAIVW-fDch2tvtZRkVA3mz-UnXQqeCf4LDg,1086
13
- pryvx-2.4.4.dist-info/METADATA,sha256=oASPQafqbKaThizhvqDZABLarIJz1PO0bs18cBNm3PQ,1066
14
- pryvx-2.4.4.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
15
- pryvx-2.4.4.dist-info/top_level.txt,sha256=1iHoeevu_FoFjdPg8HyMlgvHNUm1--9QEpFMaJEa4hw,6
16
- pryvx-2.4.4.dist-info/RECORD,,
12
+ pryvx-2.4.6.dist-info/LICENSE,sha256=pbIMXbaorAIVW-fDch2tvtZRkVA3mz-UnXQqeCf4LDg,1086
13
+ pryvx-2.4.6.dist-info/METADATA,sha256=zXQ9VgjJkkJRHsBoy5b1lfEf4y5CHjwzxqhTxD0iBlw,1066
14
+ pryvx-2.4.6.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
15
+ pryvx-2.4.6.dist-info/top_level.txt,sha256=1iHoeevu_FoFjdPg8HyMlgvHNUm1--9QEpFMaJEa4hw,6
16
+ pryvx-2.4.6.dist-info/RECORD,,
File without changes
File without changes