Skip to main content

compas_pb

PyPI version Python versions License MIT Build Status Documentation Made with COMPAS

A COMPAS extension which lets you serialize and deserialize COMPAS Data types using protobuf.

Installation

Stable releases can be installed from PyPI.

pip install compas_pb

Basic Usage

Serialize to file

from compas.geometry import Vector
from compas_pb import pb_dump
from compas_pb import pb_load

PATH = "vector.data"

vector = Vector(1.0, 2.0, 3.0)

pb_dump(vector, PATH)

loaded_vector = pb_load(PATH)

(De)serialize to bytes

from compas.geometry import Vector
from compas_pb import pb_dump_bts
from compas_pb import pb_load_bts

vector = Vector(1.0, 2.0, 3.0)

bytes_vector = pb_dump_bts(vector)

loaded_vector = pb_load_bts(bytes_vector)

Serialization of arbitrarily nested data structures

from compas.geometry import Vector
from compas.geometry import Polyline
from compas_pb import pb_dump_bts
from compas_pb import pb_load_bts

data = {
    "direction": Vector(1.0, 2.0, 3.0),
    "outlines": 
        [
            Polyline([0, 0, 0], [1, 1, 1], [2, 2, 2]), 
            Polyline([3, 3, 3], [4, 4, 4], [5, 5, 5])
        ],
}

pb_data = pb_dump_bts(data)

loaded_data = pb_load_bts(pb_data)

Documentation

For further "getting started" instructions, a tutorial, examples, and an API reference, please check out the online documentation here: compas_pb docs

Issue Tracker

If you find a bug or if you have a problem with running the code, please file an issue on the Issue Tracker.

Maintainers

Releases are prepared and approved through pull requests. See RELEASING.md.

Release files for compas-pb 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 compas-pb 1.1.4
File Size Uploaded
compas_pb-1.1.4.tar.gz 44.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for compas-pb 1.1.4
File Interpreter ABI Platform
compas_pb-1.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 82.0 kB

Release files / compas_pb-1.1.4.tar.gz

Download URL compas_pb-1.1.4.tar.gz
Size 44.8 kB
Tags Source
SHA-256 checksum
How to use checksums
128d282b6a38edac90ec0ba5cc74e906946f0934c249982a33986655e1d351b3
BLAKE2b-256 checksum
How to use checksums
b33d06b0ee97c683ffd68baa1142515a86bba08cbf3e6383968ebc8bf8084ff6
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 Aug 13, 2026.

Transparency log

Release files / compas_pb-1.1.4-py3-none-any.whl

Download URL compas_pb-1.1.4-py3-none-any.whl
Size 37.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f6a82db011331ff18c688f483d4adecc8e817556a4ed2d85023f337f643cdc2c
BLAKE2b-256 checksum
How to use checksums
0b4dba953ba88a54008f7e8b746385cba3053d62deaf8a0ef7b7a6f498561fff
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 Aug 13, 2026.

Transparency log

Release history Release notifications | RSS feed

1.2.0

2 release files

This release

1.1.4 This release

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.5.0

2 release files

0.4.10

2 release files

0.4.9

2 release files

0.4.8

2 release files

0.4.7

2 release files

0.4.6

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

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