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.

Linux/OSX:

Linux and OSX build status

Windows:

Windows build status

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.10.tar.gz (385.7 kB view details)

Uploaded Source

Built Distributions

psycopg2-2.9.10-cp312-cp312-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.12 Windows x86-64

psycopg2-2.9.10-cp312-cp312-win32.whl (1.0 MB view details)

Uploaded CPython 3.12 Windows x86

psycopg2-2.9.10-cp311-cp311-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.11 Windows x86-64

psycopg2-2.9.10-cp311-cp311-win32.whl (1.0 MB view details)

Uploaded CPython 3.11 Windows x86

psycopg2-2.9.10-cp310-cp310-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10 Windows x86-64

psycopg2-2.9.10-cp310-cp310-win32.whl (1.0 MB view details)

Uploaded CPython 3.10 Windows x86

psycopg2-2.9.10-cp39-cp39-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.9 Windows x86-64

psycopg2-2.9.10-cp39-cp39-win32.whl (1.0 MB view details)

Uploaded CPython 3.9 Windows x86

File details

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

File metadata

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

File hashes

Hashes for psycopg2-2.9.10.tar.gz
Algorithm Hash digest
SHA256 12ec0b40b0273f95296233e8750441339298e6a572f7039da5b260e3c8b60e11
MD5 3a1ed36b492a74789563577edc0b0689
BLAKE2b-256 62512007ea29e605957a17ac6357115d0c1a1b60c8c984951c19419b3474cdfd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for psycopg2-2.9.10-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4a579d6243da40a7b3182e0430493dbd55950c493d8c68f4eec0b302f6bbf20e
MD5 536de27cf5037935ce182a51185d8df4
BLAKE2b-256 66debaed128ae0fc07460d9399d82e631ea31a1f171c0c4ae18f9808ac6759e3

See more details on using hashes here.

File details

Details for the file psycopg2-2.9.10-cp312-cp312-win32.whl.

File metadata

  • Download URL: psycopg2-2.9.10-cp312-cp312-win32.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for psycopg2-2.9.10-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 65a63d7ab0e067e2cdb3cf266de39663203d38d6a8ed97f5ca0cb315c73fe067
MD5 28aa9ea28558c63b15e965df2b8051ea
BLAKE2b-256 3d164623fad6076448df21c1a870c93a9774ad8a7b4dd1660223b59082dd8fec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for psycopg2-2.9.10-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0435034157049f6846e95103bd8f5a668788dd913a7c30162ca9503fdf542cb4
MD5 691a7f5976fb71f1100812cc6d5dce3b
BLAKE2b-256 33395a9a229bb5414abeb86e33b8fc8143ab0aecce5a7f698a53e31367d30caa

See more details on using hashes here.

File details

Details for the file psycopg2-2.9.10-cp311-cp311-win32.whl.

File metadata

  • Download URL: psycopg2-2.9.10-cp311-cp311-win32.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for psycopg2-2.9.10-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 47c4f9875125344f4c2b870e41b6aad585901318068acd01de93f3677a6522c2
MD5 854e94968a556501434af5f9031fd5a6
BLAKE2b-256 20a2c51ca3e667c34e7852157b665e3d49418e68182081060231d514dd823225

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for psycopg2-2.9.10-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c6f7b8561225f9e711a9c47087388a97fdc948211c10a4bccbf0ba68ab7b3b5a
MD5 da4c234875748a29afaa22a129151980
BLAKE2b-256 4750c509e56f725fd2572b59b69bd964edaf064deebf1c896b2452f6b46fdfb3

See more details on using hashes here.

File details

Details for the file psycopg2-2.9.10-cp310-cp310-win32.whl.

File metadata

  • Download URL: psycopg2-2.9.10-cp310-cp310-win32.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for psycopg2-2.9.10-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 5df2b672140f95adb453af93a7d669d7a7bf0a56bcd26f1502329166f4a61716
MD5 8ffdc19f603ff4e6f61f44a74b2dc254
BLAKE2b-256 0aa9146b6bdc0d33539a359f5e134ee6dda9173fb8121c5b96af33fa299e50c4

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for psycopg2-2.9.10-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 88138c8dedcbfa96408023ea2b0c369eda40fe5d75002c0964c78f46f11fa442
MD5 350af411feefa1e65c9e5c395537905f
BLAKE2b-256 2cf80be7d99d24656b689d83ac167240c3527efb0b161d814fb1dd58329ddf75

See more details on using hashes here.

File details

Details for the file psycopg2-2.9.10-cp39-cp39-win32.whl.

File metadata

  • Download URL: psycopg2-2.9.10-cp39-cp39-win32.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for psycopg2-2.9.10-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 9d5b3b94b79a844a986d029eee38998232451119ad653aea42bb9220a8c5066b
MD5 d3206e7bddf068411c28b4c8cff5a2c0
BLAKE2b-256 5f29bc9639b9c50abd93a8274fd2deffbf70b2a65aa9e7881e63ea6bc4319e84

See more details on using hashes here.

Supported by

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