Minimal Flask REST API in Python

Поделиться
HTML-код
  • Опубликовано: 30 сен 2024
  • 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

  • @MrinmoyHaloi
    @MrinmoyHaloi 3 года назад +21

    I was studying but this looks more important 😂

  • @Merrett11
    @Merrett11 3 года назад +12

    I’ve spent the last 2 weeks going between tonnes of RUclips 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!

  • @jfsaraceno9265
    @jfsaraceno9265 2 года назад +1

    Yo, the Matlab comment 💀

  • @gopalrathi901
    @gopalrathi901 3 года назад +2

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

  • @dolapoalli467
    @dolapoalli467 Месяц назад

    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]

  • @pablocerezo7530
    @pablocerezo7530 3 года назад +1

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

  • @hwzzegwggs8029
    @hwzzegwggs8029 3 года назад +1

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

  • @idk____idk6530
    @idk____idk6530 3 года назад

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

  • @joaovictor-dl6ve
    @joaovictor-dl6ve 2 года назад

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

  • @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

  • @zuberkariye2299
    @zuberkariye2299 3 года назад

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

  • @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...

  • @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

  • @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!

  • @homealone75
    @homealone75 3 года назад

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

  • @MangoNutella
    @MangoNutella 3 года назад

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

  • @alioudiouf6805
    @alioudiouf6805 3 года назад

    DRF (Django Rest Framework) is better!

  • @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

  • @KamalUddin-ih1vs
    @KamalUddin-ih1vs 3 года назад

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

  • @IvanIvanov-dh3sg
    @IvanIvanov-dh3sg 2 года назад

    Thanks Bro! This video is great)))

  • @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

  • @fvgoya
    @fvgoya Год назад

    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 2 месяца назад

      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
      )

  • @kerdes_1181
    @kerdes_1181 3 года назад

    Hello NeuralNine good job for your work

  • @iHorus
    @iHorus Год назад

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

  • @emirafwan1604
    @emirafwan1604 3 года назад

    Do it on FastAPI bro 🧐🧐

  • @gnvageesh6467
    @gnvageesh6467 3 года назад

    U can do a django course

  • @armantech5926
    @armantech5926 Год назад

    Cool, thank you!

  • @Segmentsoflives
    @Segmentsoflives 3 года назад

    Crystal Clear and Rare!

  • @nalakadharmawardana753
    @nalakadharmawardana753 3 года назад

    Need Django

  • @Brosales1414
    @Brosales1414 Год назад

    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 Год назад

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

    • @SamuelKreyenbuehl
      @SamuelKreyenbuehl Год назад

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

    • @Brosales1414
      @Brosales1414 Год назад

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

    • @AntonioJPeres
      @AntonioJPeres Год назад

      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 8 месяцев назад

      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'."}

  • @pablocerezo7530
    @pablocerezo7530 3 года назад

    Ur the Best

  • @Majed_ashraf
    @Majed_ashraf Год назад

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

    • @Majed_ashraf
      @Majed_ashraf Год назад

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

    • @SamuelKreyenbuehl
      @SamuelKreyenbuehl Год назад

      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

  • @joaquins.a.2830
    @joaquins.a.2830 3 года назад

    very good

  • @azaleacolburn
    @azaleacolburn 2 года назад

    10:58

  • @rafa_337
    @rafa_337 2 года назад

    3:18

  • @shujaalam2270
    @shujaalam2270 3 года назад

    🙃

  • @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