Python bindings for VibeSQL SQL database engine
Project description
vibesql-python-bindings
Python bindings for VibeSQL SQL database engine.
Overview
This crate provides Python bindings following DB-API 2.0 conventions, allowing VibeSQL to be used from Python applications for testing, benchmarking, and integration.
Features
- DB-API 2.0 Compliant: Standard Python database interface
- Type Conversions: Automatic conversion between Python and SQL types
- Connection Pooling: Efficient connection management
- Cursor Support: Full cursor API with fetchone/fetchmany/fetchall
- Performance Profiling: Built-in profiling utilities for benchmarking
- Native Speed: Zero-copy access to Rust implementation
Installation
pip install vibesql
Usage
import vibesql
# Create a connection
db = vibesql.connect()
# Get a cursor
cursor = db.cursor()
# Execute DDL
cursor.execute("CREATE TABLE users (id INTEGER PRIMARY KEY, name VARCHAR(50))")
# Insert data
cursor.execute("INSERT INTO users VALUES (1, 'Alice')")
cursor.execute("INSERT INTO users VALUES (2, 'Bob')")
# Query data
cursor.execute("SELECT * FROM users WHERE id > ?", [1])
result = cursor.fetchall()
print(result) # [(2, 'Bob')]
# Close connection
db.close()
Context Manager Support
import vibesql
with vibesql.connect() as db:
cursor = db.cursor()
cursor.execute("SELECT 1")
print(cursor.fetchone())
Building
Note: Python bindings are excluded from the default workspace build to avoid requiring Python development headers. To build the Python bindings, you need Python 3.8+ and development headers installed.
Prerequisites
macOS:
# Python 3.8+ should already include development headers
python3 --version # Verify Python is installed
Ubuntu/Debian:
sudo apt-get install python3-dev
Fedora/RHEL:
sudo dnf install python3-devel
Building the Package
# 1. Install maturin (Python packaging tool for Rust)
pip install maturin
# 2. Navigate to the Python bindings directory
cd crates/vibesql-python-bindings
# 3. Build and install for local development (recommended for testing)
maturin develop
# 4. Or build a wheel for distribution
maturin build --release
# Wheel will be in: target/wheels/vibesql-0.1.0-*.whl
# 5. Install the wheel
pip install target/wheels/vibesql-0.1.0-*.whl
Quick Build Script
From the repository root:
./scripts/build-python.sh
This script will:
- Check for Python development headers
- Install maturin if needed
- Build the wheel in release mode
- Show installation instructions
Building with Cargo (Advanced)
If you need to build as part of the workspace:
# From repository root
cargo build --package vibesql-python-bindings --release
Note: This only builds the Rust library, not the Python package. Use maturin for the full Python package.
Documentation
License
This project is licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT License (LICENSE-MIT)
at your option.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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 vibesql-0.1.2.tar.gz.
File metadata
- Download URL: vibesql-0.1.2.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8da57b0ca22034cb66f6048eb14d4125ae674204c41adde51d0f94d17c5e720a
|
|
| MD5 |
8ddd7f466de97d8e75a1e5a90d745af6
|
|
| BLAKE2b-256 |
5ca4dda35a01853485282f09c140ae810b44366ec86fd4fd46d17b35b7ae3cbe
|
Provenance
The following attestation bundles were made for vibesql-0.1.2.tar.gz:
Publisher:
release-pypi.yml on rjwalters/vibesql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vibesql-0.1.2.tar.gz -
Subject digest:
8da57b0ca22034cb66f6048eb14d4125ae674204c41adde51d0f94d17c5e720a - Sigstore transparency entry: 742658990
- Sigstore integration time:
-
Permalink:
rjwalters/vibesql@c94eace40f5da46d82efe1d8badefcf09fbb71e9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rjwalters
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@c94eace40f5da46d82efe1d8badefcf09fbb71e9 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file vibesql-0.1.2-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: vibesql-0.1.2-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 5.2 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2e9872fe63bad3f547bd72bcfddde3d325ce92f5a3a25122017e5e739ae877a
|
|
| MD5 |
673ef514c00716d2f0e900fd81cd803b
|
|
| BLAKE2b-256 |
b71c30ffda1524c5c9275f10ecb7e53cf7201ca04b7112e93191cd32262c8f9d
|
Provenance
The following attestation bundles were made for vibesql-0.1.2-cp39-abi3-win_amd64.whl:
Publisher:
release-pypi.yml on rjwalters/vibesql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vibesql-0.1.2-cp39-abi3-win_amd64.whl -
Subject digest:
b2e9872fe63bad3f547bd72bcfddde3d325ce92f5a3a25122017e5e739ae877a - Sigstore transparency entry: 742658996
- Sigstore integration time:
-
Permalink:
rjwalters/vibesql@c94eace40f5da46d82efe1d8badefcf09fbb71e9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rjwalters
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@c94eace40f5da46d82efe1d8badefcf09fbb71e9 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file vibesql-0.1.2-cp39-abi3-manylinux_2_38_x86_64.whl.
File metadata
- Download URL: vibesql-0.1.2-cp39-abi3-manylinux_2_38_x86_64.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 3.9+, manylinux: glibc 2.38+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
036d10a2beab3cb0108b07d24f1ce5cad75e9439e37958d42bed5b0d444c0291
|
|
| MD5 |
84b7bcaa7d61d2ea572d29338deb241a
|
|
| BLAKE2b-256 |
31ad0a023dafdcd6bcb1791db03b320fdf2cb33790bf329020289ca5ea9b6980
|
Provenance
The following attestation bundles were made for vibesql-0.1.2-cp39-abi3-manylinux_2_38_x86_64.whl:
Publisher:
release-pypi.yml on rjwalters/vibesql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vibesql-0.1.2-cp39-abi3-manylinux_2_38_x86_64.whl -
Subject digest:
036d10a2beab3cb0108b07d24f1ce5cad75e9439e37958d42bed5b0d444c0291 - Sigstore transparency entry: 742659006
- Sigstore integration time:
-
Permalink:
rjwalters/vibesql@c94eace40f5da46d82efe1d8badefcf09fbb71e9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rjwalters
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@c94eace40f5da46d82efe1d8badefcf09fbb71e9 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file vibesql-0.1.2-cp39-abi3-manylinux_2_35_aarch64.whl.
File metadata
- Download URL: vibesql-0.1.2-cp39-abi3-manylinux_2_35_aarch64.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.9+, manylinux: glibc 2.35+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63f29c2dceac96708762c67fe3f253f56a5f8bd29b51e1326905419419ff450a
|
|
| MD5 |
fec3b4c2bfba5e511f2a179d83680c5a
|
|
| BLAKE2b-256 |
fa9b23fc2523fa23b139b8e4d33df219df80090e9299e6d20d6fdeee4246a46b
|
Provenance
The following attestation bundles were made for vibesql-0.1.2-cp39-abi3-manylinux_2_35_aarch64.whl:
Publisher:
release-pypi.yml on rjwalters/vibesql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vibesql-0.1.2-cp39-abi3-manylinux_2_35_aarch64.whl -
Subject digest:
63f29c2dceac96708762c67fe3f253f56a5f8bd29b51e1326905419419ff450a - Sigstore transparency entry: 742659008
- Sigstore integration time:
-
Permalink:
rjwalters/vibesql@c94eace40f5da46d82efe1d8badefcf09fbb71e9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rjwalters
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@c94eace40f5da46d82efe1d8badefcf09fbb71e9 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file vibesql-0.1.2-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: vibesql-0.1.2-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 5.3 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f4c51c3d6d536bba179c1807440c6fcf6132a6886e5726c159ff42ee8ef0822
|
|
| MD5 |
5aeb4a79e897da693c4941395de44170
|
|
| BLAKE2b-256 |
916894c2056f0de82459742820e71386385a980be361944493ec0a8d538e35f8
|
Provenance
The following attestation bundles were made for vibesql-0.1.2-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
release-pypi.yml on rjwalters/vibesql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vibesql-0.1.2-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
9f4c51c3d6d536bba179c1807440c6fcf6132a6886e5726c159ff42ee8ef0822 - Sigstore transparency entry: 742659010
- Sigstore integration time:
-
Permalink:
rjwalters/vibesql@c94eace40f5da46d82efe1d8badefcf09fbb71e9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rjwalters
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@c94eace40f5da46d82efe1d8badefcf09fbb71e9 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file vibesql-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: vibesql-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 5.7 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab42baabd19f931e5a663b0faab51fb5ab30443da02bf9622b48a328d715ceff
|
|
| MD5 |
2acdbc68bd213f0835a8be68f1dca413
|
|
| BLAKE2b-256 |
ddb9c74438896fcdf264684d16df8fdcd371cd11fd427503df56fc186c5a5d29
|
Provenance
The following attestation bundles were made for vibesql-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
release-pypi.yml on rjwalters/vibesql
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vibesql-0.1.2-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
ab42baabd19f931e5a663b0faab51fb5ab30443da02bf9622b48a328d715ceff - Sigstore transparency entry: 742658999
- Sigstore integration time:
-
Permalink:
rjwalters/vibesql@c94eace40f5da46d82efe1d8badefcf09fbb71e9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/rjwalters
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@c94eace40f5da46d82efe1d8badefcf09fbb71e9 -
Trigger Event:
workflow_dispatch
-
Statement type: