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.12.tar.gz (379.7 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.12-cp314-cp314-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.14Windows x86-64

psycopg2-2.9.12-cp313-cp313-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.13Windows x86-64

psycopg2-2.9.12-cp312-cp312-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.12Windows x86-64

psycopg2-2.9.12-cp311-cp311-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.11Windows x86-64

psycopg2-2.9.12-cp310-cp310-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.10Windows x86-64

psycopg2-2.9.12-cp39-cp39-win_amd64.whl (2.8 MB view details)

Uploaded CPython 3.9Windows x86-64

File details

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

File metadata

  • Download URL: psycopg2-2.9.12.tar.gz
  • Upload date:
  • Size: 379.7 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.12.tar.gz
Algorithm Hash digest
SHA256 1dedb1c7a1d8552c4a6044c6b1c41a52e6a8e2d144af83eccac758076b1b7c15
MD5 dc31d62a4565b12166956f8a27ea9bb7
BLAKE2b-256 c7bcf66df707ed1aec949fbf24e4460e4f4277a7ba23cdadb3965bb1f634ddb9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: psycopg2-2.9.12-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.12-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 a73d5513bfe929c56555006c7a9cc7ae6e4276aa99dd2b1e2544eb8bb54f8b23
MD5 aa72378a400c5fae709a1df459ab2ed6
BLAKE2b-256 734aa3566f77501c21a6c2a1fc234dbe5dff74a86e3f150ef070e4ffb835e7f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: psycopg2-2.9.12-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 2.8 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.12-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3d23e684927d37b95cee9a943f6927b04ae2fdcd056fd0e2a30929ee89fee5a9
MD5 2cc6e81757edb61726fb383449faab9d
BLAKE2b-256 91ab03403779a251ca14a7f1b07a41c7aa735fd451f0aebe4c4f901a231167a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: psycopg2-2.9.12-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 2.8 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.12-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 83d48e66e18c301d832e93c984a7bcbc0f4ac3bb79e2137e3bc335978c756dc0
MD5 f25a6e6363c649dd5e62efbb4d18aa1c
BLAKE2b-256 7eb27319dc488444b1dfe9ce89c4440df1d5425e2579e6ce9a63e2b70f648491

See more details on using hashes here.

File details

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

File metadata

  • Download URL: psycopg2-2.9.12-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 2.8 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.12-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2532c0cdc6ad18c9c35cd935cc3159712e14f05276a6d29a6435c52d24b840c1
MD5 236d12cfec0de67d2e9a43b8b7170461
BLAKE2b-256 cca19cc069f8efc92383d3823ef8805c932f5fda723b3f07d2a8ee019ae2919f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: psycopg2-2.9.12-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 2.8 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.12-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d5fbe092315fb007c03544704e6d1e678a6c0378139d01cea433dc59edf041b4
MD5 dd7943c06f760eb3216296d097dfefe0
BLAKE2b-256 147e940ade9113c6cdd8b4c0b27f820006bdf91c30170a5a95e8332104d5d3ed

See more details on using hashes here.

File details

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

File metadata

  • Download URL: psycopg2-2.9.12-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 2.8 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.12-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 09826a6b89714626a662275d03f21639f1c68d183e2dcc9ba134d463a3da753e
MD5 b051272d13524ab70f7f91dc68f62c9b
BLAKE2b-256 e3c7f04d68a178c9a5830f8f6c2116bdbafe12386d65aabf88c099814264d22e

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