psycopg2

PostgreSQL database adapter for the Python programming language

https://github.com/psycopg/psycopg2

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    2 of 142 committers (1.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.8%) to scientific vocabulary

Keywords

database driver postgresql python

Keywords from Contributors

packaging templates pip apps views closember syntax-highlighting distributed forhumans pallets
Last synced: 6 months ago · JSON representation

Repository

PostgreSQL database adapter for the Python programming language

Basic Info
  • Host: GitHub
  • Owner: psycopg
  • License: other
  • Language: C
  • Default Branch: master
  • Homepage: https://www.psycopg.org/
  • Size: 8.57 MB
Statistics
  • Stars: 3,533
  • Watchers: 69
  • Forks: 519
  • Open Issues: 23
  • Releases: 0
Topics
database driver postgresql python
Created about 13 years ago · Last pushed 7 months ago
Metadata Files
Readme Changelog Funding License Authors

README.rst

psycopg2 - Python-PostgreSQL Database Adapter
=============================================

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.

.. Note::

    The psycopg2 package is still widely used and actively maintained, but it
    is not expected to receive new features.

    `Psycopg 3`__ is the evolution of psycopg2 and is where `new features are
    being developed`__: if you are starting a new project you should probably
    start from 3!

    .. __: https://pypi.org/project/psycopg/
    .. __: https://www.psycopg.org/psycopg3/docs/index.html


Documentation
-------------

Documentation is included in the ``doc`` directory and is `available online`__.

.. __: https://www.psycopg.org/docs/

For any other resource (source code repository, bug tracker, mailing list)
please check the `project homepage`__.

.. __: https://psycopg.org/


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.

.. _PyPI: https://pypi.org/project/psycopg2/
.. _psycopg2-binary: https://pypi.org/project/psycopg2-binary/
.. _install: https://www.psycopg.org/docs/install.html#install-from-source
.. _faq: https://www.psycopg.org/docs/faq.html#faq-compile

:Build status: |gh-actions|

.. |gh-actions| image:: https://github.com/psycopg/psycopg2/actions/workflows/tests.yml/badge.svg
    :target: https://github.com/psycopg/psycopg2/actions/workflows/tests.yml
    :alt: Build status

Owner

  • Name: The Psycopg Team
  • Login: psycopg
  • Kind: organization

We make reptiles and pachiderms talk to each other.

GitHub Events

Total
  • Issues event: 83
  • Watch event: 205
  • Delete event: 8
  • Issue comment event: 134
  • Push event: 40
  • Pull request review event: 27
  • Pull request review comment event: 26
  • Pull request event: 19
  • Fork event: 21
  • Create event: 9
Last Year
  • Issues event: 83
  • Watch event: 205
  • Delete event: 8
  • Issue comment event: 134
  • Push event: 40
  • Pull request review event: 27
  • Pull request review comment event: 26
  • Pull request event: 19
  • Fork event: 21
  • Create event: 9

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 2,791
  • Total Committers: 142
  • Avg Commits per committer: 19.655
  • Development Distribution Score (DDS): 0.34
Past Year
  • Commits: 41
  • Committers: 6
  • Avg Commits per committer: 6.833
  • Development Distribution Score (DDS): 0.341
Top Committers
Name Email Commits
Daniele Varrazzo d****o@g****m 1,843
Federico Di Gregorio f****g@i****g 434
Oleksandr Shulgin o****n@z****e 72
James Henstridge j****s@j****u 65
Jon Dufresne j****e@g****m 57
Jason Erickson j****o@s****m 48
Jan Urbański w****r@w****g 29
Hugo h****k 18
mrmilosz m****z@m****a 8
Fabio Tranchitella k****d@d****g 8
Chris Withers c****s@s****k 7
dependabot[bot] 4****] 6
Steve Lacy s****y@s****m 6
Ashesh Vashi a****i@e****m 6
Karolina Surma k****a@r****m 5
Alexander Kukushkin a****n@z****e 5
Rafi Shamim r****i@c****m 4
Edgar Ramírez-Mondragón e****8@g****m 4
Ivan Kotelnikov i****v@b****m 4
Blake Rouse b****e@c****m 3
Greg Ward g****d@d****m 3
Menno Smits m****o@f****m 3
Rene Leonhardt 6****t 3
Marti Raudsepp m****i@j****g 3
Marc Abramowitz m****c@m****m 3
Frazer McLean f****r@f****k 3
Roman Konoval r****n@j****o 3
Changaco c****o@c****c 2
Photonios p****s@o****m 2
Abdirahim Musse 3****e 2
and 112 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 255
  • Total pull requests: 68
  • Average time to close issues: 3 months
  • Average time to close pull requests: 3 months
  • Total issue authors: 235
  • Total pull request authors: 32
  • Average comments per issue: 3.91
  • Average comments per pull request: 2.35
  • Merged pull requests: 35
  • Bot issues: 0
  • Bot pull requests: 22
Past Year
  • Issues: 49
  • Pull requests: 22
  • Average time to close issues: 1 day
  • Average time to close pull requests: 10 days
  • Issue authors: 48
  • Pull request authors: 7
  • Average comments per issue: 1.04
  • Average comments per pull request: 1.14
  • Merged pull requests: 11
  • Bot issues: 0
  • Bot pull requests: 10
Top Authors
Issue Authors
  • dvarrazzo (8)
  • fridary (3)
  • df7cb (2)
  • barrachri (2)
  • allComputableThings (2)
  • ghost (2)
  • wqh17101 (2)
  • kloczek (2)
  • jchampio (2)
  • raphaelauv (2)
  • anibal2j (2)
  • fw-aaron (2)
  • allwell997 (2)
  • CMCDragonkai (1)
  • svim-ig (1)
Pull Request Authors
  • dependabot[bot] (22)
  • edgarrmondragon (3)
  • befeleme (2)
  • reneleonhardt (2)
  • kannes (2)
  • nickzandbergen (2)
  • 0xTiger (2)
  • dvarrazzo (2)
  • exg (2)
  • bmarroquin (2)
  • yetanotherion (2)
  • anushds (2)
  • romank0 (2)
  • SagarSoni1510 (2)
  • ngnpope (2)
Top Labels
Issue Labels
wheel (4) osx (2) confirmed (1) windows (1) feature request (1) enhancement (1)
Pull Request Labels
dependencies (22) github_actions (8)

Packages

  • Total packages: 7
  • Total downloads:
    • pypi 168,520,498 last-month
  • Total docker downloads: 3,695,002,648
  • Total dependent packages: 2,802
    (may contain duplicates)
  • Total dependent repositories: 287,979
    (may contain duplicates)
  • Total versions: 131
  • Total maintainers: 4
pypi.org: psycopg2-binary

psycopg2 - Python-PostgreSQL Database Adapter

  • Versions: 24
  • Dependent Packages: 1,509
  • Dependent Repositories: 103,063
  • Downloads: 132,039,561 Last month
  • Docker Downloads: 1,295,692,044
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Downloads: 0.0%
Docker downloads count: 0.1%
Average: 0.8%
Stargazers count: 1.9%
Forks count: 3.0%
Maintainers (1)
Last synced: 6 months ago
pypi.org: psycopg2

psycopg2 - Python-PostgreSQL Database Adapter

  • Versions: 63
  • Dependent Packages: 1,211
  • Dependent Repositories: 184,323
  • Downloads: 36,480,910 Last month
  • Docker Downloads: 2,399,310,604
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Docker downloads count: 0.0%
Downloads: 0.1%
Average: 0.8%
Stargazers count: 1.9%
Forks count: 3.0%
Maintainers (2)
Last synced: 6 months ago
conda-forge.org: psycopg2

Psycopg is the most popular PostgreSQL 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.

  • Versions: 22
  • Dependent Packages: 70
  • Dependent Repositories: 287
Rankings
Dependent packages count: 1.1%
Dependent repos count: 1.9%
Average: 4.5%
Stargazers count: 7.5%
Forks count: 7.6%
Last synced: 6 months ago
conda-forge.org: psycopg2-binary

Psycopg is the most popular PostgreSQL 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.

  • Versions: 5
  • Dependent Packages: 7
  • Dependent Repositories: 18
Rankings
Stargazers count: 7.5%
Forks count: 7.6%
Average: 7.9%
Dependent packages count: 8.0%
Dependent repos count: 8.4%
Last synced: 6 months ago
anaconda.org: psycopg2

Psycopg is the most popular PostgreSQL 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.

  • Versions: 12
  • Dependent Packages: 5
  • Dependent Repositories: 287
Rankings
Dependent packages count: 8.7%
Dependent repos count: 10.9%
Average: 12.5%
Stargazers count: 15.1%
Forks count: 15.5%
Last synced: 6 months ago
pypi.org: psycopg2crate

psycopg2 - Python-PostgreSQL Database Adapter

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 18 Last month
Rankings
Stargazers count: 1.4%
Forks count: 2.3%
Dependent packages count: 7.4%
Average: 14.4%
Dependent repos count: 22.2%
Downloads: 38.6%
Maintainers (1)
Last synced: 6 months ago
pypi.org: fv-aws-psycopg2-arm64

psycopg2 - Python-PostgreSQL Database Adapter

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 9 Last month
Rankings
Dependent packages count: 10.0%
Average: 38.8%
Dependent repos count: 67.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

doc/requirements.in pypi
  • Sphinx *
  • sphinx-better-theme *
doc/requirements.txt pypi
  • alabaster ==0.7.12
  • babel ==2.9.1
  • certifi ==2021.10.8
  • charset-normalizer ==2.0.12
  • docutils ==0.17.1
  • idna ==3.3
  • imagesize ==1.3.0
  • importlib-metadata ==4.11.3
  • jinja2 ==3.1.1
  • markupsafe ==2.1.1
  • packaging ==21.3
  • pygments ==2.11.2
  • pyparsing ==3.0.7
  • pytz ==2022.1
  • requests ==2.27.1
  • snowballstemmer ==2.2.0
  • sphinx ==4.4.0
  • sphinx-better-theme ==0.1.5
  • sphinxcontrib-applehelp ==1.0.2
  • sphinxcontrib-devhelp ==1.0.2
  • sphinxcontrib-htmlhelp ==2.0.0
  • sphinxcontrib-jsmath ==1.0.1
  • sphinxcontrib-qthelp ==1.0.3
  • sphinxcontrib-serializinghtml ==1.1.5
  • urllib3 ==1.26.9
  • zipp ==3.7.0