Minimal Flask REST API in Python

Поділитися
Вставка
  • Опубліковано 4 лют 2025
  • In this video, we build a simple minimal REST API in Python using Flask.
    ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
    📚 Programming Books & Merch 📚
    🐍 The Python Bible Book: www.neuralnine...
    💻 The Algorithm Bible Book: www.neuralnine...
    👕 Programming Merch: www.neuralnine...
    🌐 Social Media & Contact 🌐
    📱 Website: www.neuralnine...
    📷 Instagram: / neuralnine
    🐦 Twitter: / neuralnine
    🤵 LinkedIn: / neuralnine
    📁 GitHub: github.com/Neu...
    🎙 Discord: / discord
    🎵 Outro Music From: www.bensound.com/

КОМЕНТАРІ • 58

  • @Merrett11
    @Merrett11 3 роки тому +12

    I’ve spent the last 2 weeks going between tonnes of UA-cam videos to build an API in flask connected to MySQL. So glad you produced this and would love to see you take it further with Auth JWT, Roles Required etc!

  • @MrinmoyHaloi
    @MrinmoyHaloi 3 роки тому +21

    I was studying but this looks more important 😂

  • @oscarlai9511
    @oscarlai9511 Рік тому

    Genuinely the most amazing tutorial I've seen very easy to follow. Will be watching more of your vids, thanks so much for the help!

  • @zuberkariye2299
    @zuberkariye2299 3 роки тому

    Hey NeuraLine, it's me, Zuber from everywhere. I love your videos no matter what subject you're teaching!

  • @hwzzegwggs8029
    @hwzzegwggs8029 3 роки тому +1

    Thank you so much for this video!
    Actually started lookign into flask and you post this video

  • @adaobas
    @adaobas 3 роки тому +1

    i'm not currently studying web dev but your videos will be so helpful when I start it! Thank you so much

  • @kerdes_1181
    @kerdes_1181 3 роки тому

    Hello NeuralNine good job for your work

  • @Segmentsoflives
    @Segmentsoflives 3 роки тому

    Crystal Clear and Rare!

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

    when video id is not passed you can set a default id and check if it was updated like so:
    def get(self, video_id=''):
    if video_id == '':
    return videos
    elif video_id in videos:
    return videos[video_id]

  • @IvanIvanov-dh3sg
    @IvanIvanov-dh3sg 3 роки тому

    Thanks Bro! This video is great)))

  • @gopalrathi901
    @gopalrathi901 3 роки тому +2

    I have exam day after tomorrow but this is more interesting 😅

  • @thissummer2648
    @thissummer2648 3 роки тому +1

    It helps us and your channel if you start teaching from scratch rather than bits and pieces.

    • @NeuralNine
      @NeuralNine  3 роки тому +2

      Not really. My experience is that the series videos perform way worse. This is not only bad for views (my channel) but also for the viewers since they seem to watch less of the content.

    • @alioudiouf6805
      @alioudiouf6805 3 роки тому

      @@NeuralNine I think also "bits and pieces" are the best way: that makes people versatile! At the world we are, one should be able to do Math, Datascience, Python coding, REST APIs, even html and bootstrap! To be able to produce a deliverable useful app, you must have various skills, master various things and have not only one knowledge, but also various.

    • @thissummer2648
      @thissummer2648 3 роки тому

      Actually many of your video are helpful to me.. mostly when I had knowledge about respective topic.
      But when I want to start something new its hard to grasp...

  • @ayrex8846
    @ayrex8846 3 роки тому

    hey are there any videos about async and await syntax on your channel ? Cuz i couldn't find any if not plz do one, and btw I really like your content keep up the good work

  • @joaovictor-dl6ve
    @joaovictor-dl6ve 2 роки тому

    This library flask_restful is outdated? Because the last realease was in march 2021...

  • @fvgoya
    @fvgoya 2 роки тому

    Just a curiosity: in this case, why not send the data to fronted using render_template, for example, to display the data on a html page? Why send the data as json?

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

      The essense of RESTful is to be able to be consumed by any frontend framework e.g react, VUE, even templates itself. render_template is specifically for templates or rather Flask fullstack(using Jinja2
      )

  • @cainezekiel8794
    @cainezekiel8794 3 роки тому

    Not related to this particular post, but would you do a video on detecting chart patterns for example the double bottom and head and shoulders pattern using python, given ohlc data

  • @pablocerezo7530
    @pablocerezo7530 3 роки тому +1

    Neural, Make a second part of 'web browser' video tu implement more functions to it, please

  • @justapugontheinternet
    @justapugontheinternet Рік тому

    perhaps the reason why it is not working with the empty string is it passes a different datatype, maybe None? not sure though, I'd have to test it out myself

  • @lostsecArmy
    @lostsecArmy 3 роки тому

    sir please create a full playlist of flask tuts to creating a simple projects

  • @homealone75
    @homealone75 3 роки тому

    Could you comment on post/get timing assuming it’s all on the local network/system?

  • @jfsaraceno9265
    @jfsaraceno9265 2 роки тому +1

    Yo, the Matlab comment 💀

  • @Brosales1414
    @Brosales1414 2 роки тому

    anyone having trouble with the PUT section? Keep getting {"message": "The browser (or proxy) sent a request that this server could not understand."}. I'm talking about 12:05. That part doesnt work for me.

    • @SamuelKreyenbuehl
      @SamuelKreyenbuehl 2 роки тому

      yes the same for me. Did you find a solution?

    • @SamuelKreyenbuehl
      @SamuelKreyenbuehl 2 роки тому

      the `args = parser.parse_args()` in the put() method does not work for me

    • @Brosales1414
      @Brosales1414 2 роки тому

      @@SamuelKreyenbuehl I got it now! His line 8 change it to 'parser.add_argument('title',required=True, location='form')'

    • @Ajp3s
      @Ajp3s Рік тому

      Not a single method working in my case. All i get is {"message": "The browser (or proxy) sent a request that this server could not understand."}.... and {"message": "The method is not allowed for the requested URL."}

    • @AishwariyaGupta
      @AishwariyaGupta Рік тому

      did you get the solution for this? I get this error: "Did not attempt to load JSON data because the request Content-Type was not 'application/json'."}

  • @armantech5926
    @armantech5926 Рік тому

    Cool, thank you!

  • @idk____idk6530
    @idk____idk6530 3 роки тому

    I created web scraping project Download anime without going to website .. using bs4 and requests want .. code please reply

  • @MangoNutella
    @MangoNutella 3 роки тому

    In my opinion, FastAPI is easier than Flask for this.

  • @Majed_ashraf
    @Majed_ashraf 2 роки тому

    I get error in the line -d "title=something" -X PUT
    A key error
    Error code is 304

    • @Majed_ashraf
      @Majed_ashraf 2 роки тому

      It does not go to any other function other than "get"

    • @SamuelKreyenbuehl
      @SamuelKreyenbuehl 2 роки тому

      same

    • @codingtiptricks
      @codingtiptricks Рік тому

      Yes, the problem is you need to send also the header with content-type and content-length. You can use postman.

    • @Majed_ashraf
      @Majed_ashraf Рік тому

      @@codingtiptricks i just installed an older version of flask

    • @codingtiptricks
      @codingtiptricks Рік тому

      @@Majed_ashraf That's one solution, but it's better to work with the latest stuff. There is a reason why they want the content-length to be included in the header now

  • @gnvageesh6467
    @gnvageesh6467 3 роки тому

    U can do a django course

  • @emirafwan1604
    @emirafwan1604 3 роки тому

    Do it on FastAPI bro 🧐🧐

  • @azaleacolburn
    @azaleacolburn 2 роки тому

    10:58

  • @rafa_337
    @rafa_337 2 роки тому

    3:18

  • @alioudiouf6805
    @alioudiouf6805 3 роки тому

    DRF (Django Rest Framework) is better!

  • @muhammadnajamulislam2823
    @muhammadnajamulislam2823 3 роки тому

    by the way, Matlab is not a language.:)
    but nice video
    plz make a video on machine learning project API making in flask

  • @joaquins.a.2830
    @joaquins.a.2830 3 роки тому

    very good

  • @nalakadharmawardana753
    @nalakadharmawardana753 3 роки тому

    Need Django

  • @pablocerezo7530
    @pablocerezo7530 3 роки тому

    Ur the Best

  • @shujaalam2270
    @shujaalam2270 3 роки тому

    🙃

  • @iHorus
    @iHorus 2 роки тому

    Didn't mention how to create new project, add flask interpreter