How to Write Python Scripts to Analyze JSON APIs and Sort Results

preview_player
Показать описание
In this Python Programming Tutorial, we will be learning how to grab data from a JSON API, parse out the information we want, and then sort the data using a custom key. The API we will be using is a JSON API for Homebrew Packages and we will be sorting the packages by their popularity. We cover a lot of topics in this tutorial. We will be using the Requests Library, converting to/from JSON, reading and writing to files, writing our own sorting function, and more. Let's get started...

✅ Support My Channel Through Patreon:

✅ Become a Channel Member:

✅ One-Time Contribution Through PayPal:

✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey's Public Amazon Wishlist

✅ Equipment I Use and Books I Recommend:

▶️ You Can Find Me On:

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

We're covering a lot in this video. We're going to see how to request data from a JSON API, parse out the information we want, sort the data using a custom key, and a lot more. We're going to be using the Homebrew API, but you don't need to use Homebrew or a Mac to follow along. This can apply to many other APIs you'd like to analyze with Python.

As I mention in the video, our final result _does_ have a little more functionality than what we can get from their existing API, so I believe it was definitely a useful exercise. For example, we can filter popular packages by a keyword in the description, which is a nice edition. Hope you all find this helpful!

coreyms
Автор

I'm a man of limit means... but YOU, you will be the first creator I support on Patreon. You are offering actual education which is helping me in my career. For that you deserve the respect and MAH MONEZ!!!!

hassamdaudi
Автор

Corey is the unsung hero of Python Youtubers :)

Lamb
Автор

These are simply the best python coding tutorials on the world wide web anywhere. What a lifesaver.

arthurcaesar
Автор

where was this video 3 years ago when i had to teach myself this??!

better late than never. this is a massive help to future in the making python programmers

djlatino
Автор

These real world scripts you do are simply the best to see how “it all comes together”.

jereziah
Автор

This was one of your best videos to date. I love the longer format using a real world project that can be applied to many other tasks.
I hope enough people are donating and supporting you to keep up this work.

iChrisBirch
Автор

I've been trying to get a job as a python developer and haven't had much luck yet.
I tried messing around quite a bit with Django but after awhile realized that i was just covering material and not actually learning it.
Now i watch your videos for joy and for your passion with programming, and its kept me going. Thanks Corey.

InternationG
Автор

Your tutorial just made my day! It has been on my mind during several days how to get JSON files through API's by Python scripts but I could not find the right video for me on YouTube. Good job, Corey! Have a nice day!

gxhkgtk
Автор

No regrets to sponsor your channel at all! Good job Corey!! You videos really helped me a lot!!

jingyuchang
Автор

A python mini-project : exactly what I needed. I will probably re-watch the video a couple of times, as there is a lot to digest. Thank you Corey

archstampton
Автор

I really appreciate the courtesy you show other websites. I'm sure Homebrew was whacked last night with a bunch of JSON get requests--I know I tried it out--but I made sure to sleep each request between calls like you said.

I am sure there's a lot of outside work that goes into making a great video--planning, writing, rendering, etc.--and I really appreciate the effort you put forth to produce such great content. Thanks so much for taking the time to put this video together.

benwalsh
Автор

This is a great example of things you can do to practice Python or to have something on your CV. Thanks!

morethanprogrammer
Автор

I just had to drop a little comment, to thank you.
This is a massive knowledge and well taught.
Stay safe

Greetings from Tanzania 🇹🇿

raymondmichael
Автор

I would have to say you’re video tutorials are so easy to follow, I understand what I’m being taught and you explain each point so well!

CainanParker
Автор

Huge thank you for this tutorial. I’ve been writing in PHP for years but more and more of the api’s I use have native Python SDK’s so makes sense to write in Python. This was very insightful to see where python is similar to PHP and where you can take a different route to get the same result. Really cool.

henryreith
Автор

you are a lifesaver, your python tutorials are the best. You saved my day.

abhishekvasisht
Автор

thank you so much dude... i was 5 hours in a row searching for one of the solutions that you teach in this video.

davydwes
Автор

Just discovered your channel and i liked videos with practical approach. Thanks for your knowledge sharing and please do not stop creating more materials.

linkflap
Автор

Great video, thanks a lot for sharing, it answered my question that I was Googling. I also worked out how to write 30d-90d and 365d as separate columns, I resorted to list comprehension, there might be a better way. Looked through the comments but didn't see anyone mentioning this. On that note: I see a lot of comments saying like: I would be keen to see how you could bla bla, I think comments here should focus on the content of this video, rather than asking for various imaginations and new assignments, please!

pplanetEarth