Skip to main content

pyStream

Python implementation of stream library for parsing all files encoded by stream and writing protobuf instances into the file by using the same encoding.

Installation

You can install pyStream using pip:

pip install pystream-protobuf

Examples

Here’s a sample code using the Stream class to read a file (so-called GAM file) containing a set of VG’s Alignment objects (defined here). It yields the protobuf objects stored in the file:

import stream
import vg_pb2

alns_list = []
with stream.open("test.gam", "rb") as istream:
    for data in istream:
        aln = vg_pb2.Alignment()
        aln.ParseFromString(data)
        alns_list.append(aln)

Or

import stream
import vg_pb2

alns_list = []
istream = stream.open("test.gam", "rb")
for data in istream:
    aln = vg_pb2.Alignment()
    aln.ParseFromString(data)
    alns_list.append(aln)
istream.close()

And here is another sample code for writing multiple protobuf objects into a file (here a GAM file):

import stream

with stream.open("test.gam", "wb") as ostream:
    ostream.write(*objects_list)
    ostream.write(*another_objects_list)

Or

import stream

ostream = stream.open("test.gam", "wb")
ostream.write(*objects_list)
ostream.write(*another_objects_list)
ostream.close()

Metadata

Release files for pystream-protobuf 1.1.4

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

Source distribution (sdist)

Source distribution for pystream-protobuf 1.1.4
File Size Uploaded Provenance Actions
pystream-protobuf-1.1.4.tar.gz 9.8 kB Without provenance Details for pystream-protobuf-1.1.4.tar.gz

Release files / pystream-protobuf-1.1.4.tar.gz

Download URL pystream-protobuf-1.1.4.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
572c282862b39edb1bd32a1afe8b195e66ea9e2a3f7c0b86bb85d446486ea4c4
BLAKE2b-256 checksum
How to use checksums
d51a55d3636055608815c478e1c8fdebff3eb4e28baa2bde631d4736070c0a22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pystream-protobuf 1.1.4

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