Hi. Thanks for taking the time to do this python utility. Sadly I cannot use it due to a circular import. I ran into this issue by running the example you give on pypi:
I use python 3.11.6
Reproduction Procedure
# cnbc.py
from cnbc import APIWrapper, Endpoints
api_wrapper = APIWrapper(
api_key='YOUR_API_KEY',
endpoint=Endpoints.TRANSLATE
)
# The APIWrapper class will supply the required parameters for the configured CNBC API endpoint.
api_wrapper_params = api_wrapper.params
api_wrapper_params['symbol'] = 'AAPL'
# The APIWrapper class will make a request to the CNBC API and return the response in JSON.
json_response = api_wrapper.request()
# The APIWrapper class can be repurposed to make multiple requests to the CNBC API.
api_wrapper.endpoint = Endpoints.GET_SUMMARY
api_wrapper_params = api_wrapper.params
api_wrapper_params['issueIds'] = json_response['issueId']
json_response = api_wrapper.request()
$ python3 cnbc.py
Traceback (most recent call last):
File "/home/lwinkler/prog/python/stocki/stocki/services/cnbc.py", line 1, in
from cnbc import APIWrapper, Endpoints
File "/home/lwinkler/prog/python/stocki/stocki/services/cnbc.py", line 1, in
from cnbc import APIWrapper, Endpoints
ImportError: cannot import name 'APIWrapper' from partially initialized module 'cnbc' (most likely due to a circular import) (/home/lwinkler/prog/python/stocki/stocki/services/cnbc.py)
zsh: exit 1 python3 cnbc.py
Overview
Hi. Thanks for taking the time to do this python utility. Sadly I cannot use it due to a circular import. I ran into this issue by running the example you give on pypi:
I use python 3.11.6
Reproduction Procedure
$ python3 cnbc.py Traceback (most recent call last): File "/home/lwinkler/prog/python/stocki/stocki/services/cnbc.py", line 1, in
from cnbc import APIWrapper, Endpoints
File "/home/lwinkler/prog/python/stocki/stocki/services/cnbc.py", line 1, in
from cnbc import APIWrapper, Endpoints
ImportError: cannot import name 'APIWrapper' from partially initialized module 'cnbc' (most likely due to a circular import) (/home/lwinkler/prog/python/stocki/stocki/services/cnbc.py)
zsh: exit 1 python3 cnbc.py
``