SQLAlchemy
The most powerful Python SQL toolkit and ORM.
Intermediate
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
class Base(DeclarativeBase): pass
class Sensor(Base):
__tablename__ = "sensors"
id: Mapped[int] = mapped_column(primary_key=True)
name: Mapped[str]
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.