HOW TO: JSON and APIs in PYTHON - A Beginners Look

preview_player
Показать описание
Let's talk about working with JSON data in Python.
Using fake data stored in a JSON file we talk about accessing specific parts using indexing, and store them in a new dictionary.

Then we make some API requests to create a fun little script for suggesting what beers go with our dinner choice. We begin to see how JSON and API requests work together and how we can manipulate this in Python for us to use in our own apps and webapps.
-------------------------------------
-------------------------------------
Disclaimer: These are affiliate links and as an Amazon Associate I earn from qualifying purchases

Рекомендации по теме
Комментарии
Автор

Good level of details and straight to the point, thx for taking the time to put this together !

louisgirardin
Автор

Awesome lesson, very easy to follow along with and understand. Thanks so much, it's been very helpful!

TheUnrestrainedTaco
Автор

Thanks again. I just started on API scraping and json. Good starter video.

wangdanny
Автор

Great tutorial with simple instructions! Keep it up!

mariumbegum
Автор

Excellent video. Deserves way more views!
Keep making them, definitely!

python
Автор

Man! That's cool lesson! Keep going

sergeys
Автор

Superb, very clear explanation. Thanks!

Jorgenwelsink
Автор

Thank you, John. Wauu again great job

dzeykop
Автор

Great video, thank you. DeltaJSON is really useful for dev working with JSON, it does compare, merge and graft via API service.

markthomas
Автор

I'm using multiple api jsons responses of varying length and I get a KeyError [key] anytime I use your print(data[.... like I don't have a list defined yet? Python 3.6 in PyCharm

calvintait
Автор

Thank you so much. You have saved me hours.

pavspy
Автор

Brilliant, thanks John for all these videos about scrapping. Here you an idea for another video: how to scrape content from an API and then print it into a page using Flask it

poijlrwskdfj
Автор

Feedback welcome! too long? not enough detail? too much detail? Not focused enough?

JohnWatsonRooney
Автор

Hi sir,
What if we have a json API link and
Convert that into CSV file.
How can we do that !!!?

Village_Crystal_Stone
Автор

I kept getting a not defined on the line where it says "beer_list = [ ]" which I noticed you didn't why would that have happened?

Frankie_Freedom
Автор

where can I download this json fake data file?

elibainbridge
Автор

buenas tardes, disculpa te esscriba en Español, tengo un error en un codigo utilizando get requests, me podrias ayudar?, por otra parte, teienes el enlace de la api que utizas?, muchas gracias, saludos cordiales

luiscarlostrotta
Автор

Could u share this fake json file for practice?

rajeevaggarwal
Автор

Comment for pedants. Most descriptions of a JSON file say that the first and last chars should be curly braces { }, so confirming the "JSON = Python dictionary" idea
But i see JSON files with surrounding square brackets [ ] - so indicating a list.
And those don't cause problems since json.load still imports the file as a dictionary.
But if that is as random as Python gets, we can live with that?

john-r-edge
Автор

I wish dealing with rate limits hadn't been neglected since it is a pretty common issue.

kafran