Skip to content

Playground ↗

Loading Python suggestions Loading editors

Tables schema.py

Loading tables editor

Query query.py

Loading query editor

Loading SQL view
Parameters[] schema.py → pysely typgen → schema.pyi → query.py

Try it

  1. Edit a table or column in Tables.
  2. Write a query in Query and use the editor's suggestions.
  3. Choose a dialect and press Run to inspect SQL and bound parameters.
  4. Open schema.pyi to see the generated types.

Run compiles SQL; it does not send queries to a database. The example's run_query function demonstrates result typing but is not executed.

What happens when you edit?

  • Schema edits regenerate the adjacent .pyi stub with pysely typgen.
  • Pyright reads the stub for completion and type errors.
  • Python executes handwritten schema.py, never the stub.

There is no generated runtime module. Diagnostics come from stock Pyright in standard mode; Pysely does not hide or rewrite them.

Set up the same workflow locally →