Skip to main content
# pyStream
Python implementation of [stream library](https://github.com/vgteam/stream)
for parsing all files encoded by stream and writing protobuf instances into the
file by using the same encoding.

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](https://github.com/vgteam/vg)'s Alignment objects
(defined [here](https://github.com/vgteam/vg/blob/master/src/vg.proto)). It
yields the protobuf objects stored in the file:

```python
alns_list = []
with Stream.open("test.gam", "rb") as stream:
for aln_data in stream:
aln = Alignment()
aln.ParseFromString(aln_data)
alns_list.append(aln)
```

Or

```python
alns_list = []
stream = Stream.open("test.gam", "rb")
for aln_data in stream:
aln = Alignment()
aln.ParseFromString(aln_data)
alns_list.append(aln)
stream.close()
```

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

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

Or

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

Metadata

Release files for pystream-protobuf 0.9.2

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 0.9.2
File Size Uploaded Provenance Actions
pystream-protobuf-0.9.2.tar.gz 9.4 kB Without provenance Details for pystream-protobuf-0.9.2.tar.gz

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

Download URL pystream-protobuf-0.9.2.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
de872384f53079f640dd0d9a7ae5241405c9555ace4358a639e8592b6b9fa2c5
BLAKE2b-256 checksum
How to use checksums
53d045b0e552cbb7e75ada20d8d516adbbe7f8094f7b5ee0c83faa2fa6070fea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pystream-protobuf 0.9.2

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