Skip to main content

lil_buff_writer

A simple writing utility for storing and retrieving messages.

Messages are formated as such <name: bytes><delimiter: bytes><size: u32><content: bytes> This archive format aims to be light weight and easy to use.

Instead of writing out many files, you can pack them into one file. Writing out a stream of messages to a single blob allows you to write to a single destination instead of searching for files later.

Features

  • Write messages to a file with labeled names and content.
  • Parse each of the messages from a stream.

Installation

pip install lil_buff_writer

Usage

Writing Messages

Using Python

from lil_buff_writer import write_messages

messages = [(b"greeting", b"Hello, World!"), (b"farewell", b"Goodbye!")]
await write_messages(messages, "messages.dat")

Using the Command Line

python -m lil_buff_writer test.bin --encode file0.txt file1.md ...

Reading Messages

Using Python

from lil_buff_writer import read_messages

with open("messages.dat", "rb") as f:
    for name, content in read_messages(f):
        print(f"{name.decode()}: {content.decode()}")

Using the Command Line

python -m lil_buff_writer test.bin --decode [output_dir]

License

Apache-2.0

Release files for lil-buff-writer 0.1.1

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

Source distribution (sdist)

Source distribution for lil-buff-writer 0.1.1
File Size Uploaded
lil_buff_writer-0.1.1.tar.gz 8.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lil-buff-writer 0.1.1
File Interpreter ABI Platform
lil_buff_writer-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 16.3 kB

Release files / lil_buff_writer-0.1.1.tar.gz

Download URL lil_buff_writer-0.1.1.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5c36e9b650bc5aff6a3b87e2f954ab6b1e21b64dcbf696b6ae94ac920fbc9abb
BLAKE2b-256 checksum
How to use checksums
062bbf2ebc54dc1a516040dd77ed648e25ffb657c04f1560f4e25044ea44c97b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 3, 2025.

Transparency log

Release files / lil_buff_writer-0.1.1-py3-none-any.whl

Download URL lil_buff_writer-0.1.1-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79ba8f00439626e037a97076e420021e954a490457b8d4bac6d984eecd266a57
BLAKE2b-256 checksum
How to use checksums
d1735fc0248e6108d44681cb85cacdd69bd1d2fc67567cad2ecdbeaeb8395890
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 3, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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