Psycopg 3 – PostgreSQL database adapter for Python¶

Psycopg 3 is a newly designed PostgreSQL database adapter for the Python programming language.

Psycopg 3 presents a familiar interface for everyone who has used Psycopg 2 or any other DB-API 2.0 database adapter, but allows to use more modern PostgreSQL and Python features, such as:

  • asynchronous support

  • server-side parameters binding

  • prepared statements

  • binary communication

  • great COPY support

  • support for static typing

  • a redesigned connection pool

  • direct access to the libpq functionalities

Documentation¶

  • Getting started with Psycopg 3
    • Installation
    • Basic module usage
    • Passing parameters to SQL queries
    • Adapting basic Python types
    • Adapting other PostgreSQL types
    • Transaction management
    • Using COPY TO and COPY FROM
    • Differences from psycopg2
  • More advanced topics
    • Asynchronous operations
    • Static Typing
    • Row factories
    • Connection pools
    • Cursor types
    • Data adaptation configuration
    • Prepared statements
  • Psycopg 3 API
    • The psycopg module
    • Connection classes
    • Cursor classes
    • sql – SQL string composition
    • rows – row factory implementations
    • errors – Package exceptions
    • conninfo – manipulate connection strings
    • adapt – Types adaptation
    • types – Types information and adapters
    • abc – Psycopg abstract classes
    • pq – libpq wrapper module
    • psycopg_pool – Connection pool implementations
    • _dns – DNS resolution utilities
  • Release notes
    • Current release
    • psycopg 3.0

Indices and tables¶

  • Index

  • Module Index

psycopg

Navigation

  • Getting started with Psycopg 3
  • More advanced topics
  • Psycopg 3 API
  • Release notes

Related Topics

  • Documentation overview
    • Next: Getting started with Psycopg 3

Quick search

©2020-2022, Daniele Varrazzo and The Psycopg Team. | Powered by Sphinx 4.5.0 & Alabaster 0.7.12 | Page source