Skip to main content

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

Metadata

Release files for psycopg2 2.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for psycopg2 2.8
File Size Uploaded Provenance Actions
psycopg2-2.8.tar.gz 367.5 kB Without provenance Details for psycopg2-2.8.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for psycopg2 2.8
File Actions
psycopg2-2.8-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details for psycopg2-2.8-cp37-cp37m-win_amd64.whl
psycopg2-2.8-cp37-cp37m-win32.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-32 Details for psycopg2-2.8-cp37-cp37m-win32.whl
psycopg2-2.8-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details for psycopg2-2.8-cp36-cp36m-win_amd64.whl
psycopg2-2.8-cp36-cp36m-win32.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-32 Details for psycopg2-2.8-cp36-cp36m-win32.whl
psycopg2-2.8-cp35-cp35m-win_amd64.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-64 Details for psycopg2-2.8-cp35-cp35m-win_amd64.whl
psycopg2-2.8-cp35-cp35m-win32.whl CPython 3.5 CPython 3.5 pymalloc Windows x86-32 Details for psycopg2-2.8-cp35-cp35m-win32.whl
psycopg2-2.8-cp34-cp34m-win_amd64.whl CPython 3.4 CPython 3.4 pymalloc Windows x86-64 Details for psycopg2-2.8-cp34-cp34m-win_amd64.whl
psycopg2-2.8-cp34-cp34m-win32.whl CPython 3.4 CPython 3.4 pymalloc Windows x86-32 Details for psycopg2-2.8-cp34-cp34m-win32.whl
psycopg2-2.8-cp27-cp27m-win_amd64.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-64 Details for psycopg2-2.8-cp27-cp27m-win_amd64.whl
psycopg2-2.8-cp27-cp27m-win32.whl CPython 2.7 CPython 2.7 pymalloc Windows x86-32 Details for psycopg2-2.8-cp27-cp27m-win32.whl

Total release size: 8.8 MB

Release files / psycopg2-2.8.tar.gz

Download URL psycopg2-2.8.tar.gz
Size 367.5 kB
Tags Source
SHA-256 checksum
How to use checksums
49c5838d90e83217909db3789d30a105385b5e696ec5168cda645546c542f35a
BLAKE2b-256 checksum
How to use checksums
c7ca75236b17f1b951950ffc55d657c5aa408d3d0327a1b6c4c0f7cb16ef7e7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15rc1

Release files / psycopg2-2.8-cp37-cp37m-win_amd64.whl

Download URL psycopg2-2.8-cp37-cp37m-win_amd64.whl
Size 912.6 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
bc7ec9ab1f33edd5db40edfb407aabdc92e573c4fcacd9093a9a6f3dd93c7af2
BLAKE2b-256 checksum
How to use checksums
58aa57a5c0dbc12fdd6c8b1059c2bf504ac1d7db7c517c41352e14c32149be10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15rc1

Release files / psycopg2-2.8-cp37-cp37m-win32.whl

Download URL psycopg2-2.8-cp37-cp37m-win32.whl
Size 769.1 kB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
e9836455931ac3d91b71312fa3bb2b9db8c42720a53b7de7db082406e4828585
BLAKE2b-256 checksum
How to use checksums
0761d67e55269fba553efd6af89c7c2eea7fd97a472aa1708751108e3419715d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15rc1

Release files / psycopg2-2.8-cp36-cp36m-win_amd64.whl

Download URL psycopg2-2.8-cp36-cp36m-win_amd64.whl
Size 912.6 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
6d849117337afd1aa0a74ab9a6c9d2160228d25d5babfa4d9a98bf4a4dad8062
BLAKE2b-256 checksum
How to use checksums
d4116c1ed50a1ea955d7c42a673b7f658459a76f4e58b96c6984ab4b2a5e5111
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15rc1

Release files / psycopg2-2.8-cp36-cp36m-win32.whl

Download URL psycopg2-2.8-cp36-cp36m-win32.whl
Size 769.1 kB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
453c5bc0563c9b9601ef9243c095da9e327f24da6917b7c3ede8e0cd9dd9477d
BLAKE2b-256 checksum
How to use checksums
e81a05b47086fefbfc9b26358eec40468177082e7dcd793aed7aa8b2df7707b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15rc1

Release files / psycopg2-2.8-cp35-cp35m-win_amd64.whl

Download URL psycopg2-2.8-cp35-cp35m-win_amd64.whl
Size 912.6 kB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
8980dbabfb2ed0866b6bd5687d1407c3bccaac1f2f496f1206472108be69b92d
BLAKE2b-256 checksum
How to use checksums
f9a3ea368ba5ff69fddf6a056fd2bdc1fb604c7787c865d888194f178a8040ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15rc1

Release files / psycopg2-2.8-cp35-cp35m-win32.whl

Download URL psycopg2-2.8-cp35-cp35m-win32.whl
Size 769.1 kB
Tags CPython 3.5 CPython 3.5 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
d303d9f88ec839a51b430bbec0f4a8314d0d2a53f760e67e95e25e39f6d6fb5f
BLAKE2b-256 checksum
How to use checksums
ef04255084b61a96e312101770378a68c63f664b68f65e8285d02a40f653d318
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15rc1

Release files / psycopg2-2.8-cp34-cp34m-win_amd64.whl

Download URL psycopg2-2.8-cp34-cp34m-win_amd64.whl
Size 902.4 kB
Tags CPython 3.4 CPython 3.4 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
2433931723bf6be4bd342e003ffa9a1cef2cb4de7735d5b063fd554fd64a744c
BLAKE2b-256 checksum
How to use checksums
9769e639cb67fe97f88c1dd7cb04b2baf1c97d0ad3df27eb8b3427168dcb1235
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15rc1

Release files / psycopg2-2.8-cp34-cp34m-win32.whl

Download URL psycopg2-2.8-cp34-cp34m-win32.whl
Size 779.9 kB
Tags CPython 3.4 CPython 3.4 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
3ad3cf4732ff7d87dc12031836e5097fc42be767193771da90b8b5038cdca412
BLAKE2b-256 checksum
How to use checksums
4cadc6acf5a2594397b9817034dd35d01a7aebb3cd3863c73a08c862b2c4d08f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15rc1

Release files / psycopg2-2.8-cp27-cp27m-win_amd64.whl

Download URL psycopg2-2.8-cp27-cp27m-win_amd64.whl
Size 905.0 kB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
a286480430af972be9c30333c48883890dc8d87eab0d591e24975dcf99abff6c
BLAKE2b-256 checksum
How to use checksums
ad4f01dadaf523a044e80e51b3876e5a54e2a8dec293d1d80dd12279a11cc726
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15rc1

Release files / psycopg2-2.8-cp27-cp27m-win32.whl

Download URL psycopg2-2.8-cp27-cp27m-win32.whl
Size 775.6 kB
Tags CPython 2.7 CPython 2.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
2a0497c8ade1a5a0dc3d62b7f1a4fbcbccfa15d9ef69cce064119cd723566392
BLAKE2b-256 checksum
How to use checksums
494c720abc4b5eb1ea049bc296fcad63de3ca0e612be54e82ea7a6c0850f3181
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/2.7.15rc1

Security for psycopg2 2.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.8 This release

11 release files No provenance

2.0.8

2.0.7

2.0.6

2.0.5.1

2.0.4

2.0.3

2.0.2

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page