Building a REST API with FastAPI, Async SQLAlchemy, and PostgreSQL

Поделиться
HTML-код
  • Опубликовано: 11 сен 2024

Комментарии • 47

  • @SsaliJonathan
    @SsaliJonathan  7 месяцев назад +6

    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.

  • @SsaliJonathan
    @SsaliJonathan  Год назад +6

    Hi everyone! This is one really unscripted video. Please expect to see me get bugs and also fix them. Thanks for watching. I appreciate.

  • @marshall5862
    @marshall5862 9 месяцев назад +2

    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.

    • @SsaliJonathan
      @SsaliJonathan  9 месяцев назад +1

      Thanks so much, Marshal. I am working to make a playlist ion such topics. Thanks for the nice feedback

  • @the-antroy
    @the-antroy Год назад +3

    Thanks sir!
    For next video i'll wait your talk about Microservices and FastAPI

  • @user-cu9pd2kv2q
    @user-cu9pd2kv2q 4 месяца назад

    Exactly what I was looking for. Thank you for structured explanation and examples.

    • @SsaliJonathan
      @SsaliJonathan  4 месяца назад

      You're very welcome! Thanks for watching

  • @cusematt23
    @cusematt23 6 месяцев назад

    Great video! I really appreciate how thorough you are in describing everything.

  • @pudasainiaashutosh
    @pudasainiaashutosh Год назад

    Ah! The Exact Stack I was looking for, Thank You Jonathan!

  • @martinmiz
    @martinmiz 5 месяцев назад

    Thank you very much muganda wange for this video. I've learnt a lot from it.

  • @HimaniKapoor-c4x
    @HimaniKapoor-c4x 7 дней назад

    Thanks Jonathan 😁

  • @packo280349
    @packo280349 Год назад

    Good content, keep in mind making more extensive videos from Fastapi, with jwt and more funcionality please

  • @bharatruparel9424
    @bharatruparel9424 Год назад

    Well done again! Thanks.

  • @adonyslopez9173
    @adonyslopez9173 Год назад

    excelente video amigo me has aclarado algunas dudas.

  • @timothyatanda1188
    @timothyatanda1188 8 месяцев назад

    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🤔

    • @SsaliJonathan
      @SsaliJonathan  8 месяцев назад

      Kindly show me how you set up your model

  • @cosmahkennedy2073
    @cosmahkennedy2073 Год назад

    You're the man 🎉

  • @kayondoedward
    @kayondoedward Год назад +1

    airtel should pay for the ad Hahaha

  • @pushpakmaheshwari2808
    @pushpakmaheshwari2808 Год назад

    Lets go 💪

  • @diegomazorra3061
    @diegomazorra3061 9 месяцев назад +1

    'AsyncEngine' object is not callable why ??

    • @SsaliJonathan
      @SsaliJonathan  9 месяцев назад +1

      Kindly point me to that part of the video. I will love to help

  • @jijojoseph8721
    @jijojoseph8721 Год назад

    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.

  • @humbletitan8374
    @humbletitan8374 Год назад

    wow!

  • @dannisisgt
    @dannisisgt Год назад

    have you listen about Alchemical? it simplify SQLAlchemy session, engine, etc. By the way great tutorial, thx

    • @SsaliJonathan
      @SsaliJonathan  Год назад

      I'll check it out! Thanks for the tip. Thanks for watching

  • @vexymous
    @vexymous Год назад

    Nice content :')

  • @oktay9784
    @oktay9784 Год назад

    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?

    • @SsaliJonathan
      @SsaliJonathan  Год назад

      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

    • @timbrap4693
      @timbrap4693 10 месяцев назад

      Using dependency injection is also quite simple, if u need help let me know

    • @oktay9784
      @oktay9784 10 месяцев назад +1

      @@timbrap4693 i solved it mate. thanks anyway

  • @udaym4204
    @udaym4204 3 месяца назад

    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

    • @SsaliJonathan
      @SsaliJonathan  3 месяца назад +1

      In production, you may consider to use Alembic. A tool for database migrations with SQLAlchemy

    • @udaym4204
      @udaym4204 2 месяца назад

      @@SsaliJonathan Thanks

  • @razapanjwani786
    @razapanjwani786 8 месяцев назад

    why are we using the async version of sqlalchemy?

    • @SsaliJonathan
      @SsaliJonathan  8 месяцев назад

      having an async database sesson means that you no longer have to worry about database operations blocking async path

  • @suen-tech
    @suen-tech Год назад