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.1.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.1-cp314-cp314-win_amd64.whl (23.5 MB view details)

Uploaded CPython 3.14Windows x86-64

zeroc_ice-3.8.1-cp314-cp314-macosx_10_15_universal2.whl (4.5 MB view details)

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

zeroc_ice-3.8.1-cp313-cp313-win_amd64.whl (23.1 MB view details)

Uploaded CPython 3.13Windows x86-64

zeroc_ice-3.8.1-cp313-cp313-macosx_10_13_universal2.whl (4.5 MB view details)

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

zeroc_ice-3.8.1-cp312-cp312-win_amd64.whl (23.1 MB view details)

Uploaded CPython 3.12Windows x86-64

zeroc_ice-3.8.1-cp312-cp312-macosx_10_13_universal2.whl (4.5 MB view details)

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

File details

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

File metadata

  • Download URL: zeroc_ice-3.8.1.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.1.tar.gz
Algorithm Hash digest
SHA256 b97b36e00c7f9e1903e3bc18c9dc2fe0fba2913c3ef8a3f90f3663a9379d32ec
MD5 e7dd0444c0d0e7f63db1ae08930a3034
BLAKE2b-256 50cd362f8320c13c59b17c04af425302c976b8fbe0ea957906eeda78032fd6f8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zeroc_ice-3.8.1-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.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 5a82b5b89566a3f5cf19ef5ff6f1f4ccc3af63885942c3150af486f8fec44637
MD5 43ee80cfbe013a44ae744a0498855633
BLAKE2b-256 0de3b269952c448616b228895413ce1675d8b4c60eadebf04a87a01305d0a839

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zeroc_ice-3.8.1-cp314-cp314-macosx_10_15_universal2.whl
Algorithm Hash digest
SHA256 2263048a0b2e029737c2fe8a0e08aa4701cdc5c9cf0dc0aa3a357756ce34f4dc
MD5 374dd198940cb34ce26160bf900e1b91
BLAKE2b-256 2bf2d35a44596a8a5599310d031df2cb95fb2b8a3f0be484ed84ae337f1b529e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zeroc_ice-3.8.1-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

Hashes for zeroc_ice-3.8.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 bf8c5dd69401d4f3fdf69afdfb453f41e292f8bae3f0e1bb70675814f623f207
MD5 84014cb0e2e6ad564a89a9e099045d90
BLAKE2b-256 1ccdbf0415997d3e68565284a356114e71ecbef397013ace2b527ae8ff789c51

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zeroc_ice-3.8.1-cp313-cp313-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 0eaa4830caf8106e58cc40e65c19818f7d01d42334b8bad6bcd989cb19573597
MD5 0e6fdaacd6670799ad1375867566773f
BLAKE2b-256 ce7d24dc1265baed303dd0df7b15c855bdb6ac2076af28b95e463f2e22f10a75

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zeroc_ice-3.8.1-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

Hashes for zeroc_ice-3.8.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9848baf43af653ff4507f97112702b18bdaf014872b12a67d63e586f271e74f8
MD5 545a1c49f3509441675d1a483c48679c
BLAKE2b-256 d3ab64a5fe3ffe71d9f494fd344f3b1f507345818339e2598359c324925dbd29

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for zeroc_ice-3.8.1-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 cf621e4c2c050ccd7bef6d8e9d7020b467668860186a45da9be22ef6fdc66745
MD5 6109866c3a8aed45cee4af1696da318f
BLAKE2b-256 cab9a308e202873d76aeafa53c7e03354518dcdd3ed0347d95c566fb6720a6f9

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