| description | vgi-python API reference — functions, arguments, worker, client, catalogs, state storage, filter pushdown, auth, and observability. |
|---|
New to VGI? Follow this path:
- Pick a function pattern —
ScalarFunction,TableFunctionGenerator,TableInOutFunction, orAggregateFunction(Functions) - Declare arguments —
Param,ConstParam,Returns,TableInput(Arguments & Schema) - Host them in a worker — subclass
Worker, thenvgi-serveit over stdio or HTTP (Worker & Serving) - Connect from DuckDB or Python — the DuckDB extension or the Python
Client(Client)
Everything else — catalogs, state storage, filter pushdown, auth, observability — is optional and added incrementally.
| Module | Description | Required? |
|---|---|---|
| Functions | ScalarFunction, TableFunctionGenerator, TableInOutFunction, AggregateFunction, Function |
Yes |
| Arguments & Schema | Param, ConstParam, Returns, TableInput, ArgumentSpec, schema |
Yes |
| Worker & Serving | Worker, the vgi-serve entry point |
Yes |
| Client | Client, ClientError, catalog client helpers |
If calling workers from Python |
| Catalogs | Catalog, Schema, Table, View, CatalogStorage |
If exposing a catalog |
| State Storage | FunctionStorage, SQLite / Azure SQL / Cloudflare DO backends |
If functions keep state |
| Metadata & Protocol | ResolvedMetadata, FunctionExample, FunctionStability, protocol types |
For introspection |
| Filter Pushdown | PushdownFilters, filter node types, deserialize_filters |
If accepting pushed-down filters |
| Auth & Secrets | AuthContext, CallContext, bearer/JWT authenticators, secret protocol |
HTTP: [http]; JWT: [oauth] |
| Observability | OpenTelemetry tracing, worker logging configuration | [otel] for tracing |
| HTTP | Worker page, blob storage, request-size middleware | pip install vgi-python[http] |
| Transactor | TransactorClient, TransactorProtocol |
[transactor] extra and a compatible engine build |
| Exceptions | VGI exception types | — |
The most common symbols are re-exported from the top-level vgi package:
from vgi import ScalarFunction, TableInOutFunction, AggregateFunction, Param, Returns, WorkerSubpackages (vgi.catalog, vgi.client, vgi.http, vgi.transactor) are imported explicitly.
Optional modules require their corresponding extras to be installed.