new retrieval api with python ???

Hello - can someone tell me which api to use for news retrieval and give me a template script to do so from a python ide?

Best Answer

Answers

  • thanks for this. this worked but now after a few days i am getting an error


    'AttributeError: partially initialized module 'eikon' has no attribute 'set_app_key' (most likely due to a circular import)'


    I have checked the app key, renewed it in case and tried an upgrade of the eikon library on my machine - without any luck any thoughts?

  • Hello @mbh181

    Did you use the Eikon Data API library?

    import eikon as ek

    ek.set_app_key('8e9bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1b035d')

    Or the https://pypi.org/project/refinitiv-data/ library?

    import refinitiv.data.eikon as ek
    ek.set_app_key('XXXXXX')

    I recommend you uninstall the library and then re-install the latest version library.

  • hello @wasin.w i have installed the latest version of the Eikon Data API via pip. i am currently running 1.1.16 and still getting this error. i have reinstalled the latest version. same error msg.

  • Hello @mbh181

    I am sorry to hear that you are facing the issue.

    Can you please set up a new fresh Python environment, then install only Eikon Data API and try in Python command line mode? You can see how to set up a Python environment from this Quick Start page.

    In the meantime, you can use the Eikon/Workspace "CodeBook" app which is the cloud-hosted Jupyter Notebook development environment for Python scripting from the application. The CodeBook is natively available in Refinitiv Workspace and Eikon as an app, providing access to Refinitiv APIs and other popular Python libraries that are already pre-installed on the cloud.