serp-io
File helpers for Serpentine, on top of the language's built-in text/binary file IO. Pure Serpentine ([P]) — the same source dual-runs under CPython.
Published on PyPI as serpentine-io (the serp-io name is rejected by PyPI as too
similar to an existing project); the import name is still serp_io:
serp add serpentine-io
pip install serpentine-io
from serp_io import read_bytes, write_bytes, read_lines, reader
write_bytes("blob.bin", b"\x00\x01\x02")
print(read_bytes("blob.bin"))
r = reader(b"hello world")
print(r.read(5)) # b'hello'
print(r.remaining()) # 6
API
read_bytes(path) -> bytes/write_bytes(path, data) -> int/append_bytes(path, data) -> intread_text(path) -> str/write_text(path, text) -> int/append_text(path, text) -> intread_lines(path) -> list[str]— splits on\n, strips trailing\r, drops the final empty linefile_size(path) -> int— byte lengthcopy_file(src, dst) -> int— byte-exact copyByteReader— position-tracked reads over bytes:read(n),read_all(),peek(n),seek(pos),skip(n),tell(),remaining(),at_eof()reader(data: bytes) -> ByteReader/file_reader(path) -> ByteReader
Divergence
Native text-mode IO reads and writes raw bytes (no \r\n translation),
while CPython's text mode performs universal-newline translation on
Windows. Text written and read back in the same world is identical; use
the binary helpers when exact on-disk bytes matter.
Metadata
Release files for serpentine-io 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| serpentine_io-0.1.0.tar.gz | 4.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| serpentine_io-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.0 kB
Release files / serpentine_io-0.1.0.tar.gz
| Download URL | serpentine_io-0.1.0.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
157321ef3c1fff81fa98a7b3730fafc30f5173a8777911e8e2e4121fb16cce75
|
|
BLAKE2b-256 checksum How to use checksums |
b5e08dafaec3e8d7b797f7ef048dcea6613c7abd8b550466b8d5ef1154354dab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 29, 2026.
Transparency logRelease files / serpentine_io-0.1.0-py3-none-any.whl
| Download URL | serpentine_io-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d47abc954d26181891ca993319547d5d3b056706d2e5ae6d930395409cc6d43
|
|
BLAKE2b-256 checksum How to use checksums |
485ee7a36998f836ceed81fab505455b30de4bf0706bef07a6306ace968a1de8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 29, 2026.
Transparency log