Comments (4)
This issue has been resolved. This is due to you being on an older version of Python. You are on 3.8 while the typing requirements are added in 3.10. I've made a temporary repository that will work (https://pypi.org/project/financetoolkit/1.0.2/) and it is made in such a way if you now will do pip install financetoolkit -U
it will update to this version.
However, note that from now on, all future package versions will be based on Python 3.10 and onwards. I would recommend upgrading your Python distribution to get access to the newest features in due time.
(test_python38) jeroenbouma@Jeroens-MacBook-Pro FinanceToolkit % pip install financetoolkit
Collecting financetoolkit
Using cached financetoolkit-1.0.2-py2.py3-none-any.whl (42 kB)
Installing collected packages: financetoolkit
Successfully installed financetoolkit-1.0.2
(test_python38) jeroenbouma@Jeroens-MacBook-Pro FinanceToolkit % pip install pandas
Collecting pandas
Using cached pandas-2.0.2-cp38-cp38-macosx_11_0_arm64.whl (10.7 MB)
Collecting pytz>=2020.1
Using cached pytz-2023.3-py2.py3-none-any.whl (502 kB)
Collecting numpy>=1.20.3
Using cached numpy-1.24.3-cp38-cp38-macosx_11_0_arm64.whl (13.8 MB)
Collecting python-dateutil>=2.8.2
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting tzdata>=2022.1
Using cached tzdata-2023.3-py2.py3-none-any.whl (341 kB)
Collecting six>=1.5
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: pytz, tzdata, six, numpy, python-dateutil, pandas
Successfully installed numpy-1.24.3 pandas-2.0.2 python-dateutil-2.8.2 pytz-2023.3 six-1.16.0 tzdata-2023.3
(test_python38) jeroenbouma@Jeroens-MacBook-Pro FinanceToolkit % python
Python 3.8.16 (default, Mar 1 2023, 21:18:45)
[Clang 14.0.6 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from financetoolkit import Toolkit
>>> Toolkit(['AAPL', 'TSLA'], 'API_KEY').get_balance_sheet_statement()
<stdin>:1: DeprecationWarning: This version of the Finance Toolkit is depreciated. Finance Toolkit 1.0.3 and onwards require Python 3.10 and higher. Please update to the latest version of Python and the Finance Toolkit.
date 2018 2019 2020 2021 2022
AAPL Cash and Cash Equivalents 25913000000 48844000000 38016000000 34940000000 23646000000
Short Term Investments 40388000000 51713000000 52927000000 27699000000 24658000000
Cash and Short Term Investments 66301000000 100557000000 90943000000 62639000000 48304000000
Accounts Receivable 48995000000 45804000000 37445000000 51506000000 60932000000
Inventory 3956000000 4106000000 4061000000 6580000000 4946000000
... ... ... ... ... ...
TSLA Minority Interest 1390361000 1492000000 1454000000 1394000000 1194000000
Total Liabilities and Equity 29739614000 34309000000 52148000000 62131000000 82338000000
Total Investments 0 0 0 131000000 5932000000
Total Debt 13827271000 13419000000 11739000000 6834000000 3099000000
Net Debt 10141653000 7151000000 -7645000000 -10742000000 -19086000000
[86 rows x 5 columns]
>>> exit()
(test_python38) jeroenbouma@Jeroens-MacBook-Pro FinanceToolkit % conda list
# packages in environment at /Users/jeroenbouma/miniconda3/envs/test_python38:
#
# Name Version Build Channel
ca-certificates 2023.05.30 hca03da5_0
financetoolkit 1.0.2 pypi_0 pypi
libcxx 14.0.6 h848a8c0_0
libffi 3.4.4 hca03da5_0
ncurses 6.4 h313beb8_0
numpy 1.24.3 pypi_0 pypi
openssl 1.1.1t h1a28f6b_0
pandas 2.0.2 pypi_0 pypi
pip 23.0.1 py38hca03da5_0
python 3.8.16 hc0d8a6c_3
python-dateutil 2.8.2 pypi_0 pypi
pytz 2023.3 pypi_0 pypi
readline 8.2 h1a28f6b_0
setuptools 67.8.0 py38hca03da5_0
six 1.16.0 pypi_0 pypi
sqlite 3.41.2 h80987f9_0
tk 8.6.12 hb8d0fd4_0
tzdata 2023.3 pypi_0 pypi
wheel 0.38.4 py38hca03da5_0
xz 5.4.2 h80987f9_0
zlib 1.2.13 h5a0b063_0
(test_python38) jeroenbouma@Jeroens-MacBook-Pro FinanceToolkit %
from financetoolkit.
Hello! Can you provide me with the full error message so I can look into it?
Seems to be working just fine from my side.
![image](https://private-user-images.githubusercontent.com/46355364/244644706-ba841c03-4181-4607-9f2c-b6cbc581faf1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjIwMTIxMTAsIm5iZiI6MTcyMjAxMTgxMCwicGF0aCI6Ii80NjM1NTM2NC8yNDQ2NDQ3MDYtYmE4NDFjMDMtNDE4MS00NjA3LTlmMmMtYjZjYmM1ODFmYWYxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzI2VDE2MzY1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTkwMjU5YWJlZGQ4YjdkYWM0NWE3ZGQ3ZWUyZTJkMTU3YWZjNzcyMzc2ZWIzYmNlMGVkYzE5OTgzOWJiZWZlMmYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.4P9Bm6NuvYwIpfjVZAZ2H5TjznStad5NxGLRaXeBgLY)
from financetoolkit.
sure, i also attached the source code that i am using
error.log
from financetoolkit import Toolkit
companies = Toolkit(['AAPL', 'MSFT'], api_key="f127ecd7b9084a166e1a7c853a7ef195")
an Enterprise example
enterprise = companies.get_enterprise()
a Historical example
historical_data = companies.get_historical_data(start='2000-01-01', end='2020-01-01')
a Financial Statement example
balance_sheet_statement = companies.get_balance_sheet_statement()
a Ratios example
profitability_ratios = companies.ratios.collect_profitability_ratios()
Show the profitability ratios for Apple
profitability_ratios.loc['AAPL']
from financetoolkit.
Got it, will fix tomorrow!
from financetoolkit.
Related Issues (20)
- Error in company.ratios Function HOT 1
- [HELP] - ValueError: source code string cannot contain null bytes HOT 4
- Missing Symbols in FinanceDatabase available in FinancialToolkit HOT 1
- Growth, value, quality stocks info ? HOT 1
- [IMPROVE] Proxy availability HOT 1
- [IMPROVE] Add TQDM/Progress bar on tickers fetched HOT 1
- ValueError: Value is too big! HOT 5
- Is it possible to get sector, industry group info of stock ? HOT 1
- Clarification on Calculating Excess Returns in Non-US Markets with Different Currencies HOT 3
- [BUG] IndexingError: Too many indexers HOT 1
- [IMPROVE] NaN values in PVGO HOT 7
- [BUG] Error using convert_currency=True for old financial data HOT 6
- [FR] Adding calculation of resistance levels HOT 4
- [Bugs] small error in get_interest_debt_per_share(..) HOT 2
- [BUG]: serious bug, missing Estimates dates HOT 2
- [BUG]: income statement false if trailing for Weighted Average Shares HOT 2
- fixed_income is not working anymore HOT 1
- get_historical_data() method error HOT 3
- ratios.get_reinvestment_rate(trailing=4) not working HOT 1
- [BUG] Try to convert Currency when eod and statement are same currency HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from financetoolkit.