sqlc-gen-better-python

module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2025 License: MIT

README

sqlc-gen-better-python

A WASM plugin for SQLC allowing the generation of Python code.

[!NOTE]
This is currently being worked on. It is far from being ready for any kind of release, let alone a stable one.
Please wait for the v1 release; before that, this plugin is likely to not work.

Feature Support

Every sqlc macro is supported. The supported query commands depend on the SQL driver you are using, supported commands are listed below.

Every :batch* command is not supported by this plugin and probably will never be.

Prepared Queries are not planned for the near future, but will be implemented sooner or later

[!NOTE]
Asyncpg only has very bad support until now. It doesn't support :execresult, :execrows and :execlastid

:exec :execresult :execrows :execlastid :many :one :copyfrom
aiosqlite yes yes yes yes yes yes no
sqlite3 yes yes yes yes yes yes no
asyncpg yes no no no yes yes no
psycopg2 no no no no no no no
mysql no no no no no no no

Development

A roadmap of what is planned & worked on can be found here

Changelog

Can be found here

Credits

Because of missing documentation about creating these plugins, this work is heavily inspired by:

Special thanks to tandemdude for anwsering my questions on discord.

Directories

Path Synopsis
core
Package core Auto-generated using python; DO NOT EDIT py 3.13.1 (tags/v3.13.1:0671451, Dec 3 2024, 19:06:28) [MSC v.1942 64 bit (AMD64)]
Package core Auto-generated using python; DO NOT EDIT py 3.13.1 (tags/v3.13.1:0671451, Dec 3 2024, 19:06:28) [MSC v.1942 64 bit (AMD64)]
log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL