Integrating Tortoise ORM into a FastAPI App

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

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

  • @parttimelarry
    @parttimelarry 4 года назад +2

    Thanks for this. Been following your channel for a long time and it inspired me to create a channel myself! Had never heard of this ORM and am interested in trying something new.

    • @grizthegriffdog9939
      @grizthegriffdog9939 3 года назад

      you guys would get along great I bet ! Larry im currently doing your stockscreener tutorial with fastapi and sqlalchemy and it's completely blowing my mind, in full learn mode. Sqlite3 all weekend! Thanks for all you guys do ! keep up the good work, amazing stuff.

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

      *\(^___^)/* :😺

  • @legendnic6339
    @legendnic6339 4 года назад +7

    Hey this is great! I hope you can show how to create an app using tortoise orm + JWT authentication

  • @3bu22
    @3bu22 4 года назад +6

    Thank you! Been looking for how to do this..

  • @negoy100
    @negoy100 3 года назад +1

    Great Tutorials. To the point and great clarity

  • @julioargumedo6722
    @julioargumedo6722 4 года назад +3

    Anthony did it again!

  • @Vijay-Yarramsetty
    @Vijay-Yarramsetty 3 года назад +1

    very well made. You are next to Corey Schafer in explaining things.

  • @Thomas-sx5uz
    @Thomas-sx5uz 3 года назад +1

    Hi thamk you very mush for this video but i havr a the little problem : how can i modify just one attribut of a model a generated from my in my db with the update() method, cause it's seem that i have to each time rewrite all the fields of the object in question. Thanks you

  • @Zahgamer34mc
    @Zahgamer34mc 2 года назад +1

    what if your models in the other file wich is in other dircetory like projectrootdirectory/database/models.py? I should put ["database/models"]? Or ["database.models"]?

  • @krithickj2326
    @krithickj2326 3 года назад

    i am just a begginer and its very useful to me. Thank you.

  • @amirkonjkav5374
    @amirkonjkav5374 2 года назад +1

    is it possible to tell me how to see your fastapi videos because i couldnot find a playlist for them?

  • @vishallimgire6181
    @vishallimgire6181 4 года назад +2

    Thank nice video waiting video for fastapi with mongodb

  • @EricSouzarys
    @EricSouzarys 4 года назад +3

    My only concern with tortoise its the fact that still does not have migrations (according to documentation). But FastAPI with Tortoise is gonna be awesome in the future

    • @QWACHU
      @QWACHU 4 года назад +1

      There is workaround for this... Good for start:
      github.com/tortoise/tortoise-orm/issues/8#issuecomment-534946871
      gist.github.com/long2ice/0c9153d70fa2a08ec177fb2643820f3b
      But yes, it might be a cool alternative for SQLAlchemy.
      In my every day work ad Data Warehouse Developer I was thinking about migration script written in Python, that works as CLI tool and it is similar to alembic, but works more like this workaround: querying DB Objects (first wrappers would be MS SQL and Oracle - because techs I work with), and stores schemas in sqlite files, then can generate scripts as differences between revisions similar way as GIT to create bd patches for data warehouse migration scripts.. Maby I should rethink this again..

    • @prettyprinted
      @prettyprinted  4 года назад +1

      Yeah, it's on the roadmap for now. Hopefully migrations come soon.

  • @9conky295
    @9conky295 4 года назад +3

    It would be great if you could make a tutorial about how to create auth system that allows users to belong to multiple organizations/companies (like in Notion or Sentry) and the ability to switch between organizations etc. There is no tutorial like this in the internet :) It's a basic feature in SaaS apps nowadays. It could be in FastAPI or in Flask.

  • @Matt-kd7xm
    @Matt-kd7xm 4 года назад +1

    great video! i have a question in this same example is there a method to know how much time it is taking for each method??? because i dont know how to do it (if there is a way)

  • @uweopfern
    @uweopfern 4 года назад +1

    Thank you so much this was awesome and may you create another one for serializing Pydantic data which is having related data, let's say you have cities belongs to a user, and stuff like that I have found that so complicated and until now I am enabled to figure it out

  • @TheAremoh
    @TheAremoh 3 года назад +1

    I tried using the tortoise signal to create a signal like we have in django, but it's not working. Any work around?

  • @novasangeeth
    @novasangeeth 4 года назад +3

    Hey Thanks for the great content. Can you please show how the update (PUT and PATCH) methods are implemented using tortoise-orm

  • @LookNumber9
    @LookNumber9 3 года назад +1

    Another request for PUT or PATCH methods in tortoise-orm

  • @abessesmahi4888
    @abessesmahi4888 4 года назад +2

    Awesome!,
    Can you upload a tutorial showing how to do database migrations in FastAPI + some Async ORM?
    Thank you so much.

    • @lmishin
      @lmishin 2 года назад +1

      Tortoise is async ORM...

  • @how2videeios
    @how2videeios 3 года назад +1

    Thank you for this great video on the async ORM. Can you do one for MySQL that is hosted in a different server?

  • @semrana1986
    @semrana1986 4 года назад +1

    great stuff...

  • @paco2997
    @paco2997 4 года назад +1

    Great video, but i'm not sure if I should use TortoiseORM or databases+sqlalchemy for async db ? Also, a JWT video with fastapi would be awesome.

  • @ihsanmohamad521
    @ihsanmohamad521 4 года назад +1

    Thank you so much!

    • @prettyprinted
      @prettyprinted  4 года назад +1

      You're welcome! Thanks for watching!

  • @chriskeo392
    @chriskeo392 3 года назад +1

    What do you use to create a interactive web UI? For the FastAPI and tortoise?

  • @cepuofficial9025
    @cepuofficial9025 3 года назад +1

    Very nice tutorial.. thanks a lot.. could you create jwt authentication tutorial with orm?

  • @georgesmith3022
    @georgesmith3022 4 года назад

    lets say that a query takes too long. Will the browser return immediately? in this case what will show as a result?

  • @samiral-subhi6714
    @samiral-subhi6714 4 года назад +1

    Thank you for the great tutorial. I am following you as I recently started using FastAPI. I have a question though, why tortoise and not gino ?

  • @shubhenduvatsa2848
    @shubhenduvatsa2848 4 года назад +1

    Hey Anthony it would be great if you could make a tutorial about how to use atlas mongodb with fastapi.
    Thank you!

  • @LookNumber9
    @LookNumber9 3 года назад +1

    This worked for my Blog example:
    @app.put("/blogs/{blog_id}")
    async def update_blog(blog_id: int, blog: BlogIn_Pydantic):
    ''' Update blog post '''
    await Blog.filter(blog_id=blog_id).update(**blog.dict())
    return f"Successfully updated Blog ID {blog_id}."

  • @gaatutube
    @gaatutube 4 года назад +2

    SqlAlchemy also seems to have a asyncio version (though its docs say it is still alpha level). But its syntax seems much more cleaner than this Tortoise ORM -- which I find quite convoluted.

  • @joetibcodes7827
    @joetibcodes7827 4 года назад

    Could you teach how to do cookie/session authentication in the next video?