PyO3 Native Extension Stubs¶
Low-level Rust classes and functions declared in PEP 561 .pyi stub files across Vertebra's compiled extension modules. Each extension is built with gil_used = false for free-threaded Python. Most applications use these through the higher-level vertebra, vertebra.server, vertebra.db, and vertebra.storage APIs.
| Native Module | Backing Crate | Scope |
|---|---|---|
vertebra._vertebra |
vertebra-py, vertebra-core, vertebra-http, vertebra-db |
Request and response views, protocol scopes, shared-memory cache, and core IPC bridge. |
vertebra._bundler |
vertebra-bundler |
Oxc and Rolldown asset bundling, QuickJS SSR pool, and .d.ts declaration generation. |
vertebra._storage |
vertebra-storage |
Sync and async object storage backed by Rust object_store and Tokio. |
vertebra._bigquery |
vertebra-bigquery |
BigQuery REST v2 queries and Storage Read/Write gRPC streams. |
vertebra._duckdb |
vertebra-duckdb |
Bundled DuckDB 2.0 client with shared-memory Arrow output. |
vertebra._mssql |
vertebra-mssql |
SQL Server TDS 7.4 client with bulk load and Arrow output. |
vertebra._mysql |
vertebra-mysql |
MySQL binary protocol client with Arrow output. |
vertebra._oracle |
vertebra-oracle |
Oracle 26ai Thin client, connection pools, and notification listeners. |
vertebra._postgres |
vertebra-postgres |
PostgreSQL Protocol 3.0 client, pools, COPY, pgoutput replication, and Arrow output. |
vertebra._spanner |
vertebra-spanner |
Cloud Spanner data and admin client. |
vertebra._sqlite |
vertebra-sqlite |
Bundled SQLite 3.45+ client with WAL pooling and Arrow output. |
vertebra._redis |
vertebra-redis |
RESP3 Redis client with client-side caching, Sentinel, and Cluster support. |
vertebra._valkey |
vertebra-valkey |
RESP3 Valkey client with hash-field expiration, client-side caching, Sentinel, and Cluster support. |
Core Runtime & Protocol Views¶
Request
¶
Attributes:
| Name | Type | Description |
|---|---|---|
body | bytes | None | |
body_view | memoryview | |
flags | int | |
handler_id | int | |
headers | Headers | |
http_version | str | |
method | str | |
path | str | |
query | str | None | |
raw_path | bytes | |
raw_query | bytes | |
request_id | int |
rsgi_scope
¶
Headers
¶
Response
¶
Attributes:
| Name | Type | Description |
|---|---|---|
body | bytes | |
headers | list[tuple[bytes, bytes]] | |
request_id | int | |
status | int |
RequestBatch
¶
AsgiScope
¶
RsgiScope
¶
Attributes:
| Name | Type | Description |
|---|---|---|
authority | str | None | |
client | str | |
headers | Headers | |
http_version | str | |
method | str | |
path | str | |
proto | str | |
query_string | str | |
root_path | str | |
rsgi_version | str | |
scheme | str | |
server | str |
WsgiEnviron
¶
ShmCache
¶
Cross-worker POSIX shared-memory key-value cache with optimistic seqlock reads and CLOCK eviction.
Attributes:
| Name | Type | Description |
|---|---|---|
capacity | int |
ShmCacheStats
¶
Hit/miss, set, and eviction counters for a shared-memory ShmCache.
Attributes:
| Name | Type | Description |
|---|---|---|
capacity | int | Total slot capacity of the cache. |
max_entries | int | Configured maximum entries in the cache. |
capacity_bytes | int | Total allocated capacity in bytes. |
hits | int | Cumulative cache lookup hits. |
misses | int | Cumulative cache lookup misses. |
sets | int | Cumulative cache set operations. |
evictions | int | Cumulative CLOCK-sweep cache evictions. |
expirations | int | Cumulative expired slot hits. |
Bundler & QuickJS SSR¶
BundleConfig
¶
Attributes:
| Name | Type | Description |
|---|---|---|
entry | str | |
outdir | str | |
minify | bool | |
sourcemap | bool | |
target | str |
BundleDevConfig
¶
Attributes:
| Name | Type | Description |
|---|---|---|
entry | str | |
watch_dirs | list[str] | |
hmr_port | int | |
extensions | list[str] | |
debounce_ms | int |
BundleResult
¶
Attributes:
| Name | Type | Description |
|---|---|---|
outputs | list[BundleOutput] | |
duration_ms | int | |
warnings | list[str] |
BundleOutput
¶
Attributes:
| Name | Type | Description |
|---|---|---|
path | str | |
size | int | |
is_entry | bool |
Bundler
¶
Attributes:
| Name | Type | Description |
|---|---|---|
config | BundleConfig | None | |
dev_config | BundleDevConfig | None |
SSRPool
¶
Attributes:
| Name | Type | Description |
|---|---|---|
generation | int | |
cache_len | int |
IsolatedDeclarationsGenerator
¶
Object Storage¶
StorageBuffer
¶
ObjectMeta
¶
Attributes:
| Name | Type | Description |
|---|---|---|
path | str | |
size | int | |
last_modified | str | |
etag | str | None | |
version | str | None | |
content_type | str | None | |
attributes | dict[str, str] | |
sha256 | str | None | |
crc32c | str | None | |
md5 | str | None |
SyncObjectStore
¶
Attributes:
| Name | Type | Description |
|---|---|---|
scheme | str | |
supports_atomic_rename | bool |
AsyncObjectStore
¶
put(path, data, *, content_type=None, attributes=None, if_not_exists=False, if_match=None, if_none_match=None, checksum=False, expected_sha256=None, expected_crc32c=None, expected_md5=None)
¶
get(path, *, expected_sha256=None)
¶
head(path)
¶
delete(path)
¶
list(prefix=None)
¶
copy(src, dst, *, if_not_exists=False)
¶
BigQuery & Spanner¶
SyncBigQueryClient
¶
Synchronous pure-Rust Google Cloud BigQuery REST v2 and Storage Read/Write client.
ca_pem applies to the REST API client; the Storage Read and Write API
clients use the system trust store and ignore it.
AsyncBigQueryClient
¶
Asynchronous pure-Rust Google Cloud BigQuery REST v2 and Storage Read/Write client.
ca_pem applies to the REST API client; the Storage Read and Write API
clients use the system trust store and ignore it.
SyncSpannerClient
¶
Synchronous Google Cloud Spanner client built on the official Rust client.
query and partitioned_query return columns, schema, rows,
row_count_exact, and row_count_lower_bound. ca_pem is accepted
only for non-googleapis https:// endpoints (Spanner Omni or private test
servers).
AsyncSpannerClient
¶
Asynchronous Google Cloud Spanner client built on the official Rust client.
query and partitioned_query return columns, schema, rows,
row_count_exact, and row_count_lower_bound. ca_pem is accepted
only for non-googleapis https:// endpoints (Spanner Omni or private test
servers).
DuckDB¶
SyncDuckDBClient
¶
Synchronous native DuckDB 2.0 client bridged via SyncCompletionQueue.
AsyncDuckDBClient
¶
Asynchronous native DuckDB 2.0 client bridged via AsyncCompletionQueue and Notifier.
SQL Database Drivers¶
Each SQL database extension exports GIL_USED = False and FREE_THREADED alongside its sync and async clients, connection pools, listeners, and replication types.
AsyncPostgresClient
¶
Asynchronous physical PostgreSQL Protocol 3.0 client.
AsyncPostgresReplication
¶
Dedicated non-pooled asynchronous PostgreSQL logical replication stream handle.
SyncOracleClient
¶
SyncMySQLClient
¶
SyncMSSQLClient
¶
SyncSQLiteClient
¶
Synchronous native SQLite 3.45+ client bridged via dedicated worker threads.
AsyncSQLiteClient
¶
Asynchronous native SQLite 3.45+ client bridged via Tokio and completion drainer.
Redis & Valkey Drivers¶
vertebra._redis and vertebra._valkey expose sync and async clients, pub/sub listeners, and pipelines with RESP3 framing, client-side caching invalidations, Sentinel, and Cluster routing. vertebra._valkey adds Valkey 9.0 hash-field expiration and CLIENT CAPA redirect.
AsyncRedisClient
¶
SyncRedisClient
¶
AsyncValkeyClient
¶
Asynchronous pure-Rust Valkey 8.0+/9.0 client backed by Tokio completion queue.
SyncValkeyClient
¶
Synchronous pure-Rust Valkey 8.0+/9.0 client releasing the GIL across I/O.