Optionaloptions: SqlGlotClientOptionsWhether the Python microservice is currently running
The port the Python microservice is listening on, or null if not running
Use GetDialects.
List all supported SQL dialects.
Use Health.
Check server health and return status information.
Parse SQL and return the AST as JSON.
Use Start.
Start the Python microservice. Resolves once the server is ready. If already running, this is a no-op.
Use Stop.
Stop the Python microservice. Resolves once the process has exited. If not running, this is a no-op.
Use Transpile.
Transpile SQL from one dialect to another. All statements are transpiled together as a batch.
Use TranspileStatements.
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