这是indexloc提供的服务,不要输入任何密码
Skip to content

east-empire-trading-company/eetc-data-client

Repository files navigation

EETC Data Client

Python client for consuming the EETC Data Hub REST API. Used for retrieving data managed by EETC Data Hub.

Usage examples

"""
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())

Available (macroeconomic) indicators

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)

Development

System requirements

To run the project locally and work on it, you need the following:

  • Python 3.8+

Project setup

sudo apt-get install build-essential
make update_and_install_python_requirements

Adding a new Python package

  1. Add the package name to requirements.in
  2. Run:
make update_and_install_python_requirements

Publishing new package versions to PyPi

  1. Update [build_system] section in pyproject.toml in case new dependencies are added or existing dependency versions were updated.
  2. Update version field in [project] section in pyproject.toml whenever there is a new change to the project.
  3. Publish package on PyPi Test, run command:
make publish_package_on_pypi_test
  1. If everything is ok on PyPi Test, publish on "real" PyPi using the command:
make publish_package_on_pypi

About

Client library for retrieving data managed by EETC Data Hub.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •