Ice for Python
Examples | Documentation | API Reference | Building from source
The Ice framework provides everything you need to build networked applications, including RPC, pub/sub, server deployment, and more.
Ice for Python is the Python implementation of the Ice framework.
Sample Code
// Slice definitions (Greeter.ice)
module VisitorCenter
{
/// Represents a simple greeter.
interface Greeter
{
/// Creates a personalized greeting.
/// @param name The name of the person to greet.
/// @return The greeting.
string greet(string name);
}
}
# Client application (main.py)
import Ice
import asyncio
import getpass
import sys
import VisitorCenter
async def main():
async with Ice.Communicator(sys.argv, eventLoop=asyncio.get_running_loop()) as communicator:
greeter = VisitorCenter.GreeterPrx(communicator, "greeter:tcp -h localhost -p 4061")
greeting = await greeter.greetAsync(getpass.getuser())
print(greeting)
if __name__ == "__main__":
asyncio.run(main())
# Server application (main.py)
import Ice
import chatbot
import sys
def main():
with Ice.Communicator(sys.argv) as communicator:
adapter = communicator.createObjectAdapterWithEndpoints("GreeterAdapter", "tcp -p 4061")
adapter.add(chatbot.Chatbot(), Ice.Identity(name="greeter"))
adapter.activate()
print("Listening on port 4061...")
try:
communicator.waitForShutdown()
except KeyboardInterrupt:
print("Caught Ctrl+C, exiting...")
if __name__ == "__main__":
main()
# Greeter implementation (chatbot.py)
import VisitorCenter
class Chatbot(VisitorCenter.Greeter):
def greet(self, name: str, current: Ice.Current) -> str:
print(f"Dispatching greet request {{ name = '{name}' }}")
return f"Hello, {name}!"
Release files for zeroc-ice 3.8.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| zeroc_ice-3.8.3.tar.gz | 1.1 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| zeroc_ice-3.8.3-cp314-cp314-win_amd64.whl | CPython 3.14 | CPython 3.14 | Windows x86-64 | Details |
| zeroc_ice-3.8.3-cp314-cp314-macosx_10_15_universal2.whl | CPython 3.14 | CPython 3.14 | macOS 10.15+ universal2 (ARM64, x86-64) | Details |
| zeroc_ice-3.8.3-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details |
| zeroc_ice-3.8.3-cp313-cp313-macosx_10_13_universal2.whl | CPython 3.13 | CPython 3.13 | macOS 10.13+ universal2 (ARM64, x86-64) | Details |
| zeroc_ice-3.8.3-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details |
| zeroc_ice-3.8.3-cp312-cp312-macosx_10_13_universal2.whl | CPython 3.12 | CPython 3.12 | macOS 10.13+ universal2 (ARM64, x86-64) | Details |
Total release size: 84.6 MB
Release files / zeroc_ice-3.8.3.tar.gz
| Download URL | zeroc_ice-3.8.3.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6b4589585d1fe3af7831adeb5d0d4da0d3fe59cf2e0660e9207059123e50711
|
|
BLAKE2b-256 checksum How to use checksums |
d831fc7367f5df50d8d1f63eb1d054a11200e70ededeba48260a6ebd7bc6b512
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / zeroc_ice-3.8.3-cp314-cp314-win_amd64.whl
| Download URL | zeroc_ice-3.8.3-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 23.4 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6e0859eba2c02d39d61946897d62ff740c5d09d90038a8b804eac456ae0923e9
|
|
BLAKE2b-256 checksum How to use checksums |
9191c6307bd733aa724bb14f489585f40e34bcfedde6a7b4676ac48738f225c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / zeroc_ice-3.8.3-cp314-cp314-macosx_10_15_universal2.whl
| Download URL | zeroc_ice-3.8.3-cp314-cp314-macosx_10_15_universal2.whl |
|---|---|
| Size | 4.6 MB |
| Tags | CPython 3.14 macOS 10.15+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
f48fd8f7249e43f1db21fcdf682a9853a5d9a9325a4ddbf7a0789489ff66338f
|
|
BLAKE2b-256 checksum How to use checksums |
b8a7a2789f0a1b6735a48c826e69a760b3835e22c921591851af40c4b8783b8b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / zeroc_ice-3.8.3-cp313-cp313-win_amd64.whl
| Download URL | zeroc_ice-3.8.3-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 23.1 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9f03f86be5f9daff37c85e69c7815586b372ab467bc1853553236c3047c7d437
|
|
BLAKE2b-256 checksum How to use checksums |
fdf2694fa21d48a525a46fc8cb82805397f29843105a2caa189a95c178755763
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / zeroc_ice-3.8.3-cp313-cp313-macosx_10_13_universal2.whl
| Download URL | zeroc_ice-3.8.3-cp313-cp313-macosx_10_13_universal2.whl |
|---|---|
| Size | 4.6 MB |
| Tags | CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
d0e15f29d4391258b13dfdcc16969337458e164698652f6691698a00986e028e
|
|
BLAKE2b-256 checksum How to use checksums |
d5c8e738b356b74809090f2147d8c969c82ab881b49ae9ac83d1d73cf71c7095
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / zeroc_ice-3.8.3-cp312-cp312-win_amd64.whl
| Download URL | zeroc_ice-3.8.3-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 23.1 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7cdccf692947d73602bb402e37792fc1b5b479cc0999dbbe1920e2095cc5c451
|
|
BLAKE2b-256 checksum How to use checksums |
b53d83c68fa905be27b0f721bcb18e8a9a8184a899012bd4904de69b192df104
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / zeroc_ice-3.8.3-cp312-cp312-macosx_10_13_universal2.whl
| Download URL | zeroc_ice-3.8.3-cp312-cp312-macosx_10_13_universal2.whl |
|---|---|
| Size | 4.6 MB |
| Tags | CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
294171a59673f419b2f614eb94b468a5be454633fa834f3d14768efad1780499
|
|
BLAKE2b-256 checksum How to use checksums |
4e367c39157c3ac09898e2784c3b62ea8b64d872d1e9ec11c736b135d3af6d4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|