{"id":29272803,"url":"https://github.com/k-nrs/asyncpgpromise","last_synced_at":"2026-04-12T16:05:00.785Z","repository":{"id":178750730,"uuid":"662324176","full_name":"K-NRS/asyncpgpromise","owner":"K-NRS","description":"Python implementation of `pg-promise` in nodejs","archived":false,"fork":false,"pushed_at":"2023-08-13T22:55:20.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-17T07:05:01.887Z","etag":null,"topics":["asyncpg","pg-promise","postgresql","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/asyncpgpromise/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/K-NRS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-07-04T22:02:18.000Z","updated_at":"2023-09-07T08:13:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"c2ee7f6a-562b-4058-9d94-97fe40302a69","html_url":"https://github.com/K-NRS/asyncpgpromise","commit_stats":null,"previous_names":["k-nrs/asyncpgpromise"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/K-NRS/asyncpgpromise","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K-NRS%2Fasyncpgpromise","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K-NRS%2Fasyncpgpromise/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K-NRS%2Fasyncpgpromise/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K-NRS%2Fasyncpgpromise/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/K-NRS","download_url":"https://codeload.github.com/K-NRS/asyncpgpromise/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K-NRS%2Fasyncpgpromise/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273703437,"owners_count":25153000,"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-05T02:00:09.113Z","response_time":402,"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":["asyncpg","pg-promise","postgresql","python"],"created_at":"2025-07-05T01:10:43.787Z","updated_at":"2026-04-12T16:05:00.732Z","avatar_url":"https://github.com/K-NRS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AsyncPGPromise\n\n## Motivation\n\nThe creation of AsyncPGPromise was primarily driven by an aspiration to bring the clean API and named arguments support, common in Node.js' `pg-promise``, to the Python ecosystem. The lack of such an approach in Python became more pronounced upon transitioning from Node.js, sparking the motivation to develop a solution. With Python's ultra-fast writing mold being a major encouraging factor, this tiny wrapper, AsyncPGPromise, was brought into existence to fill this gap and to provide a sleek and efficient means of handling PostgreSQL database operations.\n\n## Features\n\n- Simplicity: By using named arguments in your SQL queries, you can keep your code clean and readable.\n- Flexibility: All the power of the `asyncpg` library is still at your fingertips, with additional convenience provided by AsyncPGPromise.\n\n## Installation\n\n```bash\npip install asyncpgpromise\n```\n\n## Getting Started\n\nYou can create a new `AsyncPGPromise` instance with an existing `asyncpg` connection object:\n\n```python\nfrom asyncpgpromise import AsyncPGPromise\nimport asyncpg\n\n# First create an asyncpg connection\nconn = await asyncpg.connect(user='user', password='password', database='database', host='127.0.0.1')\n\n# Then pass it to AsyncPGPromise\npg = AsyncPGPromise(conn)\n```\n\n## Usage\n\n### Querying\n\nYou can perform SQL queries with named arguments:\n\n```python\nrows = await pg.query('SELECT * FROM users WHERE name = $name', name='John')\n```\n\nThe `query` method returns a list of dictionaries, each representing a row from the SQL query.\n\n### Fetching One Row\n\nIf you're only expecting a single row result, you can use the `one` method:\n\n```python\nrow = await pg.one('SELECT * FROM users WHERE id = $id', id=1)\n```\n\n## Note\n\nThis is a new project and may still have some rough edges. Contributions are very welcome!\n\n## To-Do\n\n- [ ] Parsing of fields with JSON data\n\n## License\n\nAsyncPGPromise is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk-nrs%2Fasyncpgpromise","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk-nrs%2Fasyncpgpromise","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk-nrs%2Fasyncpgpromise/lists"}