How to create & deploy an API in Python! (with interactive documentation)

Поділитися
Вставка
  • Опубліковано 7 чер 2024
  • In this video, we work through the process of creating and deploying a Python3 based API using libraries such as Flask, Flask-Restful, & Flasgger.
    Link to code: github.com/KeithGalli/python-...
    Part 2: • Python Project: Implem...
    In this first video, we start with the basics, setting up GET endpoints and learning how to deploy our API to the cloud (using Render.com). This part is crucial for understanding the core functions of APIs and making them accessible worldwide.
    In the second video, we progress to implementing POST requests and constructing a full-fledged Book Review API, similar to services like Goodreads. This involves integrating API functionality to post and retrieve book reviews from a database, with practical examples using Airtable for database interaction.
    Flasgger plays a crucial role in our tutorial, providing interactive documentation through its SwaggerUI integration. This feature allows you to visualize and interact with your API directly at localhost:5000/apidocs, offering a clear and user-friendly overview of your API's capabilities.
    Additionally, we cover essential practices like working with GitHub repositories, managing Python libraries, and employing Flask and Flask-Restful for API development. The skills in crafting effective GET and POST requests are emphasized, highlighting the importance of efficient system communication.
    This video is ideal for anyone keen on enhancing their Python programming, API development, and cloud deployment skills. Whether you're a beginner or an experienced developer, this tutorial provides valuable experience in developing well-documented and user-friendly APIs.
    Video timeline!
    0:00 - Video overview
    1:18 - What we're building
    3:20 - How to get setup with Github template code
    7:00 - Taking a look at the Flask, Flasgger Python3 code
    8:38 - Testing some API requests (GET) locally
    13:09 - Building another GET request endpoint (with multiple parameters)
    14:34 - Using ChatGPT to help us build another endpoint
    22:43 - Deploying our API to a live public URL endpoint (using render.com)
    -------------------------
    Follow me on social media!
    Instagram | / keithgalli
    Twitter | / keithgalli
    TikTok | / keithgalli
    -------------------------
    If you are curious to learn how I make my tutorials, check out this video: • How to Make a High Qua...
    Practice your Python Pandas data science skills with problems on StrataScratch!
    stratascratch.com/?via=keith
    Join the Python Army to get access to perks!
    UA-cam - / @keithgalli
    Patreon - / keithgalli
    *I use affiliate links on the products that I recommend. I may earn a purchase commission or a referral bonus from the usage of these links.

КОМЕНТАРІ • 28

  • @baldebalde9790
    @baldebalde9790 6 місяців тому +1

    This guy has a way of explaining things, it's just incredible.

  • @datawithtess
    @datawithtess 6 місяців тому +7

    Where did you go all this while. You left me in Nigeria Galli. It's not fair. Nice tutorial man

    • @KeithGalli
      @KeithGalli  6 місяців тому +5

      I'm sorry!! Will try to start posting more frequently moving forward

  • @leibaleibovich5806
    @leibaleibovich5806 6 місяців тому +2

    Greetings, Keith! Glad to see you back with a new video! I have been following your channel since your numpy and matplotlib tutorials.
    Glad you are back!

    • @KeithGalli
      @KeithGalli  6 місяців тому +1

      I appreciate the continued support!! Happy to be back :)

  • @viktorkarpenko9217
    @viktorkarpenko9217 Місяць тому

    Nice tutorial! Finally I understood how it works. Thank you)

  • @emmanuellejaha1149
    @emmanuellejaha1149 6 місяців тому

    Its all love, from South Africa

  • @edwinroman30
    @edwinroman30 6 місяців тому +2

    Hi Keith, here is an old subscriber since the connect-4 video 😊! I hope you are well, thanks for sharing!

    • @KeithGalli
      @KeithGalli  6 місяців тому +3

      Thank you for the long time support!!

    • @NoahElRhandour
      @NoahElRhandour 6 місяців тому +2

      @@KeithGalli we could say that to you aswell :D

  • @JV-ge8bm
    @JV-ge8bm 5 місяців тому

    awesome video, thanks!

  • @token3462
    @token3462 6 місяців тому +1

    Hey! You’re Back!!!

  • @olllayor
    @olllayor 6 місяців тому

    keep doing

  • @sebastianalvarez1537
    @sebastianalvarez1537 6 місяців тому

    Let’s go

  • @FIBONACCIVEGA
    @FIBONACCIVEGA 6 місяців тому

    I have been struggling with myself to do something with SERPAPI. Is the same ?? Greetings and thanks. I missed your videos

    • @KeithGalli
      @KeithGalli  6 місяців тому +1

      From the sounds of it, you're having troubles using an external API. This video is mainly about building our own API, so it's a bit different from using something like SERP API. That being said, some of the principles and techniques discussed might still be beneficial for understanding API interactions in general. My main recommendation though would be reviewing how to use the "requests" library in Python and taking a deeper look at the documentation for SERPAPI

    • @FIBONACCIVEGA
      @FIBONACCIVEGA 6 місяців тому

      @@KeithGalli Again With thanks, I only have the doubt What happened with you ?. Could you make a video explaining what has happened during this time?I missed your videos . Saludos !!!

    • @KeithGalli
      @KeithGalli  6 місяців тому +1

      @@FIBONACCIVEGA A mix of factors, all positive overall though.
      I started a new role at a startup back in June. It's been a great fit so far, but has taken up a lot of my time recently (hope to make videos on the startup at some point).
      Other than that, I've been putting a lot of focus into my health -- running, working out, etc. I have prioritized this over UA-cam recently, but I think at this point I can balance both together nicely.
      I've also just had a bit of uncertainty with the types of video that I want to make. I'll continue to make tutorials, but I also want to try experimenting with other types of content too.
      Hope this gives you some idea of where I've been at😊

    • @FIBONACCIVEGA
      @FIBONACCIVEGA 6 місяців тому

      @@KeithGalli Hello again. I imagine you have ideas for future videos, but I don't know if you would like to make one, teaching how to take advantage of the new features of ChaGPT, optimizing the work of this AI, in the function of generating specific AIs and customizing. Again , Im glad you are back!!! Saludos

  • @kamilcopur6513
    @kamilcopur6513 6 місяців тому

    By asking GPT😊

    • @KeithGalli
      @KeithGalli  6 місяців тому

      It's quite helpful!

    • @kamilcopur6513
      @kamilcopur6513 6 місяців тому

      @@KeithGalli I think not just helping, doing directly...😊

  • @jonpounds1922
    @jonpounds1922 6 місяців тому

    looks like a texas tan.

    • @KeithGalli
      @KeithGalli  6 місяців тому

      I think the Texas tan has faded, will have to make another trip!

  • @johnathanmassingale2472
    @johnathanmassingale2472 5 місяців тому

    😳 'Promosm'