Onlymaps — лёгкая Python-библиотека (micro-ORM) для работы с базой данных через обычные SQL-запросы.
from onlymaps import connect
from pydantic import BaseModel
class User(BaseModel):
name: str
age: int
with connect("postgresql://user:pass@localhost:5432/mydb") as db:
users: list[User] = db.fetch_many(User, "SELECT name, age FROM users")
#Python #ORM #SQL #Pydantic #PostgreSQL #MySQL #SQLite #AsyncPython #MicroORM #DatabaseTools
https://github.com/manoss96/onlymaps
Please open Telegram to view this post
VIEW IN TELEGRAM
GitHub
GitHub - manoss96/onlymaps: A Python micro-ORM
A Python micro-ORM. Contribute to manoss96/onlymaps development by creating an account on GitHub.
1🔥4👍2