Fast API Crash Course Code-along | Build an app with Postgres, SQL Alchemy, Async, and more

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 ก.ย. 2024

ความคิดเห็น • 100

  • @hasnainhasib4548
    @hasnainhasib4548 2 หลายเดือนก่อน +4

    For someone new to FastAPI, this tutorial is invaluable. While other creators doing marathon you took your time, very easy to catch up .Thank you so much for your thorough explanation.

  • @aer0449
    @aer0449 2 ปีที่แล้ว +8

    I'm here after watching your tutorial on Git and Git hub beginners crash course that was really awesome 😅. Thank you so much for that.

  • @Aniket_0314
    @Aniket_0314 หลายเดือนก่อน +2

    I'm just getting started with fast api . I'm very excited to learn from this. Would leave a comment once i end up completing it

    • @Aniket_0314
      @Aniket_0314 28 วันที่ผ่านมา

      Took me a while but this is such a great tutorial . If you're reading this try this tutorial and be ready to google things or use gpt if you don't understand it. By the end you'll gain a lot of confidence and knowledge from this tutorial. Thanks Faraday 🥰

  • @anyyyel
    @anyyyel ปีที่แล้ว +2

    So far, I've only watched two minutes of the course. It seems promising. However, your voice is wonderful. Just making a note of it.

  • @dukeHH26
    @dukeHH26 8 หลายเดือนก่อน +2

    Very well explained and even complete to go on on ones own. I read and watched a lot on the topic on utube, udemy and what not... These 3 hours were very worthwhile investing. thanks so much.

  • @AlexMNet
    @AlexMNet 2 ปีที่แล้ว +18

    If anyone else is having trouble running the first autogenerated migration at 1:28:30 and the migration file is coming up empty in the def upgrade and def downgrade functions, open up the fast_lms database in postico and delete all the tables that we defined (users, student_courses, sections, profiles, courses, content_blocks, completed_content_blocks), also delete the empty migration file that was created and then try running the command again.

    • @wowomg3229
      @wowomg3229 ปีที่แล้ว +1

      confirming this workaround works. However, what is the root cause?

    • @prerit714
      @prerit714 ปีที่แล้ว +4

      @@wowomg3229 I am 2 months late, but I guess if you keep your uvicorn server running then tables are created for your database (I suspect it is sqlalchemy's doing)

    • @maxciencomp
      @maxciencomp 11 หลายเดือนก่อน

      Thanks! 1 year later it happened to me.
      I found it strange when she added this code before on the main file:
      user.Base.metadata.create_all(bind=engine)
      course.Base.metadata.create_all(bind=engine)

  • @laalbujhakkar
    @laalbujhakkar 9 หลายเดือนก่อน +3

    00:27:00 in Python 3.10 I had to declare bio: Optional[str]=None or it wasn't having any of it.

    • @akashsoren1368
      @akashsoren1368 21 วันที่ผ่านมา

      ty, i was struggling with this

  • @arochomsky9254
    @arochomsky9254 2 ปีที่แล้ว +1

    Her voice is so lovely, that makes the tuto even more enjoyable! And she also loves cats! =) Thanks!

  • @dinugherman8785
    @dinugherman8785 9 หลายเดือนก่อน +1

    Congrats for a great tutorial! I understand that Swagger/OpenAPI is very helpful in such contexts, and then I feel that for real-world projects an emphasis on a proper test suite, most likely using pytest, is actually more beneficial, and should have a higher priority over the OpenAPI UI.

  • @whichdude420
    @whichdude420 2 ปีที่แล้ว +3

    Ayyy lets goo.. One of my fav frameworks that I've been meaning to get into.

  • @leo3030100
    @leo3030100 9 หลายเดือนก่อน +1

    Thank you for the lesson! Your teaching method is excellent, congratulations on the content.

  • @sammathew535
    @sammathew535 ปีที่แล้ว +3

    At 2:02:30, Gwen tries to manually change things in the DB, which I feel is not the best practice - and defeats the purpose of using Alembic. The problem starts from the `students.json` file (shown at 1:35:26) which has integer values for the `role`, e.g., 2, 1, etc., instead of explicit, "student", "teacher". But this alone won't fix the issue and it's all because of the Enum class. The issue is more involved and I have a solution (I found over Stackoverflow) that is better than what Gwen suggests in 1:32:00.
    1. You should define sqlalchemy.Enum objects (say, Role_sa, ContentType_sa) in your user.py and course.py files in the models directory (which would be inheriting from python's enum.Enum that we defined, say, `Role` and `ContentType`). You could do it in the following way:
    ```
    # db/models/user.py
    import enum
    import sqlalchemy as sa
    class Role(enum.Enum):
    teacher = 1
    student = 2
    Role_sa = sa.Enum(
    Role, # defined above
    name="User role",
    create_constraint=True,
    metadata=Base.metadata,
    validate_strings=True,
    )
    ...
    # do the same for ContentType Enum and its corresponding sqlalchemy version
    ```
    2. Use them while creating the column of the tables in the models directory. Further you should import those same sqlalchemy Enum obects (Role_sa, ContentType_sa) into the alembic version file and use them while creating columns in the `op.create_table` function. No need to add a separate line afterwards, `op.add_column` as Gwen does. Additionally, you would need to add a few lines at the top of the upgrade function and at the end of the downgrade function.
    ```
    from db.models.user import Role_sa # defined above
    from db.models.course import ContentType_sa # defined above
    ...
    def upgrade():
    Role_sa.create(op.get_bind(), checkfirst=True)
    ContentType_sa.create(op.get_bind(), checkfirst=True)
    # ### Commands auto generated by Alembic - please adjust! ###
    op.create_table("users",
    ...
    sa.Column("role", Role_sa, nullable=True)
    )
    ...
    op.create_table("content_blocks",
    ...
    sa.Column("type", ContentType_sa, nullable=True
    ...
    ...
    def downgrade():
    ...
    ...
    Role_sa.drop(op.get_bind(), checkfirst=True)
    ContentType_sa.drop(op.get_bind(), checkfirst=True)
    ```
    Also, ensure that the seeding is done in the last version file (and add the is_active field in the JSON) so that you see this reflected in the tables.
    Now if you run the migrations, everything will work like a charm!

  • @godzilla870
    @godzilla870 8 หลายเดือนก่อน +1

    This is great! I love your work. For me its perfect! Fast API + VUE Really great resource, Thanks

  • @user-hy4sz8lx5z
    @user-hy4sz8lx5z 8 หลายเดือนก่อน

    I thought this was going to be a 3hrs fast api crash course but it ended up being a 2 days solving fast api crashes course

  • @abdikhaliqmohamoud3373
    @abdikhaliqmohamoud3373 2 ปีที่แล้ว

    You're doing great job, Faraday. I'm moving to this channel now. Things are very very simplified and english is better.

  • @TheHeroIsRisingUp
    @TheHeroIsRisingUp 13 วันที่ผ่านมา

    She is very intelligent. Please do FastAPI with Frontend.

  • @pratt8687
    @pratt8687 2 ปีที่แล้ว +3

    Love this tutorial, very clean and simple to understand. Thank you!

  • @victorychang1294
    @victorychang1294 5 หลายเดือนก่อน

    Thank you for such a detailed and informative course

  • @marloncesar4573
    @marloncesar4573 ปีที่แล้ว +1

    I really liked that keyboard sound 😅

  • @ebashirli
    @ebashirli 2 ปีที่แล้ว +3

    Thank you for this course and everything you do. I really learn from you a lot.
    On 1:27:36 you imported user and course modules and it caused upgrade(), downgrade() in autogenerated file were left unpopulated. It worked well when I changed it to imort class not file as `from db.models.user import User`.

    • @arjunbhaybhang
      @arjunbhaybhang 2 ปีที่แล้ว +1

      Hi its still not working for me, I tried both ways. any fix?

    • @myPhoneWasTaken
      @myPhoneWasTaken 2 ปีที่แล้ว +1

      I had a similar issue... alembic revision file just said "pass" in the upgrade and downgrade functions. But my problem was the server was still running, so .Base.metadata.create_all(bind=engine) had already created the tables and alembic didn't find anything to do. But the imports shown in the video worked for me: "from db.models import ..."

  • @michaelbroel6137
    @michaelbroel6137 2 ปีที่แล้ว

    Great tutorial, I had to turn my speakers up to the max to hear it though.

  • @MattPayneOrg
    @MattPayneOrg 2 ปีที่แล้ว +2

    Awesome class! Thank you very much. I'm looking forward to using all these things in a project.

  • @therollingambit5222
    @therollingambit5222 ปีที่แล้ว

    Followed this great tutorial with supabase as my postgres db :)

  • @user-mc3ep1es9m
    @user-mc3ep1es9m 2 ปีที่แล้ว

    I also look forward to watch your SQLModel edition. love you

  • @history2pie
    @history2pie 5 หลายเดือนก่อน

    we're so lucky to have you

  • @soufiboy8979
    @soufiboy8979 2 ปีที่แล้ว

    thank you that was helpful during my internship

  • @portiseremacunix
    @portiseremacunix 2 ปีที่แล้ว +3

    Thanks for the upload. I will watch it. It will be great to have time stamps for the contents. I wonder if JWT is covered..

    • @FaradayAcademy
      @FaradayAcademy  2 ปีที่แล้ว +1

      No JWT in this video. I'm adding some timestamps. Thanks.

  • @pietraderdetective8953
    @pietraderdetective8953 11 หลายเดือนก่อน

    would love to have a Quart crash-course.
    It's the async version of the popular Flask framework...but now almost all of its most important extensions are working with Quart via the quart-flask-patch.

  • @sep1ol
    @sep1ol ปีที่แล้ว +2

    what a great tutorial, thanks!!

  • @jamesjulius9826
    @jamesjulius9826 2 ปีที่แล้ว +1

    thank you very much, this was so informative.

  • @ThaEzioAuditore
    @ThaEzioAuditore 2 ปีที่แล้ว

    brilliant intro to this great framework ! cheers

  • @FranciscoAgamez
    @FranciscoAgamez 4 หลายเดือนก่อน +1

    The writer of fast API is from Colombia, South America! :)

    • @FaradayAcademy
      @FaradayAcademy  2 หลายเดือนก่อน

      I made this video so long ago. Did I say some thing about him being from somewhere else?

  • @melom.
    @melom. 2 ปีที่แล้ว

    Thank you for this course. Really appreciated and helpful, great job. I subscribed to your channel, a great explanation for a great framework!

  • @shamilponnath8285
    @shamilponnath8285 2 ปีที่แล้ว +1

    Thank you its Nice class ,

  • @C00lSpawn
    @C00lSpawn 2 ปีที่แล้ว

    Thank you! Nice course, very clean explanation!

  • @serujo123
    @serujo123 6 หลายเดือนก่อน

    Hi, i am watching this video, but how query views in postgre (not table). i get error for this. pls

  • @psgpyc
    @psgpyc 2 ปีที่แล้ว +1

    Loved it ❤️ Subscribed 🙏

  • @parvati27
    @parvati27 2 ปีที่แล้ว +1

    Really useful+I love your hair, thanks a lot ♥

  • @my_vk_vlogs
    @my_vk_vlogs 2 ปีที่แล้ว +1

    Nice introduction animation video I loved so much 😊

  • @patawee313
    @patawee313 2 ปีที่แล้ว +1

    Nice job, very detailed!

  • @BIM.development
    @BIM.development ปีที่แล้ว

    Awesome tutorial! Thank you so much

  • @shounakdey126
    @shounakdey126 6 หลายเดือนก่อน

    Nice course for beginners.
    It would be great if you could share how the update will work on the course model?

  • @giridhart
    @giridhart 2 ปีที่แล้ว +1

    Thank you.
    Could you do a video on using uuid as primary keys with FastAPi with postgres, tried to do it but having issues. It would be great if you could migrate one model to use uuid primary key.

  • @Lotrick
    @Lotrick 2 หลายเดือนก่อน

    1:35:24
    students have role set to 2 in the json file, but
    1:37:23
    they all have role set to NULL in the db
    why?

  • @hasanmougharbel8030
    @hasanmougharbel8030 2 ปีที่แล้ว +1

    Hello there, God bless your efforts.
    I am a new sql learner having a general enquiry.
    How a company manages to write a documentation of its own sql application?
    I would be so grateful for any kind of help.

  • @user-ju5zm4vw1n
    @user-ju5zm4vw1n 7 หลายเดือนก่อน

    Very informative 👍

  • @prerit714
    @prerit714 ปีที่แล้ว

    Thanks for the course :)

  • @vikashkumar-ph3bd
    @vikashkumar-ph3bd ปีที่แล้ว

    @Faraday Academy. I am trying to inserting the bulk data via alembic but it is not working. Can you help me here ?

  • @rashmimanandhar7828
    @rashmimanandhar7828 2 ปีที่แล้ว

    Love this tutorial 🥰🥰..

  • @user-iw7il6zq6j
    @user-iw7il6zq6j ปีที่แล้ว

    Thanks you're so cool.

  • @kartikramesh8695
    @kartikramesh8695 10 หลายเดือนก่อน

    Thank you for the tutorial, it was very helpful. I was wondering is there a way to find out why the seed data is not migrated to my database. I see python code is reading the json file but it’s not inserting the seed data.

  • @trunglv5603
    @trunglv5603 10 หลายเดือนก่อน

    Great! Thanks you.👏

  • @Statuspoint618
    @Statuspoint618 2 ปีที่แล้ว +1

    Hi good work keep it up.

  • @oraclelong8290
    @oraclelong8290 2 ปีที่แล้ว

    Awesome video! I cant find JavaScript for a beginner on your TH-cam channel...

  • @michaelmclean2363
    @michaelmclean2363 2 ปีที่แล้ว

    Discord link is invalid, I can't sign up for your newsletter even though I have a valid email it shows invalid.

  • @MyEconomics101
    @MyEconomics101 2 ปีที่แล้ว +1

    Bookmarked.

  • @chipayres4070
    @chipayres4070 ปีที่แล้ว

    Well done!!

  • @luiscevallos1
    @luiscevallos1 2 ปีที่แล้ว +1

    Thanks.. I have a question how a endpoint can retrieve a file like xls or pdf result of a query in any database I mean i have a query i want to transform that query with parameters in excel file in my end point.. Thanks have a nice day

    • @FaradayAcademy
      @FaradayAcademy  2 ปีที่แล้ว +1

      You mean you want to generate a xls or pdf file from data when you hit that endpoint? There are some good libraries for that. I used Borb recently to generate pdfs in Python and that worked well

    • @luiscevallos1
      @luiscevallos1 2 ปีที่แล้ว

      @@FaradayAcademy yes .. please can make some kind of video how to implement this library inside endpoint

  • @mdaslamknl
    @mdaslamknl 9 หลายเดือนก่อน

    Good

  • @renancatan
    @renancatan 2 ปีที่แล้ว

    nice! can you build something in the front-end as the part 2 of this video?

  • @clearthinking5441
    @clearthinking5441 ปีที่แล้ว

    Why do the query param constraints show up on the frontend but the path param constraints do not? Is that a bug?
    th-cam.com/video/gQTRsZpR7Gw/w-d-xo.html

  • @samzong
    @samzong 2 ปีที่แล้ว +1

    Hi Faraday , Thanks for you videos , i have a question, i I'm not familiar with pgsql , do u have some document about mysql ?

    • @FaradayAcademy
      @FaradayAcademy  2 ปีที่แล้ว +1

      No, I really don’t use MySQL anymore and I’m not sure if I will ever make a tutorial on that.

  • @samm9840
    @samm9840 ปีที่แล้ว

    Thanks Gwen. Can you/someone mention the DB viewers that you used. You mentioned DBeaver, but there was still another one, which I did not pick up. Thanks once again.

    • @samm9840
      @samm9840 ปีที่แล้ว

      It is shown at 1:03:00

  • @Timebeing-98
    @Timebeing-98 ปีที่แล้ว

    Can anyone write test cases in fastapi for login successful and get homepage as a result??

  • @abdulrafay1951
    @abdulrafay1951 2 ปีที่แล้ว

    Please make a tutorial of deploying this to aws/digital ocean

  • @mj-lc9db
    @mj-lc9db 2 ปีที่แล้ว

    Hey can u do a tutorial on FastAPI and Vue.js?

  • @zawadbinsharif
    @zawadbinsharif 2 ปีที่แล้ว +1

    Uh
    I can't wait any longer.
    Still 16h 🙄

    • @FaradayAcademy
      @FaradayAcademy  2 ปีที่แล้ว +1

      😁 I hope it’s worth the wait for you.

  • @pietrovitale6369
    @pietrovitale6369 2 ปีที่แล้ว

    The discord invite is expired :(

  • @saman_729es
    @saman_729es 2 ปีที่แล้ว

    What is the difference between this course and that 4 hour fast api course?

    • @FaradayAcademy
      @FaradayAcademy  2 ปีที่แล้ว +2

      The other one on my channel is a live stream. This video is an edited tutorial.

  • @aswathvanan3833
    @aswathvanan3833 ปีที่แล้ว

    can you update the file in github?

  • @technoschool3351
    @technoschool3351 2 ปีที่แล้ว

    mam Can use please make a video on how to calculate idle time in vuejs

  • @andreskreuzburg7232
    @andreskreuzburg7232 ปีที่แล้ว

    cuando lo anexas a Vue js Saludos!!!

  • @muzafferckay2609
    @muzafferckay2609 2 ปีที่แล้ว

    Ben bu Vim'i bir türlü öğrenemedim ya :(

  • @1month531
    @1month531 2 ปีที่แล้ว

    I love your content but I have one question.
    python programming language or scripting language

    • @FaradayAcademy
      @FaradayAcademy  2 ปีที่แล้ว

      Python is for scripting too. Are you asking which language to learn? Depends on what you are trying to do or looking for in a programming language.

  • @StepsToEffectiveParentin-iz9xd
    @StepsToEffectiveParentin-iz9xd 8 หลายเดือนก่อน

    Now you are my crash=) not your crash course

  • @johnnynephrite6147
    @johnnynephrite6147 2 ปีที่แล้ว +1

    this isnt an app, its an api. wheres the front end?

  • @abraham_aitel
    @abraham_aitel ปีที่แล้ว

    Oh gosh! You are so cute ❤

  • @Pscytlk
    @Pscytlk ปีที่แล้ว

    increase the volume lady!

  • @andrirahmadani1332
    @andrirahmadani1332 24 วันที่ผ่านมา

    Thank u so much