Hi guys! There are better approaches to creating the database connection. We can make a start up function or a lifespan event that will create the database connection on the app starting.
Thanks Jonathan. Glad to see a FastAPI video with the latest SQLAlchemy way of defining models. Based on the comments below my next needs would also be alembic migrations, how to seed the database with data, and seeing some other object that has a relationship to the Notes object via foreign key (perhaps these are notes about a Video). One thing that nobody's FastAPI tutorial shows and would be very useful: If the database schema already exists, what is the way to build equivalent models and schemas from the existing tables. In many situations people are building apps that have to map from a db with tables and data already in it and seeing how to correctly work that way would be very helpful in the real-world.
Any plans on integrating the alembic in the project? By the way the video covers everything, but would be good how to add soft delete and how we deploy this and how we can have continuous integration.
In most tutorials the database connection is done with the dependency injection that comes with fastapi. the reason you don't use it is because you are writing asynchronously?
you create databse with python comand python3 db.py but in production we need to use somwthing like we use before sqlalchemy 2.0 models.Base.metadata.create_all(bind=engine) can you help me what to use now
Hi guys! There are better approaches to creating the database connection. We can make a start up function or a lifespan event that will create the database connection on the app starting.
Hi everyone! This is one really unscripted video. Please expect to see me get bugs and also fix them. Thanks for watching. I appreciate.
Thanks Jonathan. Glad to see a FastAPI video with the latest SQLAlchemy way of defining models. Based on the comments below my next needs would also be alembic migrations, how to seed the database with data, and seeing some other object that has a relationship to the Notes object via foreign key (perhaps these are notes about a Video). One thing that nobody's FastAPI tutorial shows and would be very useful: If the database schema already exists, what is the way to build equivalent models and schemas from the existing tables. In many situations people are building apps that have to map from a db with tables and data already in it and seeing how to correctly work that way would be very helpful in the real-world.
Thanks so much, Marshal. I am working to make a playlist ion such topics. Thanks for the nice feedback
Thanks sir!
For next video i'll wait your talk about Microservices and FastAPI
Exactly what I was looking for. Thank you for structured explanation and examples.
You're very welcome! Thanks for watching
Great video! I really appreciate how thorough you are in describing everything.
Glad it was helpful!
Ah! The Exact Stack I was looking for, Thank You Jonathan!
Thank you very much muganda wange for this video. I've learnt a lot from it.
I am glad you did. Webale
Thanks Jonathan 😁
Welcome
Good content, keep in mind making more extensive videos from Fastapi, with jwt and more funcionality please
Sure. Thanks for warching
Well done again! Thanks.
Glad it helped. Thanks for watching
excelente video amigo me has aclarado algunas dudas.
This is an amazing video Jonnathan! keep it up, i try seting my own "id" to be auto_incremental_by 1, but i couldn't while coding along side with you🤔
Kindly show me how you set up your model
You're the man 🎉
Thanks for watching bro
airtel should pay for the ad Hahaha
😂😂😂😂😂
Lets go 💪
'AsyncEngine' object is not callable why ??
Kindly point me to that part of the video. I will love to help
Any plans on integrating the alembic in the project? By the way the video covers everything, but would be good how to add soft delete and how we deploy this and how we can have continuous integration.
Sure. I will in the future
wow!
have you listen about Alchemical? it simplify SQLAlchemy session, engine, etc. By the way great tutorial, thx
I'll check it out! Thanks for the tip. Thanks for watching
Nice content :')
Thanks. Glad you like it
In most tutorials the database connection is done with the dependency injection that comes with fastapi. the reason you don't use it is because you are writing asynchronously?
Sure. Database connection can be done using dependency injection. For the purpose of keeping it simple, I didn’t use it. However you can still use it
Using dependency injection is also quite simple, if u need help let me know
@@timbrap4693 i solved it mate. thanks anyway
you create databse with python comand python3 db.py but in production we need to use somwthing like we use before sqlalchemy 2.0 models.Base.metadata.create_all(bind=engine) can you help me what to use now
In production, you may consider to use Alembic. A tool for database migrations with SQLAlchemy
@@SsaliJonathan Thanks
why are we using the async version of sqlalchemy?
having an async database sesson means that you no longer have to worry about database operations blocking async path
Thanks for watching