Skip to main content

openbyd

An unofficial client for the BYD overseas app API, written in Rust, with Python bindings.

openbyd is a port of pyBYD. pyBYD stays the reference: every piece ported here is tested against it, and the pyBYD commit openbyd currently matches is recorded in parity/UPSTREAM_COMMIT.

This project is not affiliated with, endorsed by or supported by BYD.

Status

Early. What exists today:

Part State
Envelope cipher (openbyd-crypto) Done, matches pyBYD byte for byte
Python package (openbyd) Cipher only
Drop-in speed-up for pyBYD Done, see below
Signing, models, HTTP client, MQTT, commands Not started

Speed up pyBYD today

pyBYD encrypts every request and decrypts every reply with a table-driven cipher written in Python. A 2 KB request and reply cost it about 130 ms of CPU, during which the event loop is blocked. openbyd does the same work in under half a millisecond and releases the GIL while it runs.

from openbyd import pybyd_accel

pybyd_accel.install()  # call once, before creating a BydClient

install() returns True when pyBYD is using the Rust cipher. It first checks that pyBYD's tables are the ones built into openbyd and that both ciphers give the same answer on a self-test. If either check fails it changes nothing and returns False. A client given its own table file keeps using pyBYD's code.

Use the cipher directly

Python:

import openbyd

envelope = openbyd.encode_envelope('{"hello":"world"}')
plaintext = openbyd.decode_envelope(envelope)

Rust:

let envelope = openbyd_crypto::encode_envelope(br#"{"hello":"world"}"#);
let plaintext = openbyd_crypto::decode_envelope(&envelope)?;

Build from source

You need a Rust toolchain and Python 3.11 or newer.

python -m venv .venv
.venv/bin/pip install maturin pytest
.venv/bin/maturin develop --release

Tests

cargo test -p openbyd-crypto   # Rust, against vectors recorded from pyBYD
pytest                         # Python bindings, same vectors

With pyBYD installed, pytest also compares openbyd against it on random inputs, and checks that the recorded vectors are still what pyBYD produces:

pip install "pybyd @ git+https://github.com/jkaberg/pyBYD@$(cat parity/UPSTREAM_COMMIT)"
pytest

To follow upstream, change parity/UPSTREAM_COMMIT, reinstall pyBYD, and run python parity/gen_bangcle_vectors.py. Any test that then fails marks behaviour that changed upstream.

Credits

  • pyBYD by Joel Kåberg and contributors, which this project ports.
  • Niek/BYD-re, the reverse-engineering work pyBYD builds on.

Licence

MIT. See LICENSE.

Metadata

Release files for openbyd 0.0.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 openbyd 0.0.1
File Size Uploaded Provenance Actions
openbyd-0.0.1.tar.gz 587.0 kB With provenance Details for openbyd-0.0.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for openbyd 0.0.1
File Actions
openbyd-0.0.1-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for openbyd-0.0.1-cp311-abi3-win_amd64.whl
openbyd-0.0.1-cp311-abi3-musllinux_1_2_x86_64.whl CPython 3.11 abi3 Linux musl 1.2+ x86-64 Details for openbyd-0.0.1-cp311-abi3-musllinux_1_2_x86_64.whl
openbyd-0.0.1-cp311-abi3-musllinux_1_2_aarch64.whl CPython 3.11 abi3 Linux musl 1.2+ ARM64 Details for openbyd-0.0.1-cp311-abi3-musllinux_1_2_aarch64.whl
openbyd-0.0.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.11 abi3 Linux glibc 2.17+ x86-64 Details for openbyd-0.0.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
openbyd-0.0.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.11 abi3 Linux glibc 2.17+ ARM64 Details for openbyd-0.0.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
openbyd-0.0.1-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for openbyd-0.0.1-cp311-abi3-macosx_11_0_arm64.whl
openbyd-0.0.1-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details for openbyd-0.0.1-cp311-abi3-macosx_10_12_x86_64.whl

Total release size: 6.2 MB

Release files / openbyd-0.0.1.tar.gz

Download URL openbyd-0.0.1.tar.gz
Size 587.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7c49638fcdd789b46eb92eed4f267559945bea98964f20a87583c8cc33e7b40b
BLAKE2b-256 checksum
How to use checksums
fa6eb17fc9290de9b8df2f98777de44be7574674caf8ab34de63a9f2553a225c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 19, 2026.

Transparency log

Release files / openbyd-0.0.1-cp311-abi3-win_amd64.whl

Download URL openbyd-0.0.1-cp311-abi3-win_amd64.whl
Size 672.0 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
f20f9b5cfadc60107fb89ae243076baeed1bfe9c02ce68a3fa9e033e7725af16
BLAKE2b-256 checksum
How to use checksums
a53153fb2e2ff606fd4ecb4c9d407c3640435cc15d289bdd4d9178721cc6ff18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 19, 2026.

Transparency log

Release files / openbyd-0.0.1-cp311-abi3-musllinux_1_2_x86_64.whl

Download URL openbyd-0.0.1-cp311-abi3-musllinux_1_2_x86_64.whl
Size 974.2 kB
Tags CPython 3.11 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
c858d61b7d8bd9dfc562b1daae6ba79cf36dce2fd38be5e51a847688d13bd55d
BLAKE2b-256 checksum
How to use checksums
743f94e5cb80975703ca897af206637854d759031bd6ea6f356fa4ef18cba4ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 19, 2026.

Transparency log

Release files / openbyd-0.0.1-cp311-abi3-musllinux_1_2_aarch64.whl

Download URL openbyd-0.0.1-cp311-abi3-musllinux_1_2_aarch64.whl
Size 933.9 kB
Tags CPython 3.11 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
7f728816c487c45351a469d70dcdf4a880f641128927af5dda8218287ccfb35f
BLAKE2b-256 checksum
How to use checksums
0d76c94fd4fa30dc84978b54a53df3e234c570fbece712162bcc38bc5bb2a8d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 19, 2026.

Transparency log

Release files / openbyd-0.0.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL openbyd-0.0.1-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 757.0 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
29454301c3118a946876f0cc857a9f55715ead1b38a6590b5fb12bf237d13a04
BLAKE2b-256 checksum
How to use checksums
af4340181a74d3fe42be5f16d1edaf202bfa9aa6e3ce7c276f82bf96f410f635
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 19, 2026.

Transparency log

Release files / openbyd-0.0.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL openbyd-0.0.1-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 755.1 kB
Tags CPython 3.11 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
7df56c4aa956e296c6dc1c06374d6449a87d9cc91538b01e1a315d123347c166
BLAKE2b-256 checksum
How to use checksums
bbe4a5404ad7898f3ccf7602d48b9f0a7ff9167e5aa104b51eb110f349a1fd13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 19, 2026.

Transparency log

Release files / openbyd-0.0.1-cp311-abi3-macosx_11_0_arm64.whl

Download URL openbyd-0.0.1-cp311-abi3-macosx_11_0_arm64.whl
Size 748.6 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fa82e5c540f22c70ef445d27274718dfcd9b51221f3be483e00121053d2cd664
BLAKE2b-256 checksum
How to use checksums
be29019c738e8c84610f7f4d979ccf40056fbd8cb81d0d4e2fbad7798d168956
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 19, 2026.

Transparency log

Release files / openbyd-0.0.1-cp311-abi3-macosx_10_12_x86_64.whl

Download URL openbyd-0.0.1-cp311-abi3-macosx_10_12_x86_64.whl
Size 748.2 kB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
ab3e15ba602774c84235aff57b6f35bd0ab199e05a674c6b0946690001ac49df
BLAKE2b-256 checksum
How to use checksums
1030232967b98d48d83de147e2e5bb9475fb7072e3d7d5fccb1bdd81f0ed0ec7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 19, 2026.

Transparency log

Security for openbyd 0.0.1

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.

Full provenance

All 8 files in this release have been uploaded with provenance metadata.

Select from 8 files

Attestation for openbyd-0.0.1.tar.gz

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 Nov 19, 2026.

Transparency log

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