Optionaloptions: SqlGlotClientOptionsWhether the Python microservice is currently running
The port the Python microservice is listening on, or null if not running
List all supported SQL dialects.
Check server health and return status information.
Parse SQL and return the AST as JSON.
Start the Python microservice. Resolves once the server is ready. If already running, this is a no-op.
Stop the Python microservice. Resolves once the process has exited. If not running, this is a no-op.
Transpile SQL from one dialect to another. All statements are transpiled together as a batch.
Transpile SQL statement-by-statement. Each statement is transpiled individually, so one failure doesn't block others.
TypeScript client for the sqlglot Python microservice.
Spawns a Python FastAPI process on 127.0.0.1 with an ephemeral port, then communicates via HTTP. The lifecycle methods
start()andstop()manage the child process. Cleanup handlers are registered for SIGINT/SIGTERM.Example