Skip to main content

Stream Infrastructure

% start synopsis % start main

This module provides base classes for handling data streams in a structured manner.

% end synopsis

Overview

This package implements infrastructure for building layered communication stacks:

  • BaseMsg - Message-based communication (Python objects)
  • BaseBlk - Block-based communication (delimited bytestrings)
  • BaseBuf - Buffer-based communication (undelimited bytestreams)

Layered Communication Stacks

Build communication stacks by layering protocols:

from moat.lib.stream import StackedBlk

class Compression(StackedBlk):
    async def snd(self, blk):
        compressed = compress(blk)
        await self.s.send(compressed)

    async def rcv(self):
        blk = await self.s.recv()
        return decompress(blk)

# Stack layers
link = SerialLink(cfg)  # BaseBuf
link = Packetizer(link, cfg)  # StackedBlk
link = Compressor(link, cfg)  # StackedBlk
link = Codec(link, cfg)  # StackedMsg
async with link:
    await link.send({"data": "hello"})

% end main

License

This project is part of the MoaT ecosystem and is licensed under the same terms.

Metadata

Release files for moat-lib-stream 0.3.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for moat-lib-stream 0.3.8
File Size Uploaded Provenance Actions
moat_lib_stream-0.3.8.tar.gz 27.7 kB Without provenance Details for moat_lib_stream-0.3.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for moat-lib-stream 0.3.8
File Interpreter ABI Platform Actions
moat_lib_stream-0.3.8-py3-none-any.whl Python 3 none any Details for moat_lib_stream-0.3.8-py3-none-any.whl

Total release size: 59.7 kB

Release files / moat_lib_stream-0.3.8.tar.gz

Download URL moat_lib_stream-0.3.8.tar.gz
Size 27.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2fb8de43565b3357758c3b3f5e56abd36439dc90781cd6fb075f986d9b76143a
BLAKE2b-256 checksum
How to use checksums
c1d540e51101b25e62653eef35c4f9b3b87af79934de08f8cf18745a8fe7e576
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / moat_lib_stream-0.3.8-py3-none-any.whl

Download URL moat_lib_stream-0.3.8-py3-none-any.whl
Size 32.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c00dddcb3ae6cc0dfa99de35933d3d87454635fd36c9f4f61c61e25db35812db
BLAKE2b-256 checksum
How to use checksums
02c57ae94955a5ba7f1a5311c946a6226cbadce5273df57827c8dc9cbb8c60f0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for moat-lib-stream 0.3.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page