zeroc-ice 3.7.11__cp314-cp314-win_amd64.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.
Files changed (143) hide show
  1. Glacier2/Metrics_ice.py +82 -0
  2. Glacier2/PermissionsVerifierF_ice.py +32 -0
  3. Glacier2/PermissionsVerifier_ice.py +284 -0
  4. Glacier2/RouterF_ice.py +28 -0
  5. Glacier2/Router_ice.py +618 -0
  6. Glacier2/SSLInfo_ice.py +179 -0
  7. Glacier2/Session_ice.py +1103 -0
  8. Glacier2/__init__.py +226 -0
  9. Ice/BuiltinSequences_ice.py +65 -0
  10. Ice/CommunicatorF_ice.py +27 -0
  11. Ice/Communicator_ice.py +469 -0
  12. Ice/ConnectionF_ice.py +33 -0
  13. Ice/Connection_ice.py +680 -0
  14. Ice/Current_ice.py +175 -0
  15. Ice/EndpointF_ice.py +45 -0
  16. Ice/EndpointTypes_ice.py +54 -0
  17. Ice/Endpoint_ice.py +304 -0
  18. Ice/FacetMap_ice.py +27 -0
  19. Ice/Identity_ice.py +133 -0
  20. Ice/ImplicitContextF_ice.py +27 -0
  21. Ice/ImplicitContext_ice.py +119 -0
  22. Ice/InstrumentationF_ice.py +38 -0
  23. Ice/Instrumentation_ice.py +566 -0
  24. Ice/LocalException_ice.py +1715 -0
  25. Ice/LocatorF_ice.py +32 -0
  26. Ice/Locator_ice.py +728 -0
  27. Ice/LoggerF_ice.py +27 -0
  28. Ice/Logger_ice.py +96 -0
  29. Ice/Metrics_ice.py +864 -0
  30. Ice/ObjectAdapterF_ice.py +27 -0
  31. Ice/ObjectAdapter_ice.py +461 -0
  32. Ice/ObjectFactory_ice.py +68 -0
  33. Ice/PluginF_ice.py +30 -0
  34. Ice/Plugin_ice.py +136 -0
  35. Ice/ProcessF_ice.py +28 -0
  36. Ice/Process_ice.py +175 -0
  37. Ice/PropertiesAdmin_ice.py +247 -0
  38. Ice/PropertiesF_ice.py +31 -0
  39. Ice/Properties_ice.py +199 -0
  40. Ice/Py3/IceFuture.py +52 -0
  41. Ice/Py3/__init__.py +3 -0
  42. Ice/RemoteLogger_ice.py +617 -0
  43. Ice/RouterF_ice.py +28 -0
  44. Ice/Router_ice.py +350 -0
  45. Ice/ServantLocatorF_ice.py +27 -0
  46. Ice/ServantLocator_ice.py +110 -0
  47. Ice/SliceChecksumDict_ice.py +29 -0
  48. Ice/ValueFactory_ice.py +125 -0
  49. Ice/Version_ice.py +217 -0
  50. Ice/__init__.py +2008 -0
  51. IceBox/IceBox_ice.py +644 -0
  52. IceBox/__init__.py +10 -0
  53. IceGrid/Admin_ice.py +6662 -0
  54. IceGrid/Descriptor_ice.py +1795 -0
  55. IceGrid/Exception_ice.py +592 -0
  56. IceGrid/FileParser_ice.py +171 -0
  57. IceGrid/PluginFacade_ice.py +288 -0
  58. IceGrid/Registry_ice.py +985 -0
  59. IceGrid/Session_ice.py +406 -0
  60. IceGrid/UserAccountMapper_ice.py +166 -0
  61. IceGrid/__init__.py +17 -0
  62. IceMX/__init__.py +12 -0
  63. IcePatch2/FileInfo_ice.py +287 -0
  64. IcePatch2/FileServer_ice.py +555 -0
  65. IcePatch2/__init__.py +11 -0
  66. IcePy.cp314-win_amd64.pdb +0 -0
  67. IcePy.cp314-win_amd64.pyd +0 -0
  68. IceStorm/IceStorm_ice.py +1265 -0
  69. IceStorm/Metrics_ice.py +106 -0
  70. IceStorm/__init__.py +10 -0
  71. slice/Glacier2/Metrics.ice +88 -0
  72. slice/Glacier2/PermissionsVerifier.ice +111 -0
  73. slice/Glacier2/PermissionsVerifierF.ice +30 -0
  74. slice/Glacier2/Router.ice +186 -0
  75. slice/Glacier2/RouterF.ice +29 -0
  76. slice/Glacier2/SSLInfo.ice +59 -0
  77. slice/Glacier2/Session.ice +274 -0
  78. slice/Ice/BuiltinSequences.ice +59 -0
  79. slice/Ice/Communicator.ice +676 -0
  80. slice/Ice/CommunicatorF.ice +31 -0
  81. slice/Ice/Connection.ice +516 -0
  82. slice/Ice/ConnectionF.ice +33 -0
  83. slice/Ice/Current.ice +170 -0
  84. slice/Ice/Endpoint.ice +291 -0
  85. slice/Ice/EndpointF.ice +43 -0
  86. slice/Ice/EndpointTypes.ice +48 -0
  87. slice/Ice/FacetMap.ice +36 -0
  88. slice/Ice/Identity.ice +75 -0
  89. slice/Ice/ImplicitContext.ice +119 -0
  90. slice/Ice/ImplicitContextF.ice +30 -0
  91. slice/Ice/Instrumentation.ice +509 -0
  92. slice/Ice/InstrumentationF.ice +38 -0
  93. slice/Ice/LocalException.ice +1040 -0
  94. slice/Ice/Locator.ice +239 -0
  95. slice/Ice/LocatorF.ice +32 -0
  96. slice/Ice/Logger.ice +99 -0
  97. slice/Ice/LoggerF.ice +31 -0
  98. slice/Ice/Metrics.ice +436 -0
  99. slice/Ice/ObjectAdapter.ice +710 -0
  100. slice/Ice/ObjectAdapterF.ice +31 -0
  101. slice/Ice/ObjectFactory.ice +71 -0
  102. slice/Ice/Plugin.ice +131 -0
  103. slice/Ice/PluginF.ice +36 -0
  104. slice/Ice/Process.ice +64 -0
  105. slice/Ice/ProcessF.ice +31 -0
  106. slice/Ice/Properties.ice +244 -0
  107. slice/Ice/PropertiesAdmin.ice +87 -0
  108. slice/Ice/PropertiesF.ice +32 -0
  109. slice/Ice/RemoteLogger.ice +226 -0
  110. slice/Ice/Router.ice +103 -0
  111. slice/Ice/RouterF.ice +31 -0
  112. slice/Ice/ServantLocator.ice +136 -0
  113. slice/Ice/ServantLocatorF.ice +31 -0
  114. slice/Ice/SliceChecksumDict.ice +36 -0
  115. slice/Ice/ValueFactory.ice +133 -0
  116. slice/Ice/Version.ice +51 -0
  117. slice/IceBT/ConnectionInfo.ice +59 -0
  118. slice/IceBT/EndpointInfo.ice +57 -0
  119. slice/IceBT/Types.ice +45 -0
  120. slice/IceBox/IceBox.ice +216 -0
  121. slice/IceGrid/Admin.ice +1957 -0
  122. slice/IceGrid/Descriptor.ice +1094 -0
  123. slice/IceGrid/Exception.ice +396 -0
  124. slice/IceGrid/FileParser.ice +72 -0
  125. slice/IceGrid/PluginFacade.ice +329 -0
  126. slice/IceGrid/Registry.ice +269 -0
  127. slice/IceGrid/Session.ice +128 -0
  128. slice/IceGrid/UserAccountMapper.ice +69 -0
  129. slice/IceIAP/ConnectionInfo.ice +74 -0
  130. slice/IceIAP/EndpointInfo.ice +68 -0
  131. slice/IcePatch2/FileInfo.ice +85 -0
  132. slice/IcePatch2/FileServer.ice +191 -0
  133. slice/IceSSL/ConnectionInfo.ice +54 -0
  134. slice/IceSSL/ConnectionInfoF.ice +31 -0
  135. slice/IceSSL/EndpointInfo.ice +45 -0
  136. slice/IceStorm/IceStorm.ice +414 -0
  137. slice/IceStorm/Metrics.ice +83 -0
  138. slice2py.py +21 -0
  139. zeroc_ice-3.7.11.dist-info/METADATA +97 -0
  140. zeroc_ice-3.7.11.dist-info/RECORD +143 -0
  141. zeroc_ice-3.7.11.dist-info/WHEEL +5 -0
  142. zeroc_ice-3.7.11.dist-info/entry_points.txt +2 -0
  143. zeroc_ice-3.7.11.dist-info/top_level.txt +10 -0
@@ -0,0 +1,414 @@
1
+ //
2
+ // Copyright (c) ZeroC, Inc. All rights reserved.
3
+ //
4
+
5
+ #pragma once
6
+
7
+ [["cpp:dll-export:ICESTORM_API"]]
8
+ [["cpp:doxygen:include:IceStorm/IceStorm.h"]]
9
+ [["cpp:header-ext:h"]]
10
+ [["cpp:include:IceStorm/Config.h"]]
11
+
12
+ [["ice-prefix"]]
13
+
14
+ [["js:module:ice"]]
15
+ [["js:cjs-module"]]
16
+
17
+ [["objc:dll-export:ICESTORM_API"]]
18
+ [["objc:header-dir:objc"]]
19
+
20
+ [["python:pkgdir:IceStorm"]]
21
+
22
+ #include <Ice/Identity.ice>
23
+ #include <Ice/SliceChecksumDict.ice>
24
+
25
+ #include <IceStorm/Metrics.ice>
26
+
27
+ #ifndef __SLICE2JAVA_COMPAT__
28
+ [["java:package:com.zeroc"]]
29
+ #endif
30
+
31
+ /**
32
+ *
33
+ * A messaging service with support for federation. In contrast to
34
+ * most other messaging or event services, IceStorm supports typed
35
+ * events, meaning that broadcasting a message over a federation is as
36
+ * easy as invoking a method on an interface.
37
+ *
38
+ **/
39
+ ["objc:prefix:ICESTORM"]
40
+ module IceStorm
41
+ {
42
+
43
+ interface Topic;
44
+
45
+ /**
46
+ *
47
+ * Information on the topic links.
48
+ *
49
+ **/
50
+ struct LinkInfo
51
+ {
52
+ /**
53
+ *
54
+ * The linked topic.
55
+ *
56
+ **/
57
+ Topic* theTopic;
58
+
59
+ /**
60
+ *
61
+ * The name of the linked topic.
62
+ *
63
+ **/
64
+ string name;
65
+
66
+ /**
67
+ *
68
+ * The cost of traversing this link.
69
+ *
70
+ **/
71
+ int cost;
72
+ }
73
+
74
+ /**
75
+ *
76
+ * A sequence of {@link LinkInfo} objects.
77
+ *
78
+ **/
79
+ sequence<LinkInfo> LinkInfoSeq;
80
+
81
+ /**
82
+ *
83
+ * This dictionary represents quality of service parameters.
84
+ *
85
+ * @see Topic#subscribeAndGetPublisher
86
+ *
87
+ */
88
+ dictionary<string, string> QoS;
89
+
90
+ /**
91
+ *
92
+ * This exception indicates that an attempt was made to create a link
93
+ * that already exists.
94
+ *
95
+ **/
96
+ exception LinkExists
97
+ {
98
+ /**
99
+ *
100
+ * The name of the linked topic.
101
+ *
102
+ */
103
+ string name;
104
+ }
105
+
106
+ /**
107
+ *
108
+ * This exception indicates that an attempt was made to remove a
109
+ * link that does not exist.
110
+ *
111
+ **/
112
+ exception NoSuchLink
113
+ {
114
+ /**
115
+ *
116
+ * The name of the link that does not exist.
117
+ *
118
+ */
119
+ string name;
120
+ }
121
+
122
+ /**
123
+ *
124
+ * This exception indicates that an attempt was made to subscribe
125
+ * a proxy for which a subscription already exists.
126
+ *
127
+ **/
128
+ exception AlreadySubscribed
129
+ {
130
+ }
131
+
132
+ /**
133
+ *
134
+ * This exception indicates that an attempt was made to subscribe
135
+ * a proxy that is null.
136
+ *
137
+ **/
138
+ exception InvalidSubscriber
139
+ {
140
+ /**
141
+ *
142
+ * The reason for the failure.
143
+ *
144
+ **/
145
+ string reason;
146
+ }
147
+
148
+ /**
149
+ *
150
+ * This exception indicates that a subscription failed due to an
151
+ * invalid QoS.
152
+ *
153
+ **/
154
+ exception BadQoS
155
+ {
156
+ /**
157
+ *
158
+ * The reason for the failure.
159
+ *
160
+ **/
161
+ string reason;
162
+ }
163
+
164
+ /**
165
+ *
166
+ * Publishers publish information on a particular topic. A topic
167
+ * logically represents a type.
168
+ *
169
+ * @see TopicManager
170
+ *
171
+ **/
172
+ interface Topic
173
+ {
174
+ /**
175
+ *
176
+ * Get the name of this topic.
177
+ *
178
+ * @return The name of the topic.
179
+ *
180
+ * @see TopicManager#create
181
+ *
182
+ **/
183
+ ["nonmutating", "cpp:const"] idempotent string getName();
184
+
185
+ /**
186
+ *
187
+ * Get a proxy to a publisher object for this topic. To publish
188
+ * data to a topic, the publisher calls getPublisher and then
189
+ * casts to the topic type. An unchecked cast must be used on this
190
+ * proxy. If a replicated IceStorm deployment is used this call
191
+ * may return a replicated proxy.
192
+ *
193
+ * @return A proxy to publish data on this topic.
194
+ *
195
+ **/
196
+ ["nonmutating", "cpp:const"] idempotent Object* getPublisher();
197
+
198
+ /**
199
+ *
200
+ * Get a non-replicated proxy to a publisher object for this
201
+ * topic. To publish data to a topic, the publisher calls
202
+ * getPublisher and then casts to the topic type. An unchecked
203
+ * cast must be used on this proxy.
204
+ *
205
+ * @return A proxy to publish data on this topic.
206
+ *
207
+ **/
208
+ ["nonmutating", "cpp:const"] idempotent Object* getNonReplicatedPublisher();
209
+
210
+ /**
211
+ *
212
+ * Subscribe with the given <code>qos</code> to this topic. A
213
+ * per-subscriber publisher object is returned.
214
+ *
215
+ * @param theQoS The quality of service parameters for this
216
+ * subscription.
217
+ *
218
+ * @param subscriber The subscriber's proxy.
219
+ *
220
+ * @return The per-subscriber publisher object.
221
+ *
222
+ * @throws AlreadySubscribed Raised if the subscriber object is
223
+ * already subscribed.
224
+ *
225
+ * @throws InvalidSubscriber Raised if the subscriber object is null.
226
+ *
227
+ * @throws BadQoS Raised if the requested quality of service
228
+ * is unavailable or invalid.
229
+ *
230
+ * @see #unsubscribe
231
+ *
232
+ **/
233
+ Object* subscribeAndGetPublisher(QoS theQoS, Object* subscriber)
234
+ throws AlreadySubscribed, InvalidSubscriber, BadQoS;
235
+
236
+ /**
237
+ *
238
+ * Unsubscribe the given <code>subscriber</code>.
239
+ *
240
+ * @param subscriber The proxy of an existing subscriber.
241
+ *
242
+ * @see #subscribeAndGetPublisher
243
+ *
244
+ **/
245
+ idempotent void unsubscribe(Object* subscriber);
246
+
247
+ /**
248
+ *
249
+ * Create a link to the given topic. All events originating
250
+ * on this topic will also be sent to <code>linkTo</code>.
251
+ *
252
+ * @param linkTo The topic to link to.
253
+ *
254
+ * @param cost The cost to the linked topic.
255
+ *
256
+ * @throws LinkExists Raised if a link to the same topic already
257
+ * exists.
258
+ *
259
+ **/
260
+ void link(Topic* linkTo, int cost) throws LinkExists;
261
+
262
+ /**
263
+ *
264
+ * Destroy the link from this topic to the given topic <code>linkTo</code>.
265
+ *
266
+ * @param linkTo The topic to destroy the link to.
267
+ *
268
+ * @throws NoSuchLink Raised if a link to the topic does not exist.
269
+ *
270
+ **/
271
+ void unlink(Topic* linkTo) throws NoSuchLink;
272
+
273
+ /**
274
+ *
275
+ * Retrieve information on the current links.
276
+ *
277
+ * @return A sequence of LinkInfo objects.
278
+ *
279
+ **/
280
+ ["nonmutating", "cpp:const"] idempotent LinkInfoSeq getLinkInfoSeq();
281
+
282
+ /**
283
+ *
284
+ * Retrieve the list of subscribers for this topic.
285
+ *
286
+ * @return The sequence of Ice identities for the subscriber objects.
287
+ *
288
+ **/
289
+ ["nonmutating", "cpp:const"] Ice::IdentitySeq getSubscribers();
290
+
291
+ /**
292
+ *
293
+ * Destroy the topic.
294
+ *
295
+ **/
296
+ void destroy();
297
+ }
298
+
299
+ /**
300
+ *
301
+ * Mapping of topic name to topic proxy.
302
+ *
303
+ **/
304
+ dictionary<string, Topic*> TopicDict;
305
+
306
+ /**
307
+ *
308
+ * This exception indicates that an attempt was made to create a topic
309
+ * that already exists.
310
+ *
311
+ **/
312
+ exception TopicExists
313
+ {
314
+ /**
315
+ *
316
+ * The name of the topic that already exists.
317
+ *
318
+ */
319
+ string name;
320
+ }
321
+
322
+ /**
323
+ *
324
+ * This exception indicates that an attempt was made to retrieve a
325
+ * topic that does not exist.
326
+ *
327
+ **/
328
+ exception NoSuchTopic
329
+ {
330
+ /**
331
+ *
332
+ * The name of the topic that does not exist.
333
+ *
334
+ */
335
+ string name;
336
+ }
337
+
338
+ /**
339
+ *
340
+ * A topic manager manages topics, and subscribers to topics.
341
+ *
342
+ * @see Topic
343
+ *
344
+ **/
345
+ interface TopicManager
346
+ {
347
+ /**
348
+ *
349
+ * Create a new topic. The topic name must be unique.
350
+ *
351
+ * @param name The name of the topic.
352
+ *
353
+ * @return A proxy to the topic instance.
354
+ *
355
+ * @throws TopicExists Raised if a topic with the same name already
356
+ * exists.
357
+ *
358
+ **/
359
+ Topic* create(string name) throws TopicExists;
360
+
361
+ /**
362
+ *
363
+ * Retrieve a topic by name.
364
+ *
365
+ * @param name The name of the topic.
366
+ *
367
+ * @return A proxy to the topic instance.
368
+ *
369
+ * @throws NoSuchTopic Raised if the topic does not exist.
370
+ *
371
+ **/
372
+ ["nonmutating", "cpp:const"] idempotent Topic* retrieve(string name) throws NoSuchTopic;
373
+
374
+ /**
375
+ *
376
+ * Retrieve all topics managed by this topic manager.
377
+ *
378
+ * @return A dictionary of string, topic proxy pairs.
379
+ *
380
+ **/
381
+ ["nonmutating", "cpp:const"] idempotent TopicDict retrieveAll();
382
+
383
+ /**
384
+ *
385
+ * Returns the checksums for the IceStorm Slice definitions.
386
+ *
387
+ * @return A dictionary mapping Slice type ids to their checksums.
388
+ *
389
+ **/
390
+ ["nonmutating", "cpp:const"] idempotent Ice::SliceChecksumDict getSliceChecksums();
391
+ }
392
+
393
+ /**
394
+ *
395
+ * This interface is advertised by the IceStorm service through the
396
+ * Ice object with the identity `IceStorm/Finder'. This allows clients
397
+ * to retrieve the topic manager with just the endpoint information of
398
+ * the IceStorm service.
399
+ *
400
+ **/
401
+ interface Finder
402
+ {
403
+ /**
404
+ *
405
+ * Get the topic manager proxy. The proxy might point to several
406
+ * replicas.
407
+ *
408
+ * @return The topic manager proxy.
409
+ *
410
+ **/
411
+ TopicManager* getTopicManager();
412
+ }
413
+
414
+ }
@@ -0,0 +1,83 @@
1
+ //
2
+ // Copyright (c) ZeroC, Inc. All rights reserved.
3
+ //
4
+
5
+ #pragma once
6
+
7
+ [["cpp:dll-export:ICESTORM_API"]]
8
+ [["cpp:doxygen:include:IceStorm/IceStorm.h"]]
9
+ [["cpp:header-ext:h"]]
10
+ [["cpp:include:IceStorm/Config.h"]]
11
+
12
+ [["ice-prefix"]]
13
+
14
+ [["js:module:ice"]]
15
+ [["js:cjs-module"]]
16
+
17
+ [["objc:dll-export:ICESTORM_API"]]
18
+ [["objc:header-dir:objc"]]
19
+
20
+ [["python:pkgdir:IceStorm"]]
21
+
22
+ #include <Ice/Metrics.ice>
23
+
24
+ #ifndef __SLICE2JAVA_COMPAT__
25
+ [["java:package:com.zeroc"]]
26
+ #endif
27
+
28
+ ["objc:prefix:ICEMX", "swift:module:IceStorm:MX"]
29
+ module IceMX
30
+ {
31
+
32
+ /**
33
+ *
34
+ * Provides information on IceStorm topics.
35
+ *
36
+ **/
37
+ class TopicMetrics extends Metrics
38
+ {
39
+ /**
40
+ *
41
+ * Number of events published on the topic by publishers.
42
+ *
43
+ **/
44
+ long published = 0;
45
+
46
+ /**
47
+ *
48
+ * Number of events forwarded on the topic by IceStorm topic links.
49
+ *
50
+ **/
51
+ long forwarded = 0;
52
+ }
53
+
54
+ /**
55
+ *
56
+ * Provides information on IceStorm subscribers.
57
+ *
58
+ **/
59
+ class SubscriberMetrics extends Metrics
60
+ {
61
+ /**
62
+ *
63
+ * Number of queued events.
64
+ *
65
+ **/
66
+ int queued = 0;
67
+
68
+ /**
69
+ *
70
+ * Number of outstanding events.
71
+ *
72
+ **/
73
+ int outstanding = 0;
74
+
75
+ /**
76
+ *
77
+ * Number of forwarded events.
78
+ *
79
+ **/
80
+ long delivered = 0;
81
+ }
82
+
83
+ }
slice2py.py ADDED
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env python3
2
+ #
3
+ # Copyright (c) ZeroC, Inc. All rights reserved.
4
+ #
5
+
6
+ import sys
7
+ import Ice
8
+ import IcePy
9
+
10
+
11
+ def main():
12
+ sliceDir = Ice.getSliceDir()
13
+ # Automatically add the slice dir.
14
+ if sliceDir is not None:
15
+ sys.argv.append('-I' + sliceDir)
16
+ val = IcePy.compile(sys.argv)
17
+ sys.exit(int(val))
18
+
19
+
20
+ if __name__ == "__main__":
21
+ sys.exit(main())
@@ -0,0 +1,97 @@
1
+ Metadata-Version: 2.4
2
+ Name: zeroc-ice
3
+ Version: 3.7.11
4
+ Summary: Ice is a comprehensive RPC framework with support for Python, C++, .NET, Java, JavaScript and more.
5
+ Author-email: "ZeroC, Inc." <info@zeroc.com>
6
+ License-Expression: GPL-2.0-only
7
+ Project-URL: Homepage, https://zeroc.com/ice
8
+ Project-URL: Repository, https://github.com/zeroc-ice/ice
9
+ Project-URL: Documentation, https://archive.zeroc.com/ice/3.7
10
+ Project-URL: Issues, https://github.com/zeroc-ice/ice/issues
11
+ Project-URL: Changelog, https://github.com/zeroc-ice/ice/blob/3.7/CHANGELOG-3.7.md
12
+ Keywords: ice,RPC
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: 3.14
21
+ Classifier: Operating System :: OS Independent
22
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+
26
+ # Ice for Python
27
+
28
+ [Getting started] | [Examples] | [Documentation] | [Building from source]
29
+
30
+ The [Ice framework] provides everything you need to build networked applications,
31
+ including RPC, pub/sub, server deployment, and more.
32
+
33
+ Ice for Python is the Python implementation of the Ice framework.
34
+
35
+ ## Sample Code
36
+
37
+ ```slice
38
+ // Slice definitions (Hello.ice)
39
+
40
+ module Demo
41
+ {
42
+ interface Hello
43
+ {
44
+ void sayHello();
45
+ }
46
+ }
47
+ ```
48
+
49
+ ```python
50
+ // Client application (client.py)
51
+ import sys
52
+ import Ice
53
+
54
+ Ice.loadSlice('Hello.ice')
55
+ import Demo
56
+
57
+ # Ice.initialize returns an initialized Ice communicator, the communicator is destroyed
58
+ # once it goes out of scope.
59
+ with Ice.initialize(sys.argv) as communicator:
60
+ hello = Demo.HelloPrx.checkedCast(
61
+ communicator.stringToProxy("hello:default -h localhost -p 10000"))
62
+ hello.sayHello()
63
+ ```
64
+
65
+ ```python
66
+ // Server application (server.py)
67
+
68
+ import signal
69
+ import sys
70
+ import Ice
71
+
72
+ Ice.loadSlice('Hello.ice')
73
+ import Demo
74
+
75
+ class Printer(Demo.Hello):
76
+ def sayHello(self, current):
77
+ print("Hello World!")
78
+
79
+ # Ice.initialize returns an initialized Ice communicator, the communicator is destroyed
80
+ # once it goes out of scope.
81
+ with Ice.initialize(sys.argv) as communicator:
82
+
83
+ # Install a signal handler to shutdown the communicator on Ctrl-C
84
+ signal.signal(signal.SIGINT, lambda signum, frame: communicator.shutdown())
85
+ if hasattr(signal, 'SIGBREAK'):
86
+ signal.signal(signal.SIGBREAK, lambda signum, frame: communicator.shutdown())
87
+ adapter = communicator.createObjectAdapterWithEndpoints("Hello", "default -h localhost -p 10000")
88
+ adapter.add(Printer(), Ice.stringToIdentity("hello"))
89
+ adapter.activate()
90
+ communicator.waitForShutdown()
91
+ ```
92
+
93
+ [Getting started]: https://archive.zeroc.com/ice/3.7/hello-world-application/writing-an-ice-application-with-python
94
+ [Examples]: https://github.com/zeroc-ice/ice-demos/tree/3.7/python
95
+ [Documentation]: https://archive.zeroc.com/ice/3.7
96
+ [Building from source]: https://github.com/zeroc-ice/ice/blob/3.7/python/BUILDING.md
97
+ [Ice framework]: https://github.com/zeroc-ice/ice