Ice is a comprehensive RPC framework with support for Python, C++, .NET, Java, JavaScript and more.
Project description
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}!"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file zeroc_ice-3.8.0.post1.tar.gz.
File metadata
- Download URL: zeroc_ice-3.8.0.post1.tar.gz
- Upload date:
- Size: 1.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b047fe01487ffcf9c61654a03b684ddb9c538be767d6cf29c57a166be550bd7
|
|
| MD5 |
5f47250c052fb4c1adbbd19108f90d70
|
|
| BLAKE2b-256 |
5623efa365259075341c2e8c8003b0ce3aad715a06e7e5493401405e6236de1b
|
File details
Details for the file zeroc_ice-3.8.0.post1-cp314-cp314-win_amd64.whl.
File metadata
- Download URL: zeroc_ice-3.8.0.post1-cp314-cp314-win_amd64.whl
- Upload date:
- Size: 23.4 MB
- Tags: CPython 3.14, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b88e83d10bf3f71359c884912f3a441817e08a78affdf3e34f06411a18eab97
|
|
| MD5 |
79326e27af520631029e024b7c552275
|
|
| BLAKE2b-256 |
a49331a0f173bc28de212904167bad9f7d551b67fe11c2d40b11740b9f6cea56
|
File details
Details for the file zeroc_ice-3.8.0.post1-cp314-cp314-macosx_10_15_universal2.whl.
File metadata
- Download URL: zeroc_ice-3.8.0.post1-cp314-cp314-macosx_10_15_universal2.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.14, macOS 10.15+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9c61a9914053be6602070509e043b206a695dc02bb96d2323ea2e80015467fa
|
|
| MD5 |
493737360eb8eb755750c29e4bb527a1
|
|
| BLAKE2b-256 |
5304c7be8cdff3d3354a75b744b50e9c3547ab02b5095a7bba85230d0a87b7e7
|
File details
Details for the file zeroc_ice-3.8.0.post1-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: zeroc_ice-3.8.0.post1-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 23.1 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c92fa341956fbc1792d0f53a8ae9a0f697f42f22eeb6223dc2633928b3a1e319
|
|
| MD5 |
7b7304870371b1a6bc273319074faaea
|
|
| BLAKE2b-256 |
6add6aa7ea0ae7e8cecd2c6d06035305048cfd221db83a42b2e82ee30af9fb22
|
File details
Details for the file zeroc_ice-3.8.0.post1-cp313-cp313-macosx_10_13_universal2.whl.
File metadata
- Download URL: zeroc_ice-3.8.0.post1-cp313-cp313-macosx_10_13_universal2.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.13, macOS 10.13+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d22cf1ee1349e0a04c85573f92e41a737cc44796ab156391eed0f37d353828ba
|
|
| MD5 |
42a741bf4c1c29c45d128001157a9655
|
|
| BLAKE2b-256 |
e9fe55cb90ca2b44c88de9b96f75b616219e65049bead9c614b4f3ebe3779014
|
File details
Details for the file zeroc_ice-3.8.0.post1-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: zeroc_ice-3.8.0.post1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 23.1 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
652d6c067d318cf024c59cafe8f307c63fc71f40ea5be786df8ed165eef7b55f
|
|
| MD5 |
81cd8a03d2650ede93d2c4ea83f32fbd
|
|
| BLAKE2b-256 |
43570b291b3c7481d6ddc86368b12e7754a08943e874f992317791237d753cee
|
File details
Details for the file zeroc_ice-3.8.0.post1-cp312-cp312-macosx_10_13_universal2.whl.
File metadata
- Download URL: zeroc_ice-3.8.0.post1-cp312-cp312-macosx_10_13_universal2.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.12, macOS 10.13+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8088147786982ef847304cbd55de07578abd715fa5ff373db9f281788fdfe2a2
|
|
| MD5 |
36e6584b1c6ef179701a19d6b81ee3bb
|
|
| BLAKE2b-256 |
eeed8aab5813418cd761f424d9f6e0c19dd33c0541fc764e860929dc947d72bc
|