FastAPI Python framework - Returning HTML templates (with HTMX integration)

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

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

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

    The only reason why I feed my TH-cam algorithm with creators having a small number of subscribers is to not miss out on such an incredibly good TH-cam channel like this one. Thank you, you have helped me a lot with the {%for file in files%} {%endfor%} :-*

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

      Thanks so much Aleksa! I'm glad the videos have helped. Thanks for watching and for the nice message!

  • @falcomomo
    @falcomomo ปีที่แล้ว +6

    Fantastic tutorial. Every step so clear and well described. I don't know why everyone doesn't do tutorials like this.

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

      Thanks a lot for the feedback! Delighted to hear that. Will have more FastAPI stuff coming up soon!

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

    This is great! I appreciate how you iterate to the final solution and recap the material at the end. I think that makes the video really effective. Good stuff.

  • @_indrid_cold_
    @_indrid_cold_ 6 หลายเดือนก่อน +1

    Phenomenal. I had been wondering about switching from Flask to FastAPI for some small web projects and this has convinced me to go for it. When I saw you were pulling in Tailwind I just knew you could be trusted. Excellent stuff this.

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

      Thanks a lot for the comment, much appreciated!

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

    your videos about FastApi that what I need! Doing a project now, I am newby in FastAPI, my project will be a Poll for teachers

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

      Thank you! Good luck with your project - if you have any ideas for videos/series, just let me know!

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

    thanks for the good video For non-English speaking Asians, your correct pronunciation is much easier to understand than an American's more difficult pronunciation. - From Korea

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

      Thank you! I'm glad my pronunciation can be understood more easily, especially as I'm from Scotland (we have very distinctive accents).
      PS - I look forward to visiting Korea one day!

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

      @@bugbytes3923 How interesting that the Scottish accent is easier to understand. I wonder what Koreans make of other accents from the UK?

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

    Great, Don't have enough praise for your python contents.

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

    Thanks - first video of yours I've seen, and it solved my beginner problem with Jinja2 templates. Cheers, from a fellow Scot

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

      Thanks - glad the video helped! Cheers from Glasgow.

  • @mj2068
    @mj2068 6 หลายเดือนก่อน +1

    love your style, fast pace, dense and information rich, help me to focus and pay attention. keep up the great work.😊

    • @bugbytes3923
      @bugbytes3923  6 หลายเดือนก่อน +1

      Thanks a lot, really nice comment - cheers!

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

    Wow! First time seeing one of your videos. STELLAR explanation. Subscribed. Thank you.

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

      Awesome, thank you Eric!

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

    I've been looking all over for this topic, thank you!

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

      Thank you for watching, Arunen!

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

    Nice delivery. Well explained. Nice!

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

      Thanks a lot!

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

    Great content man. As always.
    Looking forward to your content on using Fastapi as a full-fledged backend including django like user authentication.

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

      Thanks!
      I'll explore FastAPI, along with more Django, in the coming months!

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

      @@bugbytes3923 Awesome!

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

    You're awesome mate. Really liking your videos. Keep it up!

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

      Thanks a lot, good to hear! Thanks for watching.

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

    Hea @BugBytes, I really love your teaching.
    Can we get a full course on returning HTML templates, alongside working with forms with FastAPi please?

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

    “We don’t want a table embedded in a button as arguably not a best user experience “ Love that part 😂

  • @junivensaavedra882
    @junivensaavedra882 11 หลายเดือนก่อน +1

    This is GOLD Man, my gratitude. :)

    • @bugbytes3923
      @bugbytes3923  11 หลายเดือนก่อน +1

      Thanks a lot man!

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

      @@bugbytes3923 I also loved your Django + HTMX series. :)

  • @AlexGarcia-ir7fl
    @AlexGarcia-ir7fl 3 หลายเดือนก่อน

    Do you know if there is something like Django-Compressor for FastAPI for sending static files like scripts? I am interested in combining this with pytailwindcss, it requires a build step but you get minimal css when using tailwind. Great tutorial btw!

  • @Felipe-bi3mk
    @Felipe-bi3mk 9 หลายเดือนก่อน

    Nice tutorial! I would have done 2 endpoints instead of looking at the headers, why that was your choice?

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

    Just what I was looking for, thanks !!!

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

    Beautifully done! Thank you.

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

    Nice video. Is there a second part with the DB setup? Thanks.

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

    Hey thanks for the awesome content i was looking for FastAPI training.
    I am having a issue and i couldn't solve it even i copy paste your codes. Whatever i do i can't get list of movies output. I only get
    Movie List
    {% include "table.html" %}
    Film Name Director
    Load More
    this format. Can you help me or do you have any solution?

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

    Thanks bro! What about xxs attacks in this case ?
    In Django we have security from the box , what about fastapi?

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

    Great series! And I like the accent 😅

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

      Thank you! 😅

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

    awesome content

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

    amazing video

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

    Superb

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

      Thanks a lot!

  • @seol-.-
    @seol-.- 10 หลายเดือนก่อน

    Too GOOOD!

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

      Thanks a lot!

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

    What about SSE with jinja2 produced HTML partials in FastAPI?? 😮

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

    I bet these videos suddenly became more popular right now?

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

    hey great tutorial, how can I get rid of the validation error when calling serverip:port/docs ? It says something like: Schemas -> HTTPValidationError some type error (tested with your repo) thx in advance

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

    Is HTMX lighter than a kilogramme of steel or a kilogramme of feathers?

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

    Thanks a lot for the video, as always it is very good. Was there any reason you did not use django-ninja here?

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

      Thank you for the comment!
      django-ninja is good for working with Django - however, FastAPI is a fantastic Python framework itself for web apps. I wanted to demonstrate its use with templates and HTMX in this video.
      dango-ninja also gets most of its ideas/style from FastAPI. Both are very good choices for developing APIs in Python.

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

    Awesome tutorial. Can you please do one video with JWT token authentication.

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

    Used the same code like you, but my min-w-[50%] doesn't make the table like yours. Only min-w-full works.

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

    Tailwind CSS CDN not to be used in Production warning

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

    gut. I want to use python function in html. Do you have an idea?
    For example, I want to perform string operations on {{ film.name }} in index.html in this example. Or I want to import an additional library and use it in html. didn't work. it does not memorize the variable. Actually how can round(), time.ctime() be used in html for example. I want to apply it to data from table rows.

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

      You would do this in the route definition of your python. I added the following to the main.py and then adding a calc.html in templates which rounds a number 4.555 and displays 5.
      @app.get("/calc/", response_class=HTMLResponse)
      async def calculation(request: Request):
      calc = round(4.555)
      context = {"request": request, 'calc': calc}
      return templates.TemplateResponse("calc.html", context)
      and you need to call from templates/calc.html your variable calc like {{ calc }} in the body

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

    plz do more fastAPI and htmx

    • @bugbytes3923
      @bugbytes3923  8 หลายเดือนก่อน

      Thanks a lot! Will do very soon.

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

    How about a streamlit as frontend and fastapi as backend tutorial? Rapid way to build a website. I would love to see it.

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

      I had planned to do some Streamlit videos later on, but integration with FastAPI might be interesting - will consider that one, definitely!

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

      ​@@bugbytes3923 Fascinating!