Skip to main content

Socket-based abstraction for messaging patterns

Project description

aiomsg (Python)

Pure-Python smart sockets (like ZMQ) for simpler networking — the reference implementation of the aiomsg protocol.

This is the Python member of the multi-language aiomsg family. For the full design narrative, message-distribution cookbook, and TLS guide, see the top-level README. For the on-the-wire spec shared by every language implementation, see PROTOCOL.md.

Install

pip install aiomsg

Quickstart

The end that binds (the "server"):

import asyncio, time
from aiomsg import Søcket

async def main():
    async with Søcket() as sock:
        await sock.bind('127.0.0.1', 25000)
        while True:
            await sock.send(time.ctime().encode())
            await asyncio.sleep(1)

asyncio.run(main())

The end that connects (the "client"):

import asyncio
from aiomsg import Søcket

async def main():
    async with Søcket() as sock:
        await sock.connect('127.0.0.1', 25000)
        async for msg in sock.messages():
            print(msg.decode())

asyncio.run(main())

Both are complete, runnable programs.

Development

This package uses uv and just. From this directory:

just sync     # create the venv with test + lint deps
just test     # run the test suite
just lint     # ruff check
just fmt      # ruff format

Releasing is documented in RELEASING.md.

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

aiomsg-2026.7.1.tar.gz (19.8 kB view details)

Uploaded Source

Built Distribution

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

aiomsg-2026.7.1-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file aiomsg-2026.7.1.tar.gz.

File metadata

  • Download URL: aiomsg-2026.7.1.tar.gz
  • Upload date:
  • Size: 19.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aiomsg-2026.7.1.tar.gz
Algorithm Hash digest
SHA256 3136017738ede6793b13a795e0c75ad43c6dd91eecf13ccb1ce21c9aa1151152
MD5 2739048d85044b45898770663cc47f17
BLAKE2b-256 30b9b036a622b5049d0a0675a724c18f651f6ebf96c187a2ec330334b62c321e

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiomsg-2026.7.1.tar.gz:

Publisher: release.yml on cjrh/aiomsg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aiomsg-2026.7.1-py3-none-any.whl.

File metadata

  • Download URL: aiomsg-2026.7.1-py3-none-any.whl
  • Upload date:
  • Size: 21.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aiomsg-2026.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f7fbb3e8ad9f5dddcbee2124691729aaa138b434b290cb2a284e01d7fcb7b75f
MD5 fb61d198aa6934e36fbebc9e32d80875
BLAKE2b-256 3a530ac6a6b7d3afb94c1d97c01103c9d0ce4c25c68caa41a5dfbc99f84ea87e

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiomsg-2026.7.1-py3-none-any.whl:

Publisher: release.yml on cjrh/aiomsg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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