{"id":13461285,"url":"https://github.com/psycopg/psycopg2","last_synced_at":"2025-09-09T21:14:49.094Z","repository":{"id":6490463,"uuid":"7730829","full_name":"psycopg/psycopg2","owner":"psycopg","description":"PostgreSQL database adapter for the Python programming language","archived":false,"fork":false,"pushed_at":"2025-09-02T18:01:33.000Z","size":8992,"stargazers_count":3538,"open_issues_count":24,"forks_count":520,"subscribers_count":69,"default_branch":"master","last_synced_at":"2025-09-08T15:02:02.086Z","etag":null,"topics":["database","driver","postgresql","python"],"latest_commit_sha":null,"homepage":"https://www.psycopg.org/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/psycopg.png","metadata":{"files":{"readme":"README.rst","changelog":"NEWS","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["dvarrazzo"],"custom":["https://www.paypal.me/dvarrazzo"]}},"created_at":"2013-01-21T11:05:11.000Z","updated_at":"2025-09-07T04:41:31.000Z","dependencies_parsed_at":"2022-08-06T19:15:40.288Z","dependency_job_id":"41a7efdd-2235-4428-9d53-4a826fe8ecba","html_url":"https://github.com/psycopg/psycopg2","commit_stats":{"total_commits":2765,"total_committers":144,"mean_commits":19.20138888888889,"dds":"0.34141048824593123","last_synced_commit":"a805acf59f402f554e95624b5e27518169ca7715"},"previous_names":[],"tags_count":87,"template":false,"template_full_name":null,"purl":"pkg:github/psycopg/psycopg2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psycopg%2Fpsycopg2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psycopg%2Fpsycopg2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psycopg%2Fpsycopg2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psycopg%2Fpsycopg2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psycopg","download_url":"https://codeload.github.com/psycopg/psycopg2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psycopg%2Fpsycopg2/sbom","scorecard":{"id":748539,"data":{"date":"2025-08-11","repo":{"name":"github.com/psycopg/psycopg2","commit":"c2b6a8aaeae71b30a96403bf5d6e7eafc21afaef"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":2,"reason":"Found 2/10 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":7,"reason":"0 commit(s) and 9 issue activity found in the last 90 days -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/docs.yml:1","Warn: no topLevel permission defined: .github/workflows/packages.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/packages.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/packages.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/packages.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/packages.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/packages.yml:74: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/packages.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/packages.yml:77: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/packages.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/packages.yml:80: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/packages.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/packages.yml:86: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/packages.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/packages.yml:113: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/packages.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/packages.yml:147: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/packages.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/packages.yml:150: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/packages.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/packages.yml:156: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/packages.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/packages.yml:172: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/packages.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/packages.yml:200: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/packages.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/packages.yml:210: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/packages.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/packages.yml:226: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/packages.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/packages.yml:245: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/packages.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/packages.yml:261: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/packages.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:72: update your workflow using https://app.stepsecurity.io/secureworkflow/psycopg/psycopg2/tests.yml/master?enable=pin","Warn: pipCommand not pinned by hash: scripts/build/build_macos_arm64.sh:85","Warn: pipCommand not pinned by hash: scripts/build/build_sdist.sh:24","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:72","Info:   0 out of  14 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned","Info:   0 out of   3 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":10,"reason":"project is fuzzed","details":["Info: OSSFuzz integration found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"13 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2024-230 / GHSA-248v-346w-9cwc","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: GHSA-cpwx-vrp4-4pq7","Warn: Project is vulnerable to: GHSA-gmj6-6f8f-6699","Warn: Project is vulnerable to: GHSA-h5c8-rqwp-cp95","Warn: Project is vulnerable to: GHSA-h75v-3vvj-5mfj","Warn: Project is vulnerable to: GHSA-q2x7-8rv6-6q7h","Warn: Project is vulnerable to: PYSEC-2023-117","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 23 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T19:35:42.494Z","repository_id":6490463,"created_at":"2025-08-22T19:35:42.494Z","updated_at":"2025-08-22T19:35:42.494Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274229372,"owners_count":25245189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","driver","postgresql","python"],"created_at":"2024-07-31T11:00:32.542Z","updated_at":"2025-09-09T21:14:49.059Z","avatar_url":"https://github.com/psycopg.png","language":"C","readme":"psycopg2 - Python-PostgreSQL Database Adapter\n=============================================\n\nPsycopg is the most popular PostgreSQL database adapter for the Python\nprogramming language.  Its main features are the complete implementation of\nthe Python DB API 2.0 specification and the thread safety (several threads can\nshare the same connection).  It was designed for heavily multi-threaded\napplications that create and destroy lots of cursors and make a large number\nof concurrent \"INSERT\"s or \"UPDATE\"s.\n\nPsycopg 2 is mostly implemented in C as a libpq wrapper, resulting in being\nboth efficient and secure.  It features client-side and server-side cursors,\nasynchronous communication and notifications, \"COPY TO/COPY FROM\" support.\nMany Python types are supported out-of-the-box and adapted to matching\nPostgreSQL data types; adaptation can be extended and customized thanks to a\nflexible objects adaptation system.\n\nPsycopg 2 is both Unicode and Python 3 friendly.\n\n.. Note::\n\n    The psycopg2 package is still widely used and actively maintained, but it\n    is not expected to receive new features.\n\n    `Psycopg 3`__ is the evolution of psycopg2 and is where `new features are\n    being developed`__: if you are starting a new project you should probably\n    start from 3!\n\n    .. __: https://pypi.org/project/psycopg/\n    .. __: https://www.psycopg.org/psycopg3/docs/index.html\n\n\nDocumentation\n-------------\n\nDocumentation is included in the ``doc`` directory and is `available online`__.\n\n.. __: https://www.psycopg.org/docs/\n\nFor any other resource (source code repository, bug tracker, mailing list)\nplease check the `project homepage`__.\n\n.. __: https://psycopg.org/\n\n\nInstallation\n------------\n\nBuilding Psycopg requires a few prerequisites (a C compiler, some development\npackages): please check the install_ and the faq_ documents in the ``doc`` dir\nor online for the details.\n\nIf prerequisites are met, you can install psycopg like any other Python\npackage, using ``pip`` to download it from PyPI_::\n\n    $ pip install psycopg2\n\nor using ``setup.py`` if you have downloaded the source package locally::\n\n    $ python setup.py build\n    $ sudo python setup.py install\n\nYou can also obtain a stand-alone package, not requiring a compiler or\nexternal libraries, by installing the `psycopg2-binary`_ package from PyPI::\n\n    $ pip install psycopg2-binary\n\nThe binary package is a practical choice for development and testing but in\nproduction it is advised to use the package built from sources.\n\n.. _PyPI: https://pypi.org/project/psycopg2/\n.. _psycopg2-binary: https://pypi.org/project/psycopg2-binary/\n.. _install: https://www.psycopg.org/docs/install.html#install-from-source\n.. _faq: https://www.psycopg.org/docs/faq.html#faq-compile\n\n:Build status: |gh-actions|\n\n.. |gh-actions| image:: https://github.com/psycopg/psycopg2/actions/workflows/tests.yml/badge.svg\n    :target: https://github.com/psycopg/psycopg2/actions/workflows/tests.yml\n    :alt: Build status\n","funding_links":["https://github.com/sponsors/dvarrazzo","https://www.paypal.me/dvarrazzo"],"categories":["C","Databases","Python","🗃️ SQL \u0026 Databases","Awesome common libraries"],"sub_categories":["Tools"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsycopg%2Fpsycopg2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsycopg%2Fpsycopg2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsycopg%2Fpsycopg2/lists"}