Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rest API
#1
First off, I know nothing about Python. But trying to explore options.
I am mainly an excel user, Tableau and Power BI.

I am interested in getting in API data into an excel format in order to analyze. First I was just trying to connect to a Yahoo Finance API to get stock quotes and any other data it provides. When I started to read, it seemed that it needed Python code to bring data in. There is no way I will have the technical know how to write code efficiently any time soon but could someone try to get me started in getting the tools needed to get API data into excel Sorry if this is not a good question/request.

Just looking into some help from you guys.
If I need to provide more detail please let me know and I can try to be more specific.

Thank you kindly.
Reply
#2
Hi.
There are a number of packages and ways in "Python" to produce an API but I would recommend for some ease Flask as it helps you with a lot of mundane coding and can produce fairly quick results, the package i would suggest is Flask-RESTFUL, you will need to first configure your python environment and depending on your platform there are plenty of option here - if you need guidance on that then repost. The extraction of data from whatever source is at this moment undefined, unless you are looking to use Yahoo Finance specifically and writing an excel file will be simple enough in CSV form, might be better to produce a csv file and then import that into excel as a manual process if you want to create specific cell headings or formulas etc?
Am happy to help if you wish to PM
Regards
-------- *
“Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.”
Reply
#3
I was in the same boat just recently. Knew nothing about Python or Flask or JavaScript or Svelte, but other programmers (one actually -- my daughter's boyfriend) suggested Flask because of its ease-of-use for developing RESTful APIs. Damn if it wasn't easy. I bought O'Reilly's book and off I went. Using PyCharm as the IDE and MySQL. Deploying to Ubuntu Apache was messy but it works. Just jump in. The water's fine.

End product was a Media Information Management System to manage our collection of LPs, CDs, and DVDs. My wife was using Excel on her slower-than-dirt laptop and was frustrated. Since I just retired a week before the lock-downs, I had time on my hands to develop this 'little' app. I was not (and still am not) a web developer, but Python/Flask/JavaScript/Svelte were not insurmountable obstacles. All I know I got from Google (and that book I mentioned). Good luck.

Oh, crap. I just re-read the original post and it sounds like the poster wants to interact with an API, not become one. I rambled for nuttin'.
Reply
#4
(Jun-02-2020, 01:16 PM)nuffink Wrote: There are a number of packages and ways in "Python" to produce an API but I would recommend for some ease Flask as it helps you with a lot of mundane coding and can produce fairly quick results, the package i would suggest is Flask-RESTFUL

The post is about being the client of an API, not serving one.

I don't know if Yahoo! Finance has a Python library to interact with their API, but in any case, you should be able to use any HTTP client, e.g. Requests.
Reply
#5
Python library for yahoo finance: https://github.com/lukaszbanasiak/yahoo-finance , seems simple to use even for a non-pythonista :)

As for writing the data to csv file use csv standard library https://docs.python.org/3/library/csv.html
Reply
#6
(Jun-06-2020, 07:09 PM)mlieqo Wrote: Python library for yahoo finance: https://github.com/lukaszbanasiak/yahoo-finance , seems simple to use even for a non-pythonista :)
Yahoo did decommissioned there API 2-3 year ago this did break all older library like yahoo-finance
There are newer library like yfinance that work after the change.

Not a recommend way if a library(API)work,but in this post i take some data from Yahoo Finance the parser way Cool
Reply


Forum Jump:

User Panel Messages

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