Skip to content

Add pydapper to database drivers#108

Open
zschumacher wants to merge 1 commit intotimofurrer:mainfrom
zschumacher:patch-1
Open

Add pydapper to database drivers#108
zschumacher wants to merge 1 commit intotimofurrer:mainfrom
zschumacher:patch-1

Conversation

@zschumacher
Copy link

@zschumacher zschumacher commented Apr 4, 2023

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

@timofurrer
Copy link
Owner

@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!

@zschumacher
Copy link
Author

hey @timofurrer - yeah, I had a kid and slowed down a bit, but plan to pick it up more this year. Just cut a release, actually. We used it at Simplebet and now at DraftKings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants