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
- Thread-safety — codec objects are single-owner; read this before sharing one.
- Divergences from upstream — the defensive caps and stricter validations this codec adds on top of the C server and go-dqlite.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db3465333293d7f429fd029c0730da039763e72c0db9a719cd855fd7d5e3ca26
|
|
| MD5 |
16b802a5afd240a34e673e62b923d10d
|
|
| BLAKE2b-256 |
0078ba0457cb7cd3eb0a57e0fe1396871c02ddb9e51e7fde861fec936471a9ac
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dqlite_wire-0.3.0.tar.gz -
Subject digest:
db3465333293d7f429fd029c0730da039763e72c0db9a719cd855fd7d5e3ca26 - Sigstore transparency entry: 1700269544
- Sigstore integration time:
-
Permalink:
letsdiscodev/python-dqlite-wire@5d49e8fa6da6847f57b7c14b27171e4a48311fa6 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/letsdiscodev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@5d49e8fa6da6847f57b7c14b27171e4a48311fa6 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
433e67832bb47c8bfdbbfec77ac28531881e83caa06c1b4bacd54c451d8a3e33
|
|
| MD5 |
bbe9c5f0c271cdc0b9c8c5859d09d7b3
|
|
| BLAKE2b-256 |
b08c325f2cfb93fb23c811e99834085592128e36507e492d92a6d01f6bfa3112
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dqlite_wire-0.3.0-py3-none-any.whl -
Subject digest:
433e67832bb47c8bfdbbfec77ac28531881e83caa06c1b4bacd54c451d8a3e33 - Sigstore transparency entry: 1700269611
- Sigstore integration time:
-
Permalink:
letsdiscodev/python-dqlite-wire@5d49e8fa6da6847f57b7c14b27171e4a48311fa6 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/letsdiscodev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@5d49e8fa6da6847f57b7c14b27171e4a48311fa6 -
Trigger Event:
push
-
Statement type: