How to Access Web APIs using Python Requests and JSON

  Рет қаралды 48,917

TokyoEdtech

TokyoEdtech

Күн бұрын

Пікірлер
@abinsyaseen7298
@abinsyaseen7298 3 жыл бұрын
I learned to make a simple game from the turtle module from you i think a year ago and thats how i started my python journey...and then learnt a lot of stuff like data science and i was thinking to learn about accesing web api s and this video got recommended to me and i had a quick glance on my journey...thanks a lot mate
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
You're quite welcome - glad I could help. Keep on codin'!
@OK-69420
@OK-69420 3 жыл бұрын
I came here from Pong video and just wanted to say that you are the best at explaining coding. Thanks!
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
Thanks - much appreciated. Keep on codin'!
@preciousudo415
@preciousudo415 2 жыл бұрын
You have literally saved me from failing my class. The explanation is better than what my professor was trying show in the class. Thank you
@TokyoEdTech
@TokyoEdTech 2 жыл бұрын
Glad to help - keep on codin'!
@PLAYCOREE
@PLAYCOREE 10 ай бұрын
Thanks for helping me out, just started this week learning Python as my first language. I started the first time coding with js but i'm really not a very motivated learner when i dont have a goal to reach. For my first learning project i wanted to make a fake donation programm for Twitch streamers using the stream elements api and a simple GUI with customTKinter. Really didnt know why i was having problems with it since i thought it was returning a dictionary. Now i know, appreciate your content even tho this video is 2 years old!
@TokyoEdTech
@TokyoEdTech 10 ай бұрын
It's always good to have a goal, but sometimes you gotta buckle down and do the hard work to make progress. Thanks for the comment and keep on codin'!
@lonelypizzaslice4845
@lonelypizzaslice4845 2 жыл бұрын
Tysm for this tutorial! I appreciate how clear and straight-forward it was. I have a project coming up and after some googling, decided it would be quicker to completely relearn HTTP requests in python rather than fight the other language I was using lol.
@TokyoEdTech
@TokyoEdTech 2 жыл бұрын
You are quite welcome. I also decided to use python recently instead of fighting Java. Keep on codin'!
@NeoMaduoSaitsoketsa
@NeoMaduoSaitsoketsa 11 ай бұрын
I like the way you explain your code Sir. Makes everything very clear... Thanks... 🎉
@TokyoEdTech
@TokyoEdTech 11 ай бұрын
Thanks - keep on codin'!
@luiscarlostrotta8119
@luiscarlostrotta8119 Жыл бұрын
good afternoon!!! nice to meet you, I love your didactics. I'm from Argentina and I'm not fluent in English, but thanks to Python and tutorials of such quality as this one, I'm doing well. very good explanation, I'm interested in everything about python!!!!, thank you very much, greetings.
@TokyoEdTech
@TokyoEdTech Жыл бұрын
Gracias! Glad to hear it is helpful. Here is a link to my Intro to Python book (pdf). drive.google.com/file/d/1ajYJZLGUaVmNbuG98LnRfHMTzvnZx9el/view?usp=drivesdk Keep on codin'!
@luiscarlostrotta8119
@luiscarlostrotta8119 Жыл бұрын
@@TokyoEdTech Very kind!!!!! Thank you very much!!!!
@rsb7613
@rsb7613 2 ай бұрын
Please, help me! I did the same code in the same api and all fields come in my calls only the "summary" that not, comes: Star Trek premiered on 1966-09-08. ['summary'] For any movie In time: I am using python 3.12 and VSCode
@TokyoEdTech
@TokyoEdTech 2 ай бұрын
@@rsb7613 Can you share the code so I can take a look?
@walsand
@walsand 3 жыл бұрын
man ive been waiting for a video on this
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
Glad to hear it - enjoy!
@thebdceigal
@thebdceigal Жыл бұрын
This was exactly what I was searching for thank you!
@TokyoEdTech
@TokyoEdTech Жыл бұрын
You're welcome. Keep on codin'!
@berkayavclar110
@berkayavclar110 3 жыл бұрын
You are the best and you don't get what you deserve
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
Thanks - much appreciated!
@gandi_baatein
@gandi_baatein 3 жыл бұрын
sir you teach so well
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
Thank you, I try.
@CloroxBleach-vc1pw
@CloroxBleach-vc1pw 2 жыл бұрын
thanks, this helped me create a simple program to hopefully get rich in Albion Online
@TokyoEdTech
@TokyoEdTech 2 жыл бұрын
Get rich or die trying - good luck!
@bvladimirpl
@bvladimirpl 2 жыл бұрын
Simple and easy to follow! Thanks TokyoEdtech
@TokyoEdTech
@TokyoEdTech 2 жыл бұрын
You're welcome - keep on codin'!
@fx572
@fx572 3 жыл бұрын
I was wondering if I could have your opinion on something: I’ve been using an animation program for a few months now called Source Filmmaker where you do 3D animation on. I wanted to script for some IK rigs so I looked around on Google to find out how to that when I found this article that shows you how to do that. I read it and right off the bat, the guide told me I needed Python for making the scripts and saving them into Source Filmmakers directory. I spent mostly all of today trying to figure out how to use it and I’ve pretty much have come to the conclusion that I’m gonna have to learn Python step by step. What would you suggest I try?
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
Check out my intro to Python - it'll get you started!
@seadve
@seadve 3 жыл бұрын
very helpful video! btw, you can s also do response.json() to convert it to a dict instead lf using json module
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
Great tip - thanks for sharing that!
@Butssy
@Butssy 2 жыл бұрын
hi, i have a question, when i do the pprint.pprint, it comes up as an error, and says it is undefinied. is there any reason why this would happen? edit: simple mistake, forgot to import pprint
@TokyoEdTech
@TokyoEdTech 2 жыл бұрын
Glad you caught that...been there, done that!!!
@sand3514
@sand3514 11 ай бұрын
Hello! I have recently started to learn things about APIs (what they are, different kinds of requests, etc) and as ive seen, Postman is used alot by data scientists to send HTTP requests to APIs. What are the pros of using Postman? (As ive seen, it sends a http request just as you showed in the video, the only thing that i can notice is that Postman is more efficient, but what other pros does it have?)
@TokyoEdTech
@TokyoEdTech 11 ай бұрын
Hi! From what I can tell, Postman is a full-featured API system that not only provides APIs, but also allows for testing and troubleshooting. What I showed in this video is the barest example to explain the concept.
@TheSpekeyMan
@TheSpekeyMan 3 жыл бұрын
Hey man I wanted to ask something "I used ur code to make a game (Snake Game) and also modified it a little bit. ("Can i copyright and publish it to Microsoft Store or The Play Store? ") PLS answer me
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
Heya - sure thing! Every thing I do is Creative Commons Licensed - please include a shoutout in the game credits. Good luck!
@TheSpekeyMan
@TheSpekeyMan 3 жыл бұрын
U said yas or no? Idk But what is "Creative Commons Licensed?"
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
@@TheSpekeyMan Yes, go ahead. Please Google Creative Commons.
@TheSpekeyMan
@TheSpekeyMan 3 жыл бұрын
And I also wanted to ask "MUST i shout u out in the credits?" That was my last question. THX for the snake tutorial video man. And NO-OFFENCE asking u the last question. BYE :)
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
MUST you? No. SHOULD you? Yes. Otherwise, why did you bother asking?
@stephendoamekpor1671
@stephendoamekpor1671 2 жыл бұрын
This is what I get when I run the code.....need help. Traceback (most recent call last): File "c:\Users\edemd\Documents\DoamPrograms\py4e\practice\workpage.py", line 15, in name = data['name'] TypeError: list indices must be integers or slices, not str
@TokyoEdTech
@TokyoEdTech 2 жыл бұрын
I need to see the code also to help.
@gummies579
@gummies579 3 жыл бұрын
I know a lot of people have been asking but when are you going to continue space arena
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
I was hoping to get to it this summer, but it is unlikely due to unforeseen circumstances. Sorry.
@valluriseshapraneeth3469
@valluriseshapraneeth3469 10 ай бұрын
Hi sir, I have a url with API key how can i retrieve the data, You have placed the last part of the URL as parameters. Where can I put the API key
@TokyoEdTech
@TokyoEdTech 10 ай бұрын
Hiya. The API key is usually a parameter as well. You'll have to check the site documentation to figure out how to use it.
@unbreakable7643
@unbreakable7643 3 жыл бұрын
I have a question for you about functions. Can you put a function inside a function? For Example: def hello(): print("hello world") print("hello #2") def IdontKnowanyMore(): print("I dont know anymore") hello()
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
That's a good question - did you try your code? What happened?
@unbreakable7643
@unbreakable7643 3 жыл бұрын
@@TokyoEdTech not yet I could try it.
@unbreakable7643
@unbreakable7643 3 жыл бұрын
@@TokyoEdTech I just tried it, it worked!
@laredoeneko
@laredoeneko 11 ай бұрын
How do you search in the API? imagine search for all the movies/series from the year=2010 for example, in this case the reponse is not unique, how doest python manage it?
@TokyoEdTech
@TokyoEdTech 11 ай бұрын
You'd have to check the API documentation. Then print the result of your query and see the data format and go from there.
@azghar.suhail
@azghar.suhail 2 жыл бұрын
Thanks for the video. I have an URL in json. How do I make that URL open in browser?
@TokyoEdTech
@TokyoEdTech 2 жыл бұрын
First pull the URL out of the json data Second, follow the directions here: stackoverflow.com/questions/4302027/how-to-open-a-url-in-python#:~:text=just%20open%20the%20python%20interpreter,it%20does%20what%20you%20want.
@PlaneteAdos
@PlaneteAdos Жыл бұрын
Good professor ! Thanks a lot !!!
@TokyoEdTech
@TokyoEdTech Жыл бұрын
You're welcome - keep on codin'!
@devanshujoshi8393
@devanshujoshi8393 3 жыл бұрын
What is this I didn't understand I subscribed your channel after learning to build games and learnt python , is this something advanced for a python intermediate or beginner
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
This is probably a bit more advanced - watch the previous video about the requests module then try this one.
@kavitham4526
@kavitham4526 3 жыл бұрын
Hi, I learned about python and also some gaming programs which is very helpful for me and also for everyone. I need a help from you as a guide.. Is there any possibility to write a code to convert text to animation video...If it is so, then it will be really helpful for me.
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
Hiya - I'm sure it's possible, but I'm not sure how to go about that one...gotta study more!
@thech0sen1
@thech0sen1 3 жыл бұрын
KZbin just notified me about this. I am subbed and it ain't sending me notifications :(
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
KZbin is mysterious like that!
@heckergrp
@heckergrp Жыл бұрын
Hey I am getting error- list indices must be integers or slices, not str Can you please help?
@TokyoEdTech
@TokyoEdTech Жыл бұрын
Sure. Paste the code here and the exact error message.
@diyeyejohson3070
@diyeyejohson3070 2 жыл бұрын
Great video! I love it!
@TokyoEdTech
@TokyoEdTech 2 жыл бұрын
Thank you!
2 жыл бұрын
that was helpful, thank you a lot :)
@TokyoEdTech
@TokyoEdTech 2 жыл бұрын
You are quite welcome - keep on codin'!
@siddhartha.01
@siddhartha.01 3 жыл бұрын
Do you know how to scrape Userinfo of Quora user(Without Using Requests-HTML or Selenium)?
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
Sorry, no. I've used Selenium in the past, but it was a looooong time ago.
@siddhartha.01
@siddhartha.01 3 жыл бұрын
@@TokyoEdTech i hate selinum too that's I don't want to use it😕
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
Hang in there!
@ayanupadhaya6972
@ayanupadhaya6972 3 жыл бұрын
Which editor you are using?
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
You’re in luck - I’ve made a video about this exact topic. Enjoy! kzbin.info/www/bejne/apOvXp95hZenm8U
@ayanupadhaya6972
@ayanupadhaya6972 3 жыл бұрын
@@TokyoEdTech I want a help from you. As I program in python I use pip to install packages. Currently using linux mint mate os. I don't know what is the problem whenever I try ton install a package using pip3 it takes 2 or 3 minutes where it would take few seconds in windows 10 to download a package. Any solution?
@colwarsstudiobrickfilmandm8580
@colwarsstudiobrickfilmandm8580 3 жыл бұрын
Are you having a creative block? Not mad or anything but I'm just wondering when your next video will be?
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
Nope. Just a lot of personal stuff going on. Hoping to get me stuff out next month...
@montagetm
@montagetm 3 жыл бұрын
Could you try making Chess? 🤔
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
It's definitely on my to-do list. I started a text-based version a while ago, but never got back to it. LINK: pastebin.com/4VNcyHru
@colwarsstudiobrickfilmandm8580
@colwarsstudiobrickfilmandm8580 3 жыл бұрын
You should start a reddit! That way its easier to help people!
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
Thanks, but I barely have time to keep up with my channel these days!
@colwarsstudiobrickfilmandm8580
@colwarsstudiobrickfilmandm8580 3 жыл бұрын
@@TokyoEdTech I'm so sorry I didnt think about that!
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
@@colwarsstudiobrickfilmandm8580 No worries - I'm a relatively small KZbinr and get lots of requests for help. I can't imagine what larger channels have to deal with!
@berkayavclar110
@berkayavclar110 3 жыл бұрын
can you make formula 1 game in python pleas
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
What did you have in mind? Do you have a link?
@berkayavclar110
@berkayavclar110 3 жыл бұрын
@@TokyoEdTech Yes i have kzbin.info/www/bejne/rGPRomB_fN-SgLM
@colwarsstudiobrickfilmandm8580
@colwarsstudiobrickfilmandm8580 3 жыл бұрын
In the olden days of minecraft pe..... mods were made in json! They are now made in c++ (I think)
@thatelguy1530
@thatelguy1530 3 жыл бұрын
Yep they are
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
Ahh...the olden days!
@gandi_baatein
@gandi_baatein 3 жыл бұрын
sir plz plz plz make animation python 3 part 7
@TokyoEdTech
@TokyoEdTech 3 жыл бұрын
Not sure what else to the animation video.
@ΙΜΜυΝΙΤΥ
@ΙΜΜυΝΙΤΥ Жыл бұрын
Hey I am getting error- list indices must be integers or slices, not str Can you please help?
@TokyoEdTech
@TokyoEdTech Жыл бұрын
Sure. Paste your code here and I'll take a look.
@ΙΜΜυΝΙΤΥ
@ΙΜΜυΝΙΤΥ Жыл бұрын
@@TokyoEdTech nvm figured it out thanks for the help
@TokyoEdTech
@TokyoEdTech Жыл бұрын
@@ΙΜΜυΝΙΤΥ Good to hear - keep on codin'!
Simple Python Turtle Graphics Game (Part 1)
6:07
TokyoEdtech
Рет қаралды 136 М.
Working With APIs in Python - Pagination and Data Extraction
22:36
John Watson Rooney
Рет қаралды 111 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,2 МЛН
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 52 МЛН
HOW TO: JSON and APIs in PYTHON - A Beginners Look
25:40
John Watson Rooney
Рет қаралды 45 М.
Python AI Web Scraper Tutorial - Use AI To Scrape ANYTHING
45:36
Tech With Tim
Рет қаралды 201 М.
Learn JSON in 10 Minutes
12:00
Web Dev Simplified
Рет қаралды 3,2 МЛН
Docker Image BEST Practices - From 1.2GB to 10MB
7:15
Better Stack
Рет қаралды 97 М.
How to use a Public API | Using a Public API with Python
14:01
Alex The Analyst
Рет қаралды 50 М.
Requests Library in Python - Beginner Crash Course
20:32
NeuralNine
Рет қаралды 52 М.
Как устроен PYTHON
37:44
про АйТи | IT Pro
Рет қаралды 11 М.
Always Check for the Hidden API when Web Scraping
11:50
John Watson Rooney
Рет қаралды 651 М.
黑天使只对C罗有感觉#short #angel #clown
00:39
Super Beauty team
Рет қаралды 36 МЛН