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

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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.9Windows x86-64

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

Uploaded CPython 3.9Windows x86

psycopg2-2.9-cp38-cp38-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.8Windows x86-64

psycopg2-2.9-cp38-cp38-win32.whl (995.9 kB view details)

Uploaded CPython 3.8Windows x86

psycopg2-2.9-cp37-cp37m-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.7mWindows x86-64

psycopg2-2.9-cp37-cp37m-win32.whl (994.3 kB view details)

Uploaded CPython 3.7mWindows x86

psycopg2-2.9-cp36-cp36m-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.6mWindows x86-64

psycopg2-2.9-cp36-cp36m-win32.whl (994.4 kB view details)

Uploaded CPython 3.6mWindows x86

File details

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

File metadata

  • Download URL: psycopg2-2.9.tar.gz
  • Upload date:
  • Size: 379.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for psycopg2-2.9.tar.gz
Algorithm Hash digest
SHA256 b12073fdf2002e828e5921be2c39ff9c6eab361c5c0bd6c529619fc23677accc
MD5 f650e9decea0fd0a498695bd9a5fe1fd
BLAKE2b-256 6c796df8af2405e2aa60732c47757453fc7fa4af5c90a1796b3392ef892d3a52

See more details on using hashes here.

File details

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

File metadata

  • Download URL: psycopg2-2.9-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/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for psycopg2-2.9-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 8f4c1800e57ad128d20b2e91d222ca238fffd316cef65be781361cdf35e37979
MD5 1561c3962c3ab446c776305dbbfba07b
BLAKE2b-256 fba1a973f7b7498577a5243ab568776dbb8627724808779080295fde4ed066bc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: psycopg2-2.9-cp39-cp39-win32.whl
  • Upload date:
  • Size: 1.0 MB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for psycopg2-2.9-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 e44e39a46af7c30566b7667fb27e701e652ab0a51e05c263a01d3ff0e223b765
MD5 6c7763292ce3c9fcd8da84bdae0054f0
BLAKE2b-256 65007417e52499a1c3b5f5755a29e0cf6eb0851543366504ad6731825478fedf

See more details on using hashes here.

File details

Details for the file psycopg2-2.9-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: psycopg2-2.9-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for psycopg2-2.9-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d549db98fc0e6db41a2aa0d65f7434c4308a9f64012adb209b9e489f26fe87c6
MD5 26841ed1253249b7b63320bbb23464a6
BLAKE2b-256 d1a1756fcd30d06a3b013033104fd9ac0e64bf0658c40c0630e23560dd732160

See more details on using hashes here.

File details

Details for the file psycopg2-2.9-cp38-cp38-win32.whl.

File metadata

  • Download URL: psycopg2-2.9-cp38-cp38-win32.whl
  • Upload date:
  • Size: 995.9 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for psycopg2-2.9-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 03a485bf71498870e38b535c0e6e7162d6ac06a91487edddc3b959894d65f79c
MD5 4ed0d6c502e0bb1a176adf5bec1b4e77
BLAKE2b-256 4fc66eb71bf334a6f97e68b6ca16633cad1f46accf0be428db264efb2c57f878

See more details on using hashes here.

File details

Details for the file psycopg2-2.9-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: psycopg2-2.9-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for psycopg2-2.9-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 22102cfeb904898254f287b1a77360bf66c636858e7476593acd5267e5c24ff9
MD5 a7f3c1ec69cd698a8de0d77edaf204d6
BLAKE2b-256 81121b8730ac40fe00df8d05c01041f92a218930b061291c1255fde719f8da11

See more details on using hashes here.

File details

Details for the file psycopg2-2.9-cp37-cp37m-win32.whl.

File metadata

  • Download URL: psycopg2-2.9-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 994.3 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for psycopg2-2.9-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 b6f47af317af8110818d255e693cfa80b7f1e435285be09778db7b66efd95789
MD5 b478c446bd75f6aed04555777b75f126
BLAKE2b-256 6a97a1f8343aa6363cee8f39503ad705cd16ea46445bcdc4a75433fadc7f062d

See more details on using hashes here.

File details

Details for the file psycopg2-2.9-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: psycopg2-2.9-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for psycopg2-2.9-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 f3d42bd42302293767b84206d9a446abc67ed4a133e4fe04dad8952de06c2091
MD5 a9913e19d87b7a6477282b10f17b22f0
BLAKE2b-256 94022c7004959ed4ec2c40acae409b42cb1c4ff982e34356f017489ecfb1b087

See more details on using hashes here.

File details

Details for the file psycopg2-2.9-cp36-cp36m-win32.whl.

File metadata

  • Download URL: psycopg2-2.9-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 994.4 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for psycopg2-2.9-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 e84c80be7a238d3c9c099b71f6890eaa35fc881146232cce888a88ab1bfb431e
MD5 2f5ccc4376912f2549b35e91dfefb754
BLAKE2b-256 25502dc3e459b7e96d92173f49b6de52016874133794ddceeb263ab46448d344

See more details on using hashes here.

Supported by

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