{"id":15019623,"url":"https://github.com/magicstack/asyncpg","last_synced_at":"2025-09-09T20:36:24.180Z","repository":{"id":37832763,"uuid":"63652864","full_name":"MagicStack/asyncpg","owner":"MagicStack","description":"A fast PostgreSQL Database Client Library for Python/asyncio.","archived":false,"fork":false,"pushed_at":"2025-03-19T20:24:27.000Z","size":10869,"stargazers_count":7301,"open_issues_count":241,"forks_count":418,"subscribers_count":110,"default_branch":"master","last_synced_at":"2025-05-05T20:21:41.678Z","etag":null,"topics":["async-programming","async-python","asyncio","database-driver","high-performance","postgresql","python","python-3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MagicStack.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2016-07-19T02:25:20.000Z","updated_at":"2025-05-05T14:07:03.000Z","dependencies_parsed_at":"2023-10-11T01:08:03.012Z","dependency_job_id":"38864ce7-6dce-4b44-9cde-b03250558bcd","html_url":"https://github.com/MagicStack/asyncpg","commit_stats":{"total_commits":818,"total_committers":88,"mean_commits":9.295454545454545,"dds":0.60880195599022,"last_synced_commit":"0a322a2e4ca1c3c3cf6c2cf22b236a6da6c61680"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MagicStack%2Fasyncpg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MagicStack%2Fasyncpg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MagicStack%2Fasyncpg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MagicStack%2Fasyncpg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MagicStack","download_url":"https://codeload.github.com/MagicStack/asyncpg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253928461,"owners_count":21985793,"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":["async-programming","async-python","asyncio","database-driver","high-performance","postgresql","python","python-3"],"created_at":"2024-09-24T19:53:47.503Z","updated_at":"2025-05-13T10:50:04.906Z","avatar_url":"https://github.com/MagicStack.png","language":"Python","readme":"asyncpg -- A fast PostgreSQL Database Client Library for Python/asyncio\n=======================================================================\n\n.. image:: https://github.com/MagicStack/asyncpg/workflows/Tests/badge.svg\n   :target: https://github.com/MagicStack/asyncpg/actions?query=workflow%3ATests+branch%3Amaster\n   :alt: GitHub Actions status\n.. image:: https://img.shields.io/pypi/v/asyncpg.svg\n   :target: https://pypi.python.org/pypi/asyncpg\n\n**asyncpg** is a database interface library designed specifically for\nPostgreSQL and Python/asyncio.  asyncpg is an efficient, clean implementation\nof PostgreSQL server binary protocol for use with Python's ``asyncio``\nframework.  You can read more about asyncpg in an introductory\n`blog post \u003chttp://magic.io/blog/asyncpg-1m-rows-from-postgres-to-python/\u003e`_.\n\nasyncpg requires Python 3.8 or later and is supported for PostgreSQL\nversions 9.5 to 17.  Other PostgreSQL versions or other databases\nimplementing the PostgreSQL protocol *may* work, but are not being\nactively tested.\n\n\nDocumentation\n-------------\n\nThe project documentation can be found\n`here \u003chttps://magicstack.github.io/asyncpg/current/\u003e`_.\n\n\nPerformance\n-----------\n\nIn our testing asyncpg is, on average, **5x** faster than psycopg3.\n\n.. image:: https://raw.githubusercontent.com/MagicStack/asyncpg/master/performance.png?fddca40ab0\n    :target: https://gistpreview.github.io/?0ed296e93523831ea0918d42dd1258c2\n\nThe above results are a geometric mean of benchmarks obtained with PostgreSQL\n`client driver benchmarking toolbench \u003chttps://github.com/MagicStack/pgbench\u003e`_\nin June 2023 (click on the chart to see full details).\n\n\nFeatures\n--------\n\nasyncpg implements PostgreSQL server protocol natively and exposes its\nfeatures directly, as opposed to hiding them behind a generic facade\nlike DB-API.\n\nThis enables asyncpg to have easy-to-use support for:\n\n* **prepared statements**\n* **scrollable cursors**\n* **partial iteration** on query results\n* automatic encoding and decoding of composite types, arrays,\n  and any combination of those\n* straightforward support for custom data types\n\n\nInstallation\n------------\n\nasyncpg is available on PyPI.  When not using GSSAPI/SSPI authentication it\nhas no dependencies.  Use pip to install::\n\n    $ pip install asyncpg\n\nIf you need GSSAPI/SSPI authentication, use::\n\n    $ pip install 'asyncpg[gssauth]'\n\nFor more details, please `see the documentation\n\u003chttps://magicstack.github.io/asyncpg/current/installation.html\u003e`_.\n\n\nBasic Usage\n-----------\n\n.. code-block:: python\n\n    import asyncio\n    import asyncpg\n\n    async def run():\n        conn = await asyncpg.connect(user='user', password='password',\n                                     database='database', host='127.0.0.1')\n        values = await conn.fetch(\n            'SELECT * FROM mytable WHERE id = $1',\n            10,\n        )\n        await conn.close()\n\n    asyncio.run(run())\n\n\nLicense\n-------\n\nasyncpg is developed and distributed under the Apache 2.0 license.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicstack%2Fasyncpg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicstack%2Fasyncpg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicstack%2Fasyncpg/lists"}