Python client for consuming the EETC Data Hub REST API. Used for retrieving data managed by EETC Data Hub.
"""
Getting historical daily price data for AAPL.
"""
from eetc_data_client.client import EETCDataClient
client = EETCDataClient(api_key="getYourApiKeyFromUsOnRequest")
aapl_price_data_df = client.get_price_data("AAPL")
print(aapl_price_data_df.head())
"""
Getting fundamentals for AAPL.
"""
from eetc_data_client.client import EETCDataClient
client = EETCDataClient(api_key="getYourApiKeyFromUsOnRequest")
aapl_fundamentals_data_df = client.get_fundamentals_data("AAPL", frequency="Quarterly")
print(aapl_fundamentals_data_df.head())
"""
Getting (macroeconomic) indicator data for Chinese exports.
"""
from eetc_data_client.client import EETCDataClient
client = EETCDataClient(api_key="getYourApiKeyFromUsOnRequest")
china_exports_data_df = client.get_macroeconomic_data("Exports in USD - China")
print(china_exports_data_df.head())
To get the available (macroeconomic) indicators use the get_indicators()
method.
"""
Getting historical macroeconomic data for Chinese exports.
"""
from eetc_data_client.client import EETCDataClient
client = EETCDataClient(api_key="getYourApiKeyFromUsOnRequest")
indicators = client.get_indicators()
print(indicators)
To run the project locally and work on it, you need the following:
- Python 3.8+
sudo apt-get install build-essential
make update_and_install_python_requirements
- Add the package name to
requirements.in
- Run:
make update_and_install_python_requirements
- Update
[build_system]
section inpyproject.toml
in case new dependencies are added or existing dependency versions were updated. - Update
version
field in[project]
section inpyproject.toml
whenever there is a new change to the project. - Publish package on PyPi Test, run command:
make publish_package_on_pypi_test
- If everything is ok on PyPi Test, publish on "real" PyPi using the command:
make publish_package_on_pypi