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

Add databases support with using async SQLAlchemy #46

Open
1 task done
Tracked by #53
rszamszur opened this issue Feb 10, 2022 · 4 comments
Open
1 task done
Tracked by #53

Add databases support with using async SQLAlchemy #46

rszamszur opened this issue Feb 10, 2022 · 4 comments
Assignees
Labels
copier: project Related to copier template enhancement New feature or request

Comments

@rszamszur
Copy link
Member

rszamszur commented Feb 10, 2022

  • I have searched the issues of this repo and believe that this is not a duplicate.

Feature Request

Draft implementation plan:

Core:

Generators:

Extra:

Documentation:

This still needs more research and clarification. Some implementation concepts might change during the development of this feature.

@rszamszur rszamszur added enhancement New feature or request copier: project Related to copier template labels Feb 10, 2022
@rszamszur rszamszur mentioned this issue Feb 15, 2022
58 tasks
@jeanlst
Copy link

jeanlst commented Mar 23, 2022

@rszamszur why not use async sqlalchemy? SQLModel seems pretty good so we but I feel it's not really that mature yet and the releases are taking a lot of time. Also SQLAlchemy is kinda of a staple I feel like

@rszamszur
Copy link
Member Author

rszamszur commented Mar 25, 2022

@jeanlst To be honest, I've initially chosen SQLModel since it combines pydantic and SQLAlchemy which is exactly what I wanted to do. Also since tiangolo has a lot of followers I assumed this project will gain a decent amount of contributors quickly, So I would end up implementing the same solution but heavily outnumbered 😆. Lastly, I guess I wanted to go the easy way.

However, you're right in terms of maturity and release frequency. Also from what I've seen async session is not fully implemented, so no performance advantage (yet). Async SQLAlchemy it is then :) Thanks for the input!

Have a good one!

@jeanlst
Copy link

jeanlst commented Mar 26, 2022

Nice! I'm keeping tabs on the project and you have been doing a great job so far! I'm still getting into all this stuff so I haven't been that helpful yet, bot hopefully in the future!

@rszamszur rszamszur changed the title Add databases support with using SQLModel Add databases support with using async SQLAlchemy Apr 2, 2022
@rszamszur
Copy link
Member Author

@jeanlst just wanted to let you know, that this feature is next in line to implement. I don't know the ETA since there is some degree of unknown regarding how this will be implemented exactly. But this and few other issues combined will be a whole deal:

  • Databases support (this particular issue)
  • Generating models and migrations
  • Generate whole resource scaffold (meaning controller + model + migrations + tests)
  • Depending on chosen DB engine, add database HA cluster deployment in K8s (similar to Redis in make dev-env) but also I want to create another script for just deploying application stack in Kubernetes. It'll be probably a generator as well. I guess something like fastapi-mvc generate k8s-deployment [OPTIONS] [ARGS] in which you can choose what to include.

In the meantime controller and generator generators feature is already available with 0.11.0 release. It's not fully documented, but documentation itself got an upgrade too, and there is a basic howto on controller generator. Any feedback is always welcome :)

@rszamszur rszamszur added this to the Databases support milestone Apr 24, 2022
@rszamszur rszamszur self-assigned this Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
copier: project Related to copier template enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants