Consume an API with Python Requests

preview_player
Показать описание


~~~~~~~~~~~~~~~ CONNECT ~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~ SUPPORT ME ~~~~~~~~~~~~~~

🅑 Bitcoin - 3HnF1SWTzo1dCU7RwFLhgk7SYiVfV37Pbq
🅔 Eth - 0x350139af84b60d075a3a0379716040b63f6D3853
Рекомендации по теме
Комментарии
Автор

Dude this is so simple and straighforward and what a good API example! Thanks man

podawe
Автор

Thanks Bro I've been trying to understand how to code API´s calls in Python and you nailed it, you took the patience to do a great job, step by step and well explained.

Автор

could someone please attach the code? i get this error: Traceback (most recent call last):
File "/home/runner/DarkturquoiseFrightenedTelevision/main.py", line 22, in <module>
print(get_price('BTC'))
File "/home/runner/DarkturquoiseFrightenedTelevision/main.py", line 18, in get_price
return response.json().get('data', {}).get(symbol, {}).get('quote',
AttributeError: 'list' object has no attribute 'get'

Joshkidcaterer
Автор

Thanks for this video! I'm learning Python for work and I want to try and own a project where we'll be working with an API, this was a great example of working with one and I think it's going to be super helpful.

shout
Автор

Absolute chad, thanks for the help homie. :)

Toknus
Автор

Hi,
Thank you for the tutorial.
Using request can we only do 'get' method or we can do post and put?

swaggynature
Автор

great video! thank you. could you please also make a video about batch API call?

daming-xing
Автор

Hi
I want to write code that adds two binary numbers using list, loop and function. I ask the user to enter binary numbers, then get individual bit using for loop and add it to bianryList1 and then enter second binary and do the same . After that I use for loops to get the numbers in the binarylist1 and backwards. When i get one element I want to pass them to addTwoNumbers function but I dont know how. I want to pass "c" and "g" to addTwo Numbers function. i want to do normal addition, from right to left . is there a way to iterate binaryList1 and and binaryList2 in reverse using one for loop. In that way, I can pass c and g addTwoNumbers function to Thank you in advance. Here is my code:



binaryList1 = []
binaryList2 = []

def AddTwoNumbers(number1, number2):
return number1 + number2


n1 = input(" enter now: ")

for i in map(int, n1):
binaryList1.append(i)


n2 = input(" enter now: ")

for j in map(int, n2):
binaryList2.append(j)

for c in reversed(binaryList1):
print(c)

for g in reversed(binaryList2):
print(g)

result = AddTwoNumbers(c, g)

abdirahmanabdullahi
Автор

I watched till now 3 hours, 7 hours remains, did you explain the getchar in the remaining hours, please answer🙏❤️

mahdialkak
Автор

I love you caleb, i am learning your c tutorial (The 10 hours video), is that enough, or you miss some information about c language?? Please answer me

mahdialkak