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

Release files for psycopg2 2.9.6

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.9.6
File Size Uploaded
psycopg2-2.9.6.tar.gz 384.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for psycopg2 2.9.6
File
psycopg2-2.9.6-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
psycopg2-2.9.6-cp311-cp311-win32.whl CPython 3.11 CPython 3.11 Windows x86-32 Details
psycopg2-2.9.6-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
psycopg2-2.9.6-cp310-cp310-win32.whl CPython 3.10 CPython 3.10 Windows x86-32 Details
psycopg2-2.9.6-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
psycopg2-2.9.6-cp39-cp39-win32.whl CPython 3.9 CPython 3.9 Windows x86-32 Details
psycopg2-2.9.6-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
psycopg2-2.9.6-cp38-cp38-win32.whl CPython 3.8 CPython 3.8 Windows x86-32 Details
psycopg2-2.9.6-cp37-cp37m-win_amd64.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-64 Details
psycopg2-2.9.6-cp37-cp37m-win32.whl CPython 3.7 CPython 3.7 pymalloc Windows x86-32 Details
psycopg2-2.9.6-cp36-cp36m-win_amd64.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-64 Details
psycopg2-2.9.6-cp36-cp36m-win32.whl CPython 3.6 CPython 3.6 pymalloc Windows x86-32 Details

Total release size: 13.4 MB

Release files / psycopg2-2.9.6.tar.gz

Download URL psycopg2-2.9.6.tar.gz
Size 384.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f15158418fd826831b28585e2ab48ed8df2d0d98f502a2b4fe619e7d5ca29011
BLAKE2b-256 checksum
How to use checksums
afc45726cddb53fe52f0e839eb3da04322364f14493217ebd5818cc5e4c948a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / psycopg2-2.9.6-cp311-cp311-win_amd64.whl

Download URL psycopg2-2.9.6-cp311-cp311-win_amd64.whl
Size 1.2 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
b81fcb9ecfc584f661b71c889edeae70bae30d3ef74fa0ca388ecda50b1222b7
BLAKE2b-256 checksum
How to use checksums
c937f49a95fb00ca9f4678475284e60cb341aea84201ac45faa9f32ad88c02e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / psycopg2-2.9.6-cp311-cp311-win32.whl

Download URL psycopg2-2.9.6-cp311-cp311-win32.whl
Size 1.0 MB
Tags CPython 3.11 Windows x86-32
SHA-256 checksum
How to use checksums
53f4ad0a3988f983e9b49a5d9765d663bbe84f508ed655affdb810af9d0972ad
BLAKE2b-256 checksum
How to use checksums
4b6a450b97eb81f64f4788a6c5c4282ef2f73b023cc1ceab906ca63cab864440
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / psycopg2-2.9.6-cp310-cp310-win_amd64.whl

Download URL psycopg2-2.9.6-cp310-cp310-win_amd64.whl
Size 1.2 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
f75001a1cbbe523e00b0ef896a5a1ada2da93ccd752b7636db5a99bc57c44494
BLAKE2b-256 checksum
How to use checksums
ca4ab2f2cc9a3384b438961f9953fd82a20514c60a87f378f4a475f1b9de184b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / psycopg2-2.9.6-cp310-cp310-win32.whl

Download URL psycopg2-2.9.6-cp310-cp310-win32.whl
Size 1.0 MB
Tags CPython 3.10 Windows x86-32
SHA-256 checksum
How to use checksums
f7a7a5ee78ba7dc74265ba69e010ae89dae635eea0e97b055fb641a01a31d2b1
BLAKE2b-256 checksum
How to use checksums
9be104d7d48986b123775840fb64bc07642fe186079564744ed9955162891b24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / psycopg2-2.9.6-cp39-cp39-win_amd64.whl

Download URL psycopg2-2.9.6-cp39-cp39-win_amd64.whl
Size 1.2 MB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
ded2faa2e6dfb430af7713d87ab4abbfc764d8d7fb73eafe96a24155f906ebf5
BLAKE2b-256 checksum
How to use checksums
498e52252e78c8fd2cc91dae13d2686b103237900fd05f80adc1efc366b40f65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / psycopg2-2.9.6-cp39-cp39-win32.whl

Download URL psycopg2-2.9.6-cp39-cp39-win32.whl
Size 1.0 MB
Tags CPython 3.9 Windows x86-32
SHA-256 checksum
How to use checksums
1861a53a6a0fd248e42ea37c957d36950da00266378746588eab4f4b5649e95f
BLAKE2b-256 checksum
How to use checksums
e37608d3297720f2d0636a934aa30bf3343e6c4b869c12ba6294b8c1739af76b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / psycopg2-2.9.6-cp38-cp38-win_amd64.whl

Download URL psycopg2-2.9.6-cp38-cp38-win_amd64.whl
Size 1.2 MB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
d24ead3716a7d093b90b27b3d73459fe8cd90fd7065cf43b3c40966221d8c394
BLAKE2b-256 checksum
How to use checksums
4b8e69c0ea73e96afc1efb9f459050a14391fae20db81ff1815bf27c8ddc3160
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / psycopg2-2.9.6-cp38-cp38-win32.whl

Download URL psycopg2-2.9.6-cp38-cp38-win32.whl
Size 1.0 MB
Tags CPython 3.8 Windows x86-32
SHA-256 checksum
How to use checksums
2362ee4d07ac85ff0ad93e22c693d0f37ff63e28f0615a16b6635a645f4b9214
BLAKE2b-256 checksum
How to use checksums
2fe0f0db22e36faf2b62557ed11e942cc47f3b96d52b686fa838a3ca6b3c90b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

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

Download URL psycopg2-2.9.6-cp37-cp37m-win_amd64.whl
Size 1.2 MB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
a8ad4a47f42aa6aec8d061fdae21eaed8d864d4bb0f0cade5ad32ca16fcd6258
BLAKE2b-256 checksum
How to use checksums
e2384a2cc3f697f40f09617697a795c73697eec464009f4c5e47cf4050f45b63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

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

Download URL psycopg2-2.9.6-cp37-cp37m-win32.whl
Size 1.0 MB
Tags CPython 3.7 CPython 3.7 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
869776630c04f335d4124f120b7fb377fe44b0a7645ab3c34b4ba42516951889
BLAKE2b-256 checksum
How to use checksums
ad8d88ab18931ee8d7434163671dbc6bbfd8c07ff8777fe6d156fabcb3672927
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

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

Download URL psycopg2-2.9.6-cp36-cp36m-win_amd64.whl
Size 1.2 MB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-64
SHA-256 checksum
How to use checksums
36c941a767341d11549c0fbdbb2bf5be2eda4caf87f65dfcd7d146828bd27f39
BLAKE2b-256 checksum
How to use checksums
e1566558cc5b4380dc2ef0ea6c96eeb6fcb26111081ec07f0dade2c3b9bc1f06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

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

Download URL psycopg2-2.9.6-cp36-cp36m-win32.whl
Size 1.0 MB
Tags CPython 3.6 CPython 3.6 pymalloc Windows x86-32
SHA-256 checksum
How to use checksums
11aca705ec888e4f4cea97289a0bf0f22a067a32614f6ef64fcf7b8bfbc53744
BLAKE2b-256 checksum
How to use checksums
c247d142314e126c0ea7c8f4c0043cad069e359ce04975fd7d296c4af7f5a5c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release history Release notifications | RSS feed

2.9.12

7 release files

2.9.11

7 release files

2.9.8

11 release files

This release

2.9.6 This release

13 release files

2.9.5

13 release files

2.9.3

11 release files

2.9.2

11 release files

2.9.1

11 release files

2.9

9 release files

2.8.4

13 release files

2.8.3

11 release files

2.8.2

11 release files

2.8

11 release files

2.7.7

30 release files

2.7.5

30 release files

2.7.3

31 release files

2.7.2

31 release files

2.7.1

31 release files

2.7

31 release files

2.6.1

11 release files

2.6

1 release file

2.5.5

1 release file

2.5.4

1 release file

2.5.3

1 release file

2.5.2

1 release file

2.5.1

1 release file

2.5

1 release file

2.4.6

1 release file

2.4.5

1 release file

2.4.4

1 release file

2.4.3

1 release file

2.4.2

1 release file

2.4.1

1 release file

2.4

1 release file

2.3.2

1 release file

2.3.1

1 release file

2.3.0

1 release file

2.2.2

1 release file

2.2.1

1 release file

2.2.0

1 release file

2.0.14

1 release file

2.0.13

1 release file

2.0.12

1 release file

2.0.11

1 release file

2.0.10

1 release file

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