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
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 Distribution
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3136017738ede6793b13a795e0c75ad43c6dd91eecf13ccb1ce21c9aa1151152
|
|
| MD5 |
2739048d85044b45898770663cc47f17
|
|
| BLAKE2b-256 |
30b9b036a622b5049d0a0675a724c18f651f6ebf96c187a2ec330334b62c321e
|
Provenance
The following attestation bundles were made for aiomsg-2026.7.1.tar.gz:
Publisher:
release.yml on cjrh/aiomsg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiomsg-2026.7.1.tar.gz -
Subject digest:
3136017738ede6793b13a795e0c75ad43c6dd91eecf13ccb1ce21c9aa1151152 - Sigstore transparency entry: 2138669772
- Sigstore integration time:
-
Permalink:
cjrh/aiomsg@9c245862d1422f728ad9929f000458da7a745e08 -
Branch / Tag:
refs/tags/v2026.7.1 - Owner: https://github.com/cjrh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9c245862d1422f728ad9929f000458da7a745e08 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f7fbb3e8ad9f5dddcbee2124691729aaa138b434b290cb2a284e01d7fcb7b75f
|
|
| MD5 |
fb61d198aa6934e36fbebc9e32d80875
|
|
| BLAKE2b-256 |
3a530ac6a6b7d3afb94c1d97c01103c9d0ce4c25c68caa41a5dfbc99f84ea87e
|
Provenance
The following attestation bundles were made for aiomsg-2026.7.1-py3-none-any.whl:
Publisher:
release.yml on cjrh/aiomsg
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aiomsg-2026.7.1-py3-none-any.whl -
Subject digest:
f7fbb3e8ad9f5dddcbee2124691729aaa138b434b290cb2a284e01d7fcb7b75f - Sigstore transparency entry: 2138669841
- Sigstore integration time:
-
Permalink:
cjrh/aiomsg@9c245862d1422f728ad9929f000458da7a745e08 -
Branch / Tag:
refs/tags/v2026.7.1 - Owner: https://github.com/cjrh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@9c245862d1422f728ad9929f000458da7a745e08 -
Trigger Event:
push
-
Statement type: