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

Should we integrate SQLModel into the package? #269

Open
havok2063 opened this issue Sep 3, 2024 · 1 comment
Open

Should we integrate SQLModel into the package? #269

havok2063 opened this issue Sep 3, 2024 · 1 comment
Labels
question Further information is requested

Comments

@havok2063
Copy link
Collaborator

havok2063 commented Sep 3, 2024

Should we integrate SQLModel into sdssdb for the SQLAlchemy models? I don't think this is strictly necessary for 1.0, but maybe this is something to consider for later. If we don't want a complete integration here, perhaps a smaller wrapper library could be considered.

Pros

  • Automatically creates pydantic models for validation / serialization for all our ORMs.
  • No need to duplicate code in downstream packages
  • Makes it easier to drop into future python API services / frameworks

Cons

  • Increases the dependency stack
  • No integration with peewee models
@havok2063 havok2063 added the question Further information is requested label Sep 3, 2024
@albireox
Copy link
Member

albireox commented Sep 3, 2024

I like the idea of exploring SQLModel. I haven't played a lot with it but it seems like a good idea and probably integrates well with things like FastAPI. I would leave this for after 1.0 but don't see any reason no t to include them for at least a subset of the schemas.

Maybe also interesting to discuss in the context of SQLA vs Peewee. I still like Peewee's simplicity, although haven't really looked too much into SQLA, but development seems to have stalled a bit and I think it's unlikely the developer will implement things like asyncio support (although it's possible that this could be implemented with very little change to sdssdb).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants