Skip to main content

psycopg2 - Python-PostgreSQL Database Adapter

Project description

Psycopg is the most popular PostgreSQL database adapter for the Python programming language. Its main features are the complete implementation of the Python DB API 2.0 specification and the thread safety (several threads can share the same connection). It was designed for heavily multi-threaded applications that create and destroy lots of cursors and make a large number of concurrent “INSERT”s or “UPDATE”s.

Psycopg 2 is mostly implemented in C as a libpq wrapper, resulting in being both efficient and secure. It features client-side and server-side cursors, asynchronous communication and notifications, “COPY TO/COPY FROM” support. Many Python types are supported out-of-the-box and adapted to matching PostgreSQL data types; adaptation can be extended and customized thanks to a flexible objects adaptation system.

Psycopg 2 is both Unicode and Python 3 friendly.

Documentation

Documentation is included in the doc directory and is available online.

For any other resource (source code repository, bug tracker, mailing list) please check the project homepage.

Installation

Building Psycopg requires a few prerequisites (a C compiler, some development packages): please check the install and the faq documents in the doc dir or online for the details.

If prerequisites are met, you can install psycopg like any other Python package, using pip to download it from PyPI:

$ pip install psycopg2

or using setup.py if you have downloaded the source package locally:

$ python setup.py build
$ sudo python setup.py install

You can also obtain a stand-alone package, not requiring a compiler or external libraries, by installing the psycopg2-binary package from PyPI:

$ pip install psycopg2-binary

The binary package is a practical choice for development and testing but in production it is advised to use the package built from sources.

Build status:

Build status

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

psycopg2-2.9.11.tar.gz (379.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

psycopg2-2.9.11-cp314-cp314-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.14Windows x86-64

psycopg2-2.9.11-cp313-cp313-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.13Windows x86-64

psycopg2-2.9.11-cp312-cp312-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.12Windows x86-64

psycopg2-2.9.11-cp311-cp311-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.11Windows x86-64

psycopg2-2.9.11-cp310-cp310-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.10Windows x86-64

psycopg2-2.9.11-cp39-cp39-win_amd64.whl (2.7 MB view details)

Uploaded CPython 3.9Windows x86-64

File details

Details for the file psycopg2-2.9.11.tar.gz.

File metadata

  • Download URL: psycopg2-2.9.11.tar.gz
  • Upload date:
  • Size: 379.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for psycopg2-2.9.11.tar.gz
Algorithm Hash digest
SHA256 964d31caf728e217c697ff77ea69c2ba0865fa41ec20bb00f0977e62fdcc52e3
MD5 ea0f76b3d0358db5d8ff84e18c4a7252
BLAKE2b-256 898d9d12bc8677c24dad342ec777529bce705b3e785fa05d85122b5502b9ab55

See more details on using hashes here.

File details

Details for the file psycopg2-2.9.11-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: psycopg2-2.9.11-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 2.8 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for psycopg2-2.9.11-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 f10a48acba5fe6e312b891f290b4d2ca595fc9a06850fe53320beac353575578
MD5 72dd8a76f30d5d9f1a15e2d2bf37c0bf
BLAKE2b-256 4708737aa39c78d705a7ce58248d00eeba0e9fc36be488f9b672b88736fbb1f7

See more details on using hashes here.

File details

Details for the file psycopg2-2.9.11-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: psycopg2-2.9.11-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for psycopg2-2.9.11-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8dc379166b5b7d5ea66dcebf433011dfc51a7bb8a5fc12367fa05668e5fc53c8
MD5 a5d947951c57bc413e555e63dd671f17
BLAKE2b-256 885a18c8cb13fc6908dc41a483d2c14d927a7a3f29883748747e8cb625da6587

See more details on using hashes here.

File details

Details for the file psycopg2-2.9.11-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: psycopg2-2.9.11-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for psycopg2-2.9.11-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e03e4a6dbe87ff81540b434f2e5dc2bddad10296db5eea7bdc995bf5f4162938
MD5 bedaa8a54a9534a6f71a1c943e4a4506
BLAKE2b-256 b5bf635fbe5dd10ed200afbbfbe98f8602829252ca1cce81cc48fb25ed8dadc0

See more details on using hashes here.

File details

Details for the file psycopg2-2.9.11-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: psycopg2-2.9.11-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for psycopg2-2.9.11-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 210daed32e18f35e3140a1ebe059ac29209dd96468f2f7559aa59f75ee82a5cb
MD5 c2ba87cc95ca334365834765a3cd7712
BLAKE2b-256 86fed6dce306fd7b61e312757ba4d068617f562824b9c6d3e4a39fc578ea2814

See more details on using hashes here.

File details

Details for the file psycopg2-2.9.11-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: psycopg2-2.9.11-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for psycopg2-2.9.11-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 103e857f46bb76908768ead4e2d0ba1d1a130e7b8ed77d3ae91e8b33481813e8
MD5 955afa2c3391f74a7e216e2a779823e5
BLAKE2b-256 e3bab7672ed9d0be238265972ef52a7a8c9e9e815ca2a7dc19a1b2e4b5b637f0

See more details on using hashes here.

File details

Details for the file psycopg2-2.9.11-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: psycopg2-2.9.11-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for psycopg2-2.9.11-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6ecddcf573777536bddfefaea8079ce959287798c8f5804bee6933635d538924
MD5 b7661981241e6a06c8d10ef0fd099517
BLAKE2b-256 3db7c6a246f96c0fcfeca7d45ee215e5d1f728dc9485fd0f8ae832f383cb1874

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page