Skip to content
This repository was archived by the owner on Sep 23, 2024. It is now read-only.

Latest commit

 

History

History
38 lines (30 loc) · 976 Bytes

File metadata and controls

38 lines (30 loc) · 976 Bytes

sqlc-gen-python-orm

sqlc-gen-python-orm is a plugin for sqlc that generates an ORM (now, support SQLAlchemy only) for Python.

This softwaer forked from sqlc-gen-python and modified to generate ORM.

Usage

get sha256 hash of wasm file

curl -sSL https://github.com/veltiosoft/sqlc-gen-python-orm/releases/download/v0.0.1/sqlc-gen-python-orm.wasm.sha256

add plugin to sqlc.yaml

version: '2'
plugins:
- name: py
  wasm:
    url: https://github.com/veltiosoft/sqlc-gen-python-orm/releases/download/v0.0.1/sqlc-gen-python-orm.wasm
    sha256: <sha256 hash>
sql:
- schema: "schema.sql"
  queries: "query.sql"
  engine: postgresql
  codegen:
  - out: src/authors
    plugin: py
    options:
      package: .
      emit_sync_querier: true
      emit_async_querier: true

Refs