Build your first REST API with Flask and PostgreSQL

Sdílet
Vložit
  • čas přidán 16. 10. 2022
  • It's been a while! Learn how to create a home automation web service to store and retrieve temperatures in different rooms of your house (Arduinos not included!). Using Flask we can easily build an API that your temperature sensors can send data to, and then we can retrieve the data or do some processing with it.
    This video will help you learn how to build a simple Flask API using PostgreSQL for data storage.
    Blog post: blog.teclado.com/first-rest-a...
    REST APIs with Flask and Python: go.tecla.do/rest-apis-sale
    Python and PostgreSQL (Udemy course): go.tecla.do/pysql
    Thank you very much for watching!
  • Věda a technologie

Komentáře • 40

  • @ericcarlier3806
    @ericcarlier3806 Před rokem +10

    very concise video, but I learnt a lot in 25 minutes ! thanks . I got your Rest APIs Flask/Python course , can't wait to start it 🤯

    • @tecladocode
      @tecladocode  Před rokem +1

      Great to hear! Thank you for taking the course! 💪

  • @randalltockes2247
    @randalltockes2247 Před 2 měsíci +2

    This was totally the explanation i needed for a few concepts.
    Thank you for this.

  • @JLucas-og1bq
    @JLucas-og1bq Před rokem

    Broo, you are the only person that helped me.

  • @RaiWitt
    @RaiWitt Před rokem

    Excellent! Thank you very much!

  • @Spyrosigma
    @Spyrosigma Před 2 měsíci +3

    ElephantSQL just posted that they're shutting down : (

  • @imranyasin7537
    @imranyasin7537 Před měsícem

    Great video!! Thank you very much

  • @sciduck8472
    @sciduck8472 Před rokem +4

    did you read my mind? i was just wishing for this!

  • @nicholasnoronha473
    @nicholasnoronha473 Před rokem

    Really nice video, post more!!

  • @playcode9750
    @playcode9750 Před 3 měsíci

    excelente, ainda não tinha experimentado python pra api.

  • @tanzania0307
    @tanzania0307 Před rokem +3

    Thank you for all the explanations. I am new to APIs and wonder if you can give me a hint on how can I create an API that I can give to another person so he can share his data with me without me having access to his database and I can store the shared data in my database. I hope I am not saying something stupid. Thank you for your help. By the way, I just bought your Udemy course.

  • @HabibAlSaki
    @HabibAlSaki Před rokem

    Hey, I bought two of your udemy courses on flask rest api, one got updated recently, was thinking if you are going to update the advanced one, or there is no such plan.

  • @jonathancastillo5953
    @jonathancastillo5953 Před rokem +1

    Gracias me encanta este contenido.

  • @iriantokbarek9114
    @iriantokbarek9114 Před rokem +3

    what themes and fonts You are using on this video Sir? it's look really nice 🙂

  • @amgarten
    @amgarten Před 4 měsíci

    Wow, top tier tutorial

  • @user-io6yy5el8u
    @user-io6yy5el8u Před 7 měsíci

    You are the best

  • @ntsikelelondleleni6335

    wow nicely explained

  • @rizqimaulana8790
    @rizqimaulana8790 Před rokem

    why i got error on the relations rooms table

  • @r7918
    @r7918 Před rokem

    Can you create a video of flask app using docker.

  • @user-ed3vh1tt7c
    @user-ed3vh1tt7c Před 10 dny

    Hi everyone i cant do the db part because elephantsql are shutting down i cant register anything else i can use please

  • @ahmedsubmission
    @ahmedsubmission Před rokem

    I am getting this error once I add the db url and do flask run:
    psycopg2.OperationalError: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
    Is the server running locally and accepting connections on that socket?

    • @niarcas
      @niarcas Před rokem

      Change line
      connection = psycopg2.connect(url)
      to
      conn = psycopg2.connect(
      "host='your_host_name_or_ip_address' "
      "port='5432' "
      "dbname='your_database_name' "
      "user='your_username' "
      "password='your_password'"
      )

  • @benthebrute
    @benthebrute Před rokem

    Any insight on using psycopg2 for windows? I attempted with and without the -binary part and got errors either way. Error: pg_config executable not found.

    • @benthebrute
      @benthebrute Před rokem +1

      Never mind, I sorted it out. It's because I was attempting to use Python 3.11.0 and psycopg2 is not yet compatible with it, so I just changed my local to 3.10.7 and it worked perfectly.

    • @arunsuthar4783
      @arunsuthar4783 Před 9 měsíci

      I also get errors when installing psycopg2

  • @LorenzoPeve
    @LorenzoPeve Před 6 měsíci

    Just wanted to point out that this is connecting to the DB using a global connection object which is not good for working with servers (concurrency issues, scaling problems, etc)

  • @miguelelizalde9757
    @miguelelizalde9757 Před rokem

    How can i test this without insomnio?

  • @funnyrockffandfood9065
    @funnyrockffandfood9065 Před měsícem

    bro i need more advance video based on this ...........please upload it or give me some hint or sent me anyothers video based on this but advance

    • @funnyrockffandfood9065
      @funnyrockffandfood9065 Před měsícem

      and also thanks

    • @tecladocode
      @tecladocode  Před 28 dny

      Thank you! I have many, many advanced videos in my course on building REST APIs with Flask: teclado.com/rest-apis-flask-python/
      Check it out, and let me know what you think!

  • @gracchen2500
    @gracchen2500 Před 8 měsíci

    doesn't cover how to install Flask or how to setup Insomnia. This is supposed to be a "first" tutorial?? The first 7 minutes took me 40 minutes

  • @imranyasin7537
    @imranyasin7537 Před měsícem

    "Important announcement: ElephantSQL will discontinue its services. The product will reach its End of Life on January 27, 2025. After May 1, 2024, we will cease to accept new users."

  • @andrewt7607
    @andrewt7607 Před rokem

    ᎮᏒᎧᎷᎧᏕᎷ 🙋

  • @SteveMunsonPublic
    @SteveMunsonPublic Před měsícem

    ElephantSQL is discontinuing its services. The product will reach its End of Life on January 27, 2025. I wasn't able to create an account to even follow along with this video.

    • @tecladocode
      @tecladocode  Před měsícem

      It is indeed! Another service must be used, unfortunately!

  • @cascossi809
    @cascossi809 Před rokem +1

    Thank you for the video, but all this without an ORM as SQL-Alchemy does not seem truly professional.