# pokeapi.co/ #How to connect to an API using Python import requests base_url = "pokeapi.co/api/v2/" def get_pokemon_info(name): url = f"{base_url}/pokemon/{name}" response = requests.get(url) if response.status_code == 200: pokemon_data = response.json() return pokemon_data else: print(f"Failed to retrieve data {response.status_code}") pokemon_name = "pikachu" pokemon_info = get_pokemon_info(pokemon_name) if pokemon_info: print(f"Name: {pokemon_info["name"].capitalize()}") print(f"Id: {pokemon_info["id"]}") print(f"Height: {pokemon_info["height"]}") print(f"Weight: {pokemon_info["weight"]}")
@sohailali32742 ай бұрын
THIS IS EXACTLY WHAT I NEEDED, THANK YOU SO MUCH MAN
@andredubbs48542 ай бұрын
the king is back! im glad youre making content again man you have no idea how useful and helpful it is! i get that it takes a huge chunk of time and ur not even profiting from it, but its much appreciated
@GigelBosket2 ай бұрын
Bro , you have the best programming tutorials!
@materwelone60262 ай бұрын
i love bro code
@szybkafoka692 ай бұрын
Nice tutorial, I'm waiting for PyGame
@israelrios19169 күн бұрын
You have an extra slash (/) on the base_url, the output is going to have a double slash. It still works good anyways. Thank you 😄
@HassanFakhry-x5x2 ай бұрын
I keep atleast one video at a time of yours on in the background at all times just to boost the algorithm
@jmac205011 күн бұрын
height: 0.4m(1'04") , weight: 6.o kg (13.2 lbs) pika pkia
@johnneisler65522 ай бұрын
Love your channel
@andrewanderson926116 күн бұрын
Could you please show how to pull the entire list of Pokemon and generate a csv or excel table with specific attributes?
@digital_down6 күн бұрын
… Do a video on creating an API. That would be interesting
@Fireman91432 ай бұрын
I don't know pokemon. I know when it comes to BroCode videos, gotta catch em all!
@ranataha85002 ай бұрын
Brother, I really want to know, with all these skills, at what stage are you in your career? Are you working a job? Do you have your own software house? Or are you in a big tech company? Please tell me so I can get the motivation to learn.
@SumitRanjanBahalia2 ай бұрын
I'm your big fan sir, can u please start the mern stack development
@ahmedashraf43712 ай бұрын
hmm , i think Mewtwo is my favourite pokemon
@kedarppopuri27762 ай бұрын
Bro please me pandas tutorial too
@kapibara2440Ай бұрын
Greetings from Poland Bro 🎉🎉🎉
@user-oe1oh3bj3p2 ай бұрын
Mr.Bro is every api's arcitecture different ?
@mohsenmk25372 ай бұрын
Please teach us api in JavaScript
@BishanTamang-hl3pn2 ай бұрын
Hello Brother make java with Data Structure and Algorithms course