Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLModel: Reduce redundant SQLAlchemy/Pydantic model definitions #323

Open
sync-by-unito bot opened this issue Jun 2, 2024 · 0 comments
Open

SQLModel: Reduce redundant SQLAlchemy/Pydantic model definitions #323

sync-by-unito bot opened this issue Jun 2, 2024 · 0 comments
Assignees

Comments

@sync-by-unito
Copy link

sync-by-unito bot commented Jun 2, 2024

Summary

{quote}SQLModel is a library for interacting with SQL databases from Python code, with Python objects. It is designed to be intuitive, easy to use, highly compatible, and robust.

SQLModel is based on Python type annotations, and powered by Pydantic and SQLAlchemy.{quote}

Links

Examples:

from typing import Optional

from sqlmodel import Field, SQLModel


class Hero(SQLModel, table=True):
    id: Optional[int] = Field(default=None, primary_key=True)
    name: str
    secret_name: str
    age: Optional[int] = None

┆Issue is synchronized with this Jira Story

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

No branches or pull requests

1 participant