zschumacher/pydapper
zschumacher/pydapper has 78 GitHub stars and 13 forks. GitHot measured 0 in 7 days and 0 in 15 days. Last checked 2026-11-10 03:38 UTC. Last push 2026-11-05.
So werden diese Zahlen gemessen
A micro ORM for the python dbapi spec inspired by the Nuget package Dapper
Gemessener Sternzuwachs
- in 24h
- Aktualisierung verzögert
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Aktualisierung verzögert
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
README.md
Originalpydapper
A pure python library inspired by the NuGet library dapper.
pydapper is built on top of the dbapi 2.0 spec to provide more convenient methods for working with databases in python, with both sync and async dbapi support.
Help
See the documentation for more details and examples for configuring all of the connectors pydapper supports.
Installation
It is recommended to only install the database apis you need for your use case. Example below is for psycopg2!
pip
pip install pydapper[psycopg2]
poetry
poetry add pydapper -E psycopg2
Supported drivers
The database support docs go into further detail about how to connect to the different drivers pydapper supports.
In addition to psycopg2, pydapper also supports.
Sync dbapis
pymssqlmysql-connector-pythonoracledbgoogle-cloud-bigquerysqlite3psycopg
Async dbapis
aiopgpsycopg
Never write this again...
from psycopg2 import connect
@dataclass
class Task:
id: int
description: str
due_date: datetime.date
with connect("postgresql://pydapper:pydapper@localhost/pydapper") as conn:
with conn.cursor() as cursor:
cursor.execute("select id, description, due_date from task")
headers = [i[0] for i in cursor.description]
data = cursor.fetchall()
list_data = [Task(**dict(zip(headers, row))) for row in data]
Instead, write...
from dataclasses import dataclass
import datetime
import pydapper
@dataclass
class Task:
id: int
description: str
due_date: datetime.date
with pydapper.connect("postgresql+psycopg2://pydapper:pydapper@locahost/pydapper") as commands:
tasks = commands.query("select id, description, due_date from task;", model=Task)
(This script is complete, it should run "as is")
Buy me a coffee
If you find this project useful, consider buying me a coffee!
Ähnliche Projekte entdecken
Asabeneh/30-Days-Of-Python
Die Programmier-Challenge 30 Days of Python ist eine Schritt-für-Schritt-Anleitung, um die Programmiersprache Python in 30 Tagen zu lernen. Diese Challenge kann mehr als 100 Tage dauern. Gehe in deinem eigenen Tempo vor. Diese Videos können ebenfalls helfen: https://www.youtube.com/channel/UC7PNRuno1rzYPb1xLa4yktw
78,560 Sternegrafana/grafana
Offene und kombinierbare Plattform für Observability und Datenvisualisierung. Visualisiert Metriken, Logs und Traces aus mehreren Quellen wie Prometheus, Loki, Elasticsearch, InfluxDB, Postgres und vielen weiteren.
77,830 Sterneredis/redis
Für Entwickler, die echtzeitfähige, datengesteuerte Anwendungen erstellen, ist Redis der bevorzugte, schnellste und funktionsreichste Cache, Datenstrukturserver und die entsprechende Abfrageengine für Dokumente und Vektoren.
77,395 Sterneapache/superset
Apache Superset ist eine Plattform für Datenvisualisierung und Datenexploration.
75,473 Sterne