MagicStack / MagicStack/asyncpg
Split library into two parts: DB-API 2.0 compatible and Asyncio style
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.1k
- Forks
- 468
- PR merge metrics
- No merged PRs in 30d
Description
I am very interested in using this library since type support in `psycopg2` is awful to work with. However, some projects still use Python 2.7, and will for another 4 years. Would it be possible to split `asyncpg` into two parts, one with an asynchronous API, usable with Python 3.5 and above, and one synchronous API that can be compatible across both 2.7 and 3.5 and above?
My proposal is a DB-API 2.0 ([PEP 249](https://www.python.org/dev/peps/pep-0249/)) compatible API that can be utilized by the `asyncio` part of the library. The benefits is that applications that do not need asynchronous calls can use the same underlying library as those who do. With this code that doesn't rely on co-routines can use the type support provided by `asyncpg`.
I haven't used this project yet, or dived into its internals, and don't know whether it is feasible at all to do this. I am just venting my ideas.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no implementation files or tests. Start by reviewing asyncpg's existing asyncio API and comparing the proposed synchronous DB-API 2.0 interface with PEP 249 and Python 2.7 compatibility. Because this is an exploratory architectural proposal, maintainers would need to define feasibility, scope, and a measurable done state first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100