awesome-asyncio icon indicating copy to clipboard operation
awesome-asyncio copied to clipboard

Add `pydapper` to database drivers

Open zschumacher opened this issue 2 years ago • 1 comments

What is this project?

A micro ORM that provides more convenient methods for working with databases in python. Has both sync and async apis for multiple databases, see example below:

import asyncio
import datetime
from dataclasses import dataclass

from pydapper import connect_async


@dataclass
class Task:
    id: int
    description: str
    due_date: datetime.date
    owner_id: int


async def main():
    async with connect_async() as commands:
        data = await commands.query_async("select * from task limit 1", model=Task)

https://pydapper.readthedocs.io/en/latest/

Why is it awesome?

  • Provides a consistent interface for multiple dbapis
  • Provides a consistent way to bind parameters across dbapis
  • Uses SQL as the query language instead of an ORM-like API
  • Provides lightweight object mapping to any object type, but typically used with pydantic, dataclasses, or dictionaries

zschumacher avatar Apr 04 '23 21:04 zschumacher

@zschumacher can you share if the project still receives updates? Hasn't had a release in a while and also no development in a while. I wonder if we should really add it to the list. Feel free to share your perspective!

timofurrer avatar Dec 01 '25 14:12 timofurrer