{"id":13496537,"url":"https://github.com/psycopg/psycopg","last_synced_at":"2025-05-14T08:05:17.761Z","repository":{"id":37842238,"uuid":"247399816","full_name":"psycopg/psycopg","owner":"psycopg","description":"New generation PostgreSQL database adapter for the Python programming language ","archived":false,"fork":false,"pushed_at":"2025-05-13T16:15:31.000Z","size":6846,"stargazers_count":1945,"open_issues_count":45,"forks_count":184,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-05-14T08:04:44.927Z","etag":null,"topics":["database","development","driver","postgresql","python"],"latest_commit_sha":null,"homepage":"https://www.psycopg.org/psycopg3/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/psycopg.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["dvarrazzo"],"custom":["https://www.paypal.me/dvarrazzo"]}},"created_at":"2020-03-15T04:15:53.000Z","updated_at":"2025-05-14T06:38:01.000Z","dependencies_parsed_at":"2023-10-20T16:53:44.058Z","dependency_job_id":"18b1a8af-de1c-4f2a-96bc-c0f33cecf07f","html_url":"https://github.com/psycopg/psycopg","commit_stats":{"total_commits":2950,"total_committers":58,"mean_commits":50.86206896551724,"dds":0.1257627118644068,"last_synced_commit":"f2c83579e2523a3ba43caa61a59876f0b9e0b266"},"previous_names":["psycopg/psycopg3"],"tags_count":73,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psycopg%2Fpsycopg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psycopg%2Fpsycopg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psycopg%2Fpsycopg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psycopg%2Fpsycopg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psycopg","download_url":"https://codeload.github.com/psycopg/psycopg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254101588,"owners_count":22014907,"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","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","development","driver","postgresql","python"],"created_at":"2024-07-31T19:01:51.072Z","updated_at":"2025-05-14T08:05:17.743Z","avatar_url":"https://github.com/psycopg.png","language":"Python","readme":"Psycopg 3 -- PostgreSQL database adapter for Python\n===================================================\n\nPsycopg 3 is a modern implementation of a PostgreSQL adapter for Python.\n\n\nInstallation\n------------\n\nQuick version::\n\n    pip install --upgrade pip               # upgrade pip to at least 20.3\n    pip install \"psycopg[binary,pool]\"      # install binary dependencies\n\nFor further information about installation please check `the documentation`__.\n\n.. __: https://www.psycopg.org/psycopg3/docs/basic/install.html\n\n\n.. _Hacking:\n\nHacking\n-------\n\nIn order to work on the Psycopg source code, you must have the\n``libpq`` PostgreSQL client library installed on the system. For instance, on\nDebian systems, you can obtain it by running::\n\n    sudo apt install libpq5\n\nOn macOS, run::\n\n    brew install libpq\n\nOn Windows you can use EnterpriseDB's `installers`__ to obtain ``libpq``\nwhich is included in the Command Line Tools.\n\n.. __: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads\n\nYou can then clone this repository to develop Psycopg::\n\n    git clone https://github.com/psycopg/psycopg.git\n    cd psycopg\n\nPlease note that the repository contains the source code of several Python\npackages, which may have different requirements:\n\n- The ``psycopg`` directory contains the pure python implementation of\n  ``psycopg``. The package has only a runtime dependency on the ``libpq``, the\n  PostgreSQL client library, which should be installed in your system.\n\n- The ``psycopg_c`` directory contains an optimization module written in\n  C/Cython. In order to build it you will need a few development tools: please\n  look at `Local installation`__ in the docs for the details.\n\n- The ``psycopg_pool`` directory contains the `connection pools`__\n  implementations. This is kept as a separate package to allow a different\n  release cycle.\n\n.. __: https://www.psycopg.org/psycopg3/docs/basic/install.html#local-installation\n.. __: https://www.psycopg.org/psycopg3/docs/advanced/pool.html\n\nYou can create a local virtualenv and install the packages `in\ndevelopment mode`__, together with their development and testing\nrequirements::\n\n    python -m venv .venv\n    source .venv/bin/activate\n    pip install -e \"./psycopg[dev,test]\"    # for the base Python package\n    pip install -e ./psycopg_pool           # for the connection pool\n    pip install ./psycopg_c                 # for the C speedup module\n\n.. __: https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs\n\nPlease add ``--config-settings editable_mode=strict`` to the ``pip install -e``\nabove if you experience `editable mode broken`__.\n\n.. __: https://github.com/pypa/setuptools/issues/3557\n\nNow hack away! You can run the tests using::\n\n    psql -c 'create database psycopg_test'\n    export PSYCOPG_TEST_DSN=\"dbname=psycopg_test\"\n    pytest\n\nThe project includes some `pre-commit`__ hooks to check that the code is valid\naccording to the project coding convention. Please make sure to install them\nby running::\n\n    pre-commit install\n\nThis will allow to check lint errors before submitting merge requests, which\nwill save you time and frustrations.\n\n.. __: https://pre-commit.com/\n\n\nCross-compiling\n---------------\n\nTo use cross-platform zipapps created with `shiv`__ that include Psycopg\nas a dependency you must also have ``libpq`` installed. See\n`the section above \u003cHacking_\u003e`_ for install instructions.\n\n.. __: https://github.com/linkedin/shiv\n","funding_links":["https://github.com/sponsors/dvarrazzo","https://www.paypal.me/dvarrazzo"],"categories":["Python","Database","数据库驱动程序","Drivers","Database Clients","Database Drivers","📚 فهرست"],"sub_categories":["Database Drivers","Python","ASGI Servers","دیتابیس"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsycopg%2Fpsycopg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsycopg%2Fpsycopg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsycopg%2Fpsycopg/lists"}