Skip to main content

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:

at your option.

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

vibesql-0.1.3.tar.gz (2.3 MB view details)

Uploaded Source

Built Distributions

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

vibesql-0.1.3-cp39-abi3-win_amd64.whl (5.7 MB view details)

Uploaded CPython 3.9+Windows x86-64

vibesql-0.1.3-cp39-abi3-manylinux_2_38_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.38+ x86-64

vibesql-0.1.3-cp39-abi3-manylinux_2_35_aarch64.whl (6.4 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.35+ ARM64

vibesql-0.1.3-cp39-abi3-macosx_11_0_arm64.whl (5.8 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

vibesql-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl (6.1 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file vibesql-0.1.3.tar.gz.

File metadata

  • Download URL: vibesql-0.1.3.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for vibesql-0.1.3.tar.gz
Algorithm Hash digest
SHA256 46442529ac4647161fe8fdfd892ec1e3b96262d34fa572ca1585258f65c58b92
MD5 3fbf97ed8b63927b6d1a5e7a6d27999e
BLAKE2b-256 dbe3bc3002bbe03de2b152686c19dc23839a45606c10dd79d1a7e26ee50d58ce

See more details on using hashes here.

Provenance

The following attestation bundles were made for vibesql-0.1.3.tar.gz:

Publisher: release-pypi.yml on rjwalters/vibesql

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

File details

Details for the file vibesql-0.1.3-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: vibesql-0.1.3-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 5.7 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

Hashes for vibesql-0.1.3-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 65d013da0e9709f5a1ce0aa40d20a9a745eb7d098d15b3ed245e60d23a3ba4d4
MD5 83068f308403b0e1b0bbc28f4bdc357d
BLAKE2b-256 612788fc5a1d39191a91ec4092aac96a46ca617bb7d2fc7f6f2adfae990975b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for vibesql-0.1.3-cp39-abi3-win_amd64.whl:

Publisher: release-pypi.yml on rjwalters/vibesql

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

File details

Details for the file vibesql-0.1.3-cp39-abi3-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for vibesql-0.1.3-cp39-abi3-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 3dea830d2a114f41eac74225b3c218a281711f9d0cd237d658efd5f5451dac61
MD5 77c3427d92f76019dcfa2b22f2f88512
BLAKE2b-256 a5052b43117354b0793b10365cce9296a9c54bacde6a7f3381490729c550b1f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for vibesql-0.1.3-cp39-abi3-manylinux_2_38_x86_64.whl:

Publisher: release-pypi.yml on rjwalters/vibesql

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

File details

Details for the file vibesql-0.1.3-cp39-abi3-manylinux_2_35_aarch64.whl.

File metadata

File hashes

Hashes for vibesql-0.1.3-cp39-abi3-manylinux_2_35_aarch64.whl
Algorithm Hash digest
SHA256 65fe315ba0ebab2abb77bb6ab040c2c957f5b4bd8eb634cc67fb4ab7a50142ba
MD5 4aa88392760b946de37363961ac412ea
BLAKE2b-256 dbf5e96bd89421e8adc9a4e5715e0df32d463c30204d16082588ea4d93976e81

See more details on using hashes here.

Provenance

The following attestation bundles were made for vibesql-0.1.3-cp39-abi3-manylinux_2_35_aarch64.whl:

Publisher: release-pypi.yml on rjwalters/vibesql

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

File details

Details for the file vibesql-0.1.3-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for vibesql-0.1.3-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1c5bc3c3e0e6d846020ea6bff4c453a61e8f72ce45f0a69bae6f47258a650312
MD5 bae710ea454fd74c8d88ac25a63f49b1
BLAKE2b-256 7943b675476eda051e7c83ea52a4327ea5fed4b2fdd50f051469711eb6a48c23

See more details on using hashes here.

Provenance

The following attestation bundles were made for vibesql-0.1.3-cp39-abi3-macosx_11_0_arm64.whl:

Publisher: release-pypi.yml on rjwalters/vibesql

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

File details

Details for the file vibesql-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for vibesql-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5cad62d91ce6c6443d025e9678cb7b014cbb9e01b1b83c0247ae0b49981d2da6
MD5 df71d92d2df2466fe7869715c68c2970
BLAKE2b-256 e481513c823fefee30d74b72da3a78d7eadc7cf33492c2b8aee940b4fc756eeb

See more details on using hashes here.

Provenance

The following attestation bundles were made for vibesql-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl:

Publisher: release-pypi.yml on rjwalters/vibesql

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