all-api-functions-support-pg-dispatch
IN premise
Every public API function (`export_markdown`, `import_json`, `import_beliefs`, `import_agent`, `sync_agent`, `hash_sources`, `check_stale`, `lookup`, `add_repo`, `list_repos`, `list_negative`) accepts `pg_conninfo`/`project_id` kwargs and routes to the corresponding `PgApi` method
Summary
All of the library's public-facing functions can be pointed at a PostgreSQL backend simply by passing connection and project parameters, so callers never need to instantiate the Postgres API class directly. This means switching from SQLite to Postgres requires no change in calling code beyond adding two keyword arguments.
Details
| Source | entries/2026/05/11/tests-test_pg_dispatch.md |