Framework & Data Extensions¶
vertebra.extensions connects Vertebra's HTTP and IPC runtime to Litestar, Starlette, FastAPI, Flask, Django, SQLSpec, SQLAlchemy, Advanced Alchemy, Oracle APEX, gRPC services, and shared-memory database session brokers. See Framework Extensions for integration guides.
| Extension | Purpose |
|---|---|
| Litestar | Mount Litestar apps on Vertebra, replace litestar run, and compile static routes into the Rust router. |
| Litestar Ecosystem | Optional plugins under vertebra.extensions.litestar.* for queues, security, autowire, email, MCP, and Vite. |
| SQLSpec | Per-engine sqlspec>=0.74.1 adapters, data dictionaries, event and session stores, statement stacks, and object-store Arrow streaming. |
| SQLAlchemy & Alchemy | Sync and async +vtb dialects, broker-backed pools, multi-tier cache regions, request-scoped sessions, and file attachment storage. |
| Django 6.0+ | Database backends for PostgreSQL, MySQL, Oracle, SQLite, and Spanner, plus cache, object storage, and Arrow query support. |
| Oracle APEX | Reverse-proxy ORDS and APEX sessions, verify session state, and hydrate TypeScript UI islands. |
| gRPC & SHM Broker | Dispatch HTTP/2 gRPC methods and share connection pools and statement caches across workers over shared memory. |
Litestar Integration¶
VertebraConfig
¶
VertebraPlugin
¶
Litestar plugin enabling zero-GIL Rust offload, direct handler dispatch, and CLI lifespans.
Attributes:
| Name | Type | Description |
|---|---|---|
config | VertebraConfig | Return the active VertebraConfig. |
offload_plan | OffloadPlan | None | Return the compiled OffloadPlan after app initialization. |
compiled_routes | dict[int, CompiledRoute] | Return pre-compiled direct-dispatch route descriptors indexed by handler_id. |
router_table | Any | Return the extracted router table if fastpath bypass is enabled. |
on_app_init
¶
Intercept CompressionConfig and CORSConfig before Litestar builds its routing trie.
ensure_finalized
¶
Idempotently finalize route compilation, fastpath binding, and offload JSON on app.
on_cli_init
¶
Override Litestar's default run command so litestar run launches the Vertebra supervisor.
server_lifespan
¶
Ensure acceleration state is finalized when entering Litestar's server lifespan.
RouteCompiler
¶
SQLSpec Integration¶
SyncAdapterConfig
¶
Bases: SyncDatabaseConfig[ConnectionT, PoolT, DriverT], _AdapterLifecycleMixin
Synchronous SQLSpec database configuration backed by a Vertebra native driver.
AsyncAdapterConfig
¶
Bases: AsyncDatabaseConfig[ConnectionT, PoolT, DriverT], _AdapterLifecycleMixin
Asynchronous SQLSpec database configuration backed by a Vertebra native driver.
ObjectStoreBackend
¶
Bases: ObjectStoreBase
SQLSpec ObjectStoreBase implementation backed by Vertebra's native ObjectStore.
ProxySyncConfig
¶
Bases: _BaseProxyConfig, SyncDatabaseConfig[Any, Any, Any]
Generic synchronous SQLSpec proxy configuration preserving inner SyncConfigT types.
ProxyAsyncConfig
¶
Bases: _BaseProxyConfig, AsyncDatabaseConfig[Any, Any, Any]
Generic asynchronous SQLSpec proxy configuration preserving inner AsyncConfigT types.
SQLSpecSyncProvider
¶
Bases: _BaseSQLSpecProvider
Synchronous host provider executing SQLSpec driver operations over pinned broker leases and Arrow SHM.
SQLSpecAsyncProvider
¶
Bases: _BaseSQLSpecProvider
Asynchronous host provider executing SQLSpec driver operations over pinned broker leases and Arrow SHM.
SQLAlchemy & Advanced Alchemy¶
ObjectStoreBackend
¶
Bases: StorageBackend
Advanced Alchemy StorageBackend delegating zero-copy and async I/O to ObjectStore instances.
save_object
¶
save_object(
file_object,
data,
*,
use_multipart=None,
chunk_size=5 * 1024 * 1024,
max_concurrency=12,
checksum=False,
expected_sha256=None,
expected_crc32c=None,
expected_md5=None,
)
Persist a FileObject payload synchronously and populate size, etag, and last_modified.
save_object_async
¶
save_object_async(
file_object,
data,
*,
use_multipart=None,
chunk_size=5 * 1024 * 1024,
max_concurrency=12,
checksum=False,
expected_sha256=None,
expected_crc32c=None,
expected_md5=None,
)
Persist a FileObject payload asynchronously and populate size, etag, and last_modified.
save_arrow
¶
save_arrow(
path,
data,
*,
format=None,
file_format=None,
batch_size=65536,
schema=None,
options=None,
checksum=False,
expected_sha256=None,
expected_crc32c=None,
expected_md5=None,
**codec_options,
)
Stream an Arrow Table, RecordBatch, or batch iterable directly to storage synchronously.
save_arrow_async
¶
save_arrow_async(
path,
data,
*,
format=None,
file_format=None,
batch_size=65536,
schema=None,
options=None,
checksum=False,
expected_sha256=None,
expected_crc32c=None,
expected_md5=None,
**codec_options,
)
Stream an Arrow Table, RecordBatch, or batch iterable directly to storage asynchronously.
SyncBrokerPool
¶
AsyncBrokerPool
¶
Bases: SyncBrokerPool
Asynchronous SQLAlchemy Pool coordinating async greenlet checkouts with SHM broker leases.
broker_creator
¶
broker_creator(
url,
*,
broker,
share_pool=False,
is_async=False,
connect_fn=None,
**connect_kwargs,
)
Build a zero-argument SQLAlchemy connection creator bound to url and broker.
SyncCacheRegion
¶
Bases: _BaseCacheRegion
Synchronous cache region implementing Advanced Alchemy's SyncCacheRegionProtocol.
AsyncCacheRegion
¶
Bases: _BaseCacheRegion
Asynchronous cache region implementing Advanced Alchemy's AsyncCacheRegionProtocol.
CacheBackend
¶
Bases: BaseCache
Drop-in Django cache backend backed by SyncCacheStore and AsyncCacheStore.
Oracle APEX Gateway & Island Bridge¶
ApexIslandRegistry
¶
Renders <vertebra-island> mounts and synchronizes APEX page items with LiveState.
Attributes:
| Name | Type | Description |
|---|---|---|
islands | dict[str, ApexIslandSpec] | Return registered island specifications keyed by |
ApexGateway
¶
Exposes Oracle APEX page processes, regions, and ORDS services as MCP tools and A2A skills.
register_skill
¶
Register an APEX/ORDS capability as both an A2A skill and an MCP tool.
register_page_tool
¶
register_page_tool(
page_tool,
*,
policy=None,
pool=None,
context=None,
amount=0.0,
required_scheme=None,
)
Register an Oracle APEX page process as both an MCP tool and an A2A skill.
register_plsql_tool
¶
register_plsql_tool(
package_procedure,
description,
input_schema,
policy,
pool,
context,
*,
is_mutating=False,
amount=0.0,
required_scheme=None,
)
Register an executable Tool calling execute_plsql_process under APEX access policy.
register_ords_tool
¶
register_ords_tool(
service_alias,
description,
input_schema,
policy,
*,
bearer_token="",
context=None,
is_mutating=False,
amount=0.0,
required_scheme=None,
)
Register an executable Tool calling execute_ords_rest under APEX access policy.
execute_plsql_process
¶
execute_plsql_process(
pool,
policy,
context,
package_procedure,
binds,
*,
is_mutating=False,
amount=0.0,
required_scheme=None,
confirmation_token=None,
trace_id=None,
span_id=None,
)
Execute an Oracle APEX PL/SQL package/process inside a scoped APEX session.
execute_ords_rest
¶
execute_ords_rest(
policy,
service_alias,
payload,
*,
bearer_token,
context=None,
is_mutating=False,
amount=0.0,
required_scheme=None,
confirmation_token=None,
)
Execute an Oracle ORDS REST endpoint or 26ai Duality View action with policy checks.
gRPC Wire Framing & SHM Broker¶
GrpcServiceRegistry
¶
Registry and ASGI dispatcher for @grpc_method handlers.
Attributes:
| Name | Type | Description |
|---|---|---|
methods | dict[str, GrpcMethodSpec] | Return a mapping of full gRPC HTTP/2 paths to GrpcMethodSpec definitions. |
BrokerPlugin
¶
Plugin managing shared database connection broker and statement cache.
BrokerHost
¶
Host supervisor owning broker SHM, UDS attachment, and crashed-worker session recovery.
BrokerEngineDiscovery
¶
Discover optional native database extensions and register their C-ABI capsules.
SyncSHMBrokerTransport
¶
Bases: _BaseSHMBrokerTransport
Production synchronous shared-memory connection broker and statement cache transport.