### Project Dependencies - Python Source: https://github.com/sqlc-dev/sqlc-gen-python/blob/main/examples/requirements.txt Specifies the necessary Python packages and their versions. Includes dependencies for testing (pytest, pytest-asyncio), synchronous PostgreSQL access (psycopg2-binary), asynchronous PostgreSQL access (asyncpg), and the SQLAlchemy ORM. ```Python pytest~=6.2.2 pytest-asyncio~=0.14.0 psycopg2-binary~=2.8.6 asyncpg~=0.21.0 sqlalchemy==1.4.0 ``` -------------------------------- ### Configuring sqlc-gen-python Plugin in sqlc.yaml Source: https://github.com/sqlc-dev/sqlc-gen-python/blob/main/README.md This YAML configuration block shows how to integrate the sqlc-gen-python plugin into your sqlc project, specifying the plugin source (WASM URL and SHA256), schema/query paths, database engine, and output directory with plugin-specific options. ```yaml version: "2" plugins: - name: py wasm: url: https://downloads.sqlc.dev/plugin/sqlc-gen-python_1.3.0.wasm sha256: fbedae96b5ecae2380a70fb5b925fd4bff58a6cfb1f3140375d098fbab7b3a3c sql: - schema: "schema.sql" queries: "query.sql" engine: postgresql codegen: - out: src/authors plugin: py options: package: authors emit_sync_querier: true emit_async_querier: true ``` -------------------------------- ### Emitting Pydantic Models with sqlc-gen-python Source: https://github.com/sqlc-dev/sqlc-gen-python/blob/main/README.md This Python snippet demonstrates the structure of generated models when the `emit_pydantic_models` option is enabled, showing a class inheriting from `pydantic.BaseModel`. ```python from pydantic import BaseModel class Author(pydantic.BaseModel): id: int name: str ``` -------------------------------- ### Default Dataclass Model Output (sqlc-gen-python) Source: https://github.com/sqlc-dev/sqlc-gen-python/blob/main/README.md This Python snippet shows the default structure of generated models when the `emit_pydantic_models` option is not enabled, using Python's built-in `dataclasses`. ```python import dataclasses @dataclasses.dataclass() class Author: id: int name: str ``` -------------------------------- ### Emitting enum.StrEnum with sqlc-gen-python Source: https://github.com/sqlc-dev/sqlc-gen-python/blob/main/README.md This Python snippet illustrates the generated enum class structure when the `emit_str_enum` option is enabled, showing the enum inheriting from `enum.StrEnum`. ```python class Status(enum.StrEnum): """Venues can be either open or closed""" OPEN = "op!en" CLOSED = "clo@sed" ``` -------------------------------- ### Default Enum Output (sqlc-gen-python) Source: https://github.com/sqlc-dev/sqlc-gen-python/blob/main/README.md This Python snippet shows the default generated enum class structure when the `emit_str_enum` option is not enabled, using a standard `(str, enum.Enum)` inheritance. ```python class Status(str, enum.Enum): """Venues can be either open or closed""" OPEN = "op!en" CLOSED = "clo@sed" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.