Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
API in Python
#1
Hello all,

I am starting with Python (previously i coded some in VBA) and I have a question about API. Is there any good book about that?

I need API to connect with Bloomberg and Reuters.


br
Reply
#2
For Bloomberg, try https://data.bloomberglp.com/professiona...e-2.54.pdf

For Reuters try: https://newsapi.org/s/reuters-api
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#3
To connect to API's is Requests the best tool.
Today is most common that get JSON back from API,then can parse out wanted stuff as you get Python dictionary back.
Example:
>>> import requests
>>> 
>>> r = requests.get('https://api.github.com/users/defunkt')
>>> r.status_code
200
>>> data = r.json()
>>> data['company']
'@github '
>>> data['bio']
'? '
>>> data['updated_at']
'2018-02-25T19:53:23Z'
Reply
#4
Many thanks,

I saw on youtube that there are many tutorials with JSON

br
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020