Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zeroc_ice-3.8.2.tar.gz (1.1 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

zeroc_ice-3.8.2-cp314-cp314-win_amd64.whl (23.5 MB view details)

Uploaded CPython 3.14Windows x86-64

zeroc_ice-3.8.2-cp314-cp314-macosx_10_15_universal2.whl (4.6 MB view details)

Uploaded CPython 3.14macOS 10.15+ universal2 (ARM64, x86-64)

zeroc_ice-3.8.2-cp313-cp313-win_amd64.whl (23.2 MB view details)

Uploaded CPython 3.13Windows x86-64

zeroc_ice-3.8.2-cp313-cp313-macosx_10_13_universal2.whl (4.6 MB view details)

Uploaded CPython 3.13macOS 10.13+ universal2 (ARM64, x86-64)

zeroc_ice-3.8.2-cp312-cp312-win_amd64.whl (23.2 MB view details)

Uploaded CPython 3.12Windows x86-64

zeroc_ice-3.8.2-cp312-cp312-macosx_10_13_universal2.whl (4.6 MB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

File details

Details for the file zeroc_ice-3.8.2.tar.gz.

File metadata

  • Download URL: zeroc_ice-3.8.2.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for zeroc_ice-3.8.2.tar.gz
Algorithm Hash digest
SHA256 d3a3d088059d6f3b5de966eb2c550eec334328c5f0c46b9a3d9dc3057e975dc3
MD5 a9902d6b8ecbba91657fdc6064886bf9
BLAKE2b-256 0473ca495a9ff26ca58147c146576e6132683f35fcf1f2a00eedbed95245e74f

See more details on using hashes here.

File details

Details for the file zeroc_ice-3.8.2-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: zeroc_ice-3.8.2-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 23.5 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

Hashes for zeroc_ice-3.8.2-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 9859e9a97e658dc9feb457f45028ec3d1dda64f8dab184ee9c4f803f4b64b7ec
MD5 c9bfb70bfe8f8a8a9b36db9b143542db
BLAKE2b-256 346bef47108bdc0bac1fd411ecb72383cf44126a8171eb17d62ea6fed1a579a6

See more details on using hashes here.

File details

Details for the file zeroc_ice-3.8.2-cp314-cp314-macosx_10_15_universal2.whl.

File metadata

File hashes

Hashes for zeroc_ice-3.8.2-cp314-cp314-macosx_10_15_universal2.whl
Algorithm Hash digest
SHA256 17c21d5d3f66c133ae16243881c6fe127270156fe5826c9876675a126c8c0559
MD5 c257f686ba6fbe8b074b3c0cfb9cfc2e
BLAKE2b-256 de352e794f5a2dee5d8d3e0c55a0442be0ffdd666eed320b27733b0cf646a667

See more details on using hashes here.

File details

Details for the file zeroc_ice-3.8.2-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: zeroc_ice-3.8.2-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 23.2 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

Hashes for zeroc_ice-3.8.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 ebeac85f83049e514aa5d573b3fcc1e5181ce51303d78866f02fc92a78ca2e4f
MD5 54ca94caf26b3962f2f148dbeeb0aec9
BLAKE2b-256 866aefbdf7ad2db7228797ad22a54b8f5d311b25fdd00e8f07ad2c15cdcfb303

See more details on using hashes here.

File details

Details for the file zeroc_ice-3.8.2-cp313-cp313-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for zeroc_ice-3.8.2-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 465149fb610e94d2816162135fbedc745630f17246eaabbde519117a20513672
MD5 40f656e6bec7403dd9fef0b3a0b0abc7
BLAKE2b-256 03c8971cda1b6d6ac6220175e5c864e1e4323af41920d124c106c416d26d9030

See more details on using hashes here.

File details

Details for the file zeroc_ice-3.8.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: zeroc_ice-3.8.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 23.2 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

Hashes for zeroc_ice-3.8.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 66e126ff09b474be76b14cf5083ad9784c3af3faa47da98cd096f0193d38173b
MD5 6771352b6bb7bcce2797d49b6c01f147
BLAKE2b-256 3b960e93aacfa3f15806f9201c2ead1422d94e82f5de54ed3a57e7959c9453f0

See more details on using hashes here.

File details

Details for the file zeroc_ice-3.8.2-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for zeroc_ice-3.8.2-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 f05104b0d4bd2efa428600c43e3a546ac517437c79f2ec911fbde0b096840cd4
MD5 16a93d87855bcbc86c340b2d9fd1738e
BLAKE2b-256 a3cf2f0d0dc38ae05f07b55a0a0679b6043a64abf3ff0893b719cb0695030d0a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page