Skip to content

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

Bases: Struct

Configuration controlling zero-code-change Litestar accelerations and runtime hooks.

VertebraPlugin

Litestar plugin enabling zero-GIL Rust offload, direct handler dispatch, and CLI lifespans.

Attributes:

Name Type Description
configVertebraConfig

Return the active VertebraConfig.

offload_planOffloadPlan | None

Return the compiled OffloadPlan after app initialization.

compiled_routesdict[int, CompiledRoute]

Return pre-compiled direct-dispatch route descriptors indexed by handler_id.

router_tableAny

Return the extracted router table if fastpath bypass is enabled.

on_app_init

on_app_init(app_config)

Intercept CompressionConfig and CORSConfig before Litestar builds its routing trie.

ensure_finalized

ensure_finalized(app)

Idempotently finalize route compilation, fastpath binding, and offload JSON on app.

on_cli_init

on_cli_init(cli)

Override Litestar's default run command so litestar run launches the Vertebra supervisor.

server_lifespan

server_lifespan(app)

Ensure acceleration state is finalized when entering Litestar's server lifespan.

RouteCompiler

Bases: BaseRouteCompiler

Compiler extracting Litestar v2 and v3 route handlers into a RouterTable.

compile

compile(app)

Compile all HTTP routes on the given Litestar application into a RouterTable.

extract_entries

extract_entries(app)

Return all extracted route descriptors as a list.

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.

get_content

get_content(path, *, options=None)

Read full object bytes synchronously.

get_content_async

get_content_async(path, *, options=None)

Read full object bytes asynchronously.

delete_object

delete_object(paths)

Delete one or more stored objects synchronously.

delete_object_async

delete_object_async(paths)

Delete one or more stored objects asynchronously.

SyncBrokerPool

Bases: Pool

Synchronous SQLAlchemy Pool leasing connections per config pool_key() partition.

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
islandsdict[str, ApexIslandSpec]

Return registered island specifications keyed by region_static_id.

register

register(spec)

Register an ApexIslandSpec for an APEX region static ID.

render_island_html

render_island_html(region_static_id, context=None, *, extra_props=None)

Render a <vertebra-island> HTML element hydrated with bound APEX page items.

sync_context_to_live_state

sync_context_to_live_state(context, state, *, item_to_field_map=None)

Push ApexSessionContext.page_items into a LiveState instance.

sync_live_state_to_context

sync_live_state_to_context(state, context, *, field_to_item_map)

Project LiveState fields back into an updated ApexSessionContext.

ApexGateway

Exposes Oracle APEX page processes, regions, and ORDS services as MCP tools and A2A skills.

register_skill

register_skill(skill, tool_spec)

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.

build_agent_card

build_agent_card()

Publish the A2A v1.0 AgentCard for this Oracle APEX gateway.

build_mcp_tools

build_mcp_tools()

Return the registered executable MCP tool definitions.

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
methodsdict[str, GrpcMethodSpec]

Return a mapping of full gRPC HTTP/2 paths to GrpcMethodSpec definitions.

register_proto_codec

register_proto_codec(message_type, encoder, decoder)

Register explicit Protobuf wire encoder/decoder callables for a message class.

register

register(handler)

Register a @grpc_method-decorated callable and return its GrpcMethodSpec.

handle_asgi

handle_asgi(scope, receive, send)

Dispatch an inbound ASGI HTTP/2 gRPC request and emit LPM frames plus trailers.

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.

LeaseQuarantinedError

Bases: VertebraError

Raised when attempting to use or release a quarantined connection lease slot.