Skip to main content

Pure Python wire protocol implementation for dqlite

Project description

dqlite-wire

Pure-Python codec for the dqlite wire protocol — encode and decode the messages a dqlite server speaks.

dqlite is Canonical's distributed SQLite, built on Raft. This package implements the bytes-on-the-wire layer: it turns request/response objects into frames and back, following the official wire-protocol specification. It does no networking, pooling, or SQL — just framing.

Is this the package you want?

Probably not, unless you are building a driver or doing wire-level work (a proxy, traffic capture/replay, a custom client). If you just want to run SQL against dqlite from Python, use one of the higher layers — see The dqlite Python stack below.

Installation

pip install dqlite-wire

Requires Python 3.13+.

Usage

from dqlitewire import encode_message, decode_message
from dqlitewire.messages import LeaderRequest

# Encode a request to bytes
data = encode_message(LeaderRequest())

# Decode bytes back into a message object
message = decode_message(data, is_request=True)

The dqlite Python stack

This is the lowest of four layered packages. Each builds on the one below:

Package Role
sqlalchemy-dqlite SQLAlchemy 2.0 dialect
dqlite-dbapi PEP 249 (DB-API 2.0) driver — sync & async
dqlite-client Async wire client — pooling, leader discovery
dqlite-wire — this package Wire-protocol codec

Most applications should use dqlite-dbapi or sqlalchemy-dqlite.

Documentation

Development

See DEVELOPMENT.md for setup and contribution guidelines.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dqlite_wire-0.3.0.tar.gz (245.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dqlite_wire-0.3.0-py3-none-any.whl (59.4 kB view details)

Uploaded Python 3

File details

Details for the file dqlite_wire-0.3.0.tar.gz.

File metadata

  • Download URL: dqlite_wire-0.3.0.tar.gz
  • Upload date:
  • Size: 245.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dqlite_wire-0.3.0.tar.gz
Algorithm Hash digest
SHA256 db3465333293d7f429fd029c0730da039763e72c0db9a719cd855fd7d5e3ca26
MD5 16b802a5afd240a34e673e62b923d10d
BLAKE2b-256 0078ba0457cb7cd3eb0a57e0fe1396871c02ddb9e51e7fde861fec936471a9ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for dqlite_wire-0.3.0.tar.gz:

Publisher: publish-to-pypi.yml on letsdiscodev/python-dqlite-wire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dqlite_wire-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: dqlite_wire-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 59.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dqlite_wire-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 433e67832bb47c8bfdbbfec77ac28531881e83caa06c1b4bacd54c451d8a3e33
MD5 bbe9c5f0c271cdc0b9c8c5859d09d7b3
BLAKE2b-256 b08c325f2cfb93fb23c811e99834085592128e36507e492d92a6d01f6bfa3112

See more details on using hashes here.

Provenance

The following attestation bundles were made for dqlite_wire-0.3.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on letsdiscodev/python-dqlite-wire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page