sqlspec-asyncpg

Installation
SKILL.md

SQLSpec AsyncPG Adapter

Read .claude/skills/sqlspec_adapters/asyncpg.md for Claude's adapter playbook and docs/guides/adapters/asyncpg.md for project documentation.

Where to look

  • Adapter implementation: sqlspec/adapters/asyncpg/ (config.py, driver.py, _typing.py)
  • Parameter profiles: sqlspec/core/parameters.py (asyncpg profile + statement config helpers)
  • Driver bases and mixins: sqlspec/driver/ and sqlspec/driver/mixins/
  • Tests: tests/integration/test_adapters/test_asyncpg/ and tests/integration/test_stack_edge_cases.py
  • Claude and specs references: .claude/AGENTS.md, .claude/skills/README.md, specs/AGENTS.md, specs/guides/quality-gates.yaml

How it works

  • Parameter Style: Asyncpg uses PostgreSQL positional placeholders ($1, $2, ...), not named placeholders. SQLSpec should support translating both automatically using the parameter profile.
  • Use config classes to map connection_config, driver_features, and statement config; register via SQLSpec.add_config().
  • Override _connection_in_transaction() with direct attribute access (uses connection.is_in_transaction().).
  • Flow parameter styles through StatementConfig from the driver profile; adapter guides describe defaults and overrides.
  • Execute stacks with StatementStack using adapter-native pipeline when available, otherwise fall back to sequential execution.
Installs
1
Repository
cofin/flow
GitHub Stars
15
First Seen
Mar 17, 2026
sqlspec-asyncpg — cofin/flow