API reference

Generated from the docstrings. Each page documents exactly its module’s __all__ — the supported surface Versioning.md promises to keep across 1.x. The map of the library:

  • psycodict — the package root: __version__ and the names re-exported for convenience (DelayCommit and the SQL composition classes SQL, Identifier, Placeholder, Literal, Composable, Composed).

  • psycodict.databasePostgresDatabase, the connection object; access a table canonically as db[name]. Attribute access db.<name> is shorthand for the same lookup when the table name is not shadowed by a real attribute or method of the database object.

  • psycodict.searchtablePostgresSearchTable, the read API (search, lucky, lookup, count, random, …) driven by the query dictionaries of the query language.

  • psycodict.tablePostgresTable, the write and schema half (row writes, bulk file import/export, reloads, indexes, columns); base class of the search table.

  • psycodict.statstablePostgresStatsTable, precomputed counts and statistics, available as table.stats.

  • psycodict.encoding — value conversion between Python and PostgreSQL, including the file formats used by the bulk operations.

  • psycodict.config — configuration discovery and parsing (config.ini, command-line arguments, $PSYCODICT_CONFIG).

  • psycodict.grantsGrantPolicy, the privileges the relations psycodict creates come into existence with.

  • psycodict.utilsDelayCommit and other helpers shared across the library.

  • psycodict.notifications — LISTEN/NOTIFY support: schema-change announcements and a small publish/subscribe primitive.

  • psycodict.dbdiff — comparing the contents of two databases.

  • psycodict.slowlog — parsing and reporting on the slow-query log.

  • psycodict.validation — what psycodict checks before putting it into a statement: the column types it will create, the identifiers it will name a relation with, and the index and constraint definitions it will build DDL from.

  • psycodict.basePostgresBase, the shared execution and logging plumbing underneath everything else.