How to use Evernote API with Python?

213 Views Asked by At

I have been trying to use the Evernote API with Python, but I am facing some compatibility issues with the Python "evernote" library. I have tried different workarounds but have been unable to find a solution that allows me to use the API without issues.

Specifically, I have encountered the following problems:

  • The "evernote" library seems to be incompatible with Python 3.7 and higher. I encountered errors related to the use of the "inspect" module and the "exec" function.
  • I tried using the "evernote3" package, which was listed as a separate package on PyPI, but I was unable to import it as a module in my Python code.
  • I also attempted to install "evernote-sdk-python3" as suggested in various forums, but I found that this package was not available on PyPI.

As a result, I am currently unable to interact with the Evernote API using Python. Is there an updated version of the library that I can use or any other workaround that I may have overlooked?

2

There are 2 best solutions below

1
Cyril LM On

use evernote3 : https://github.com/evernote/evernote-sdk-python3

once installed

from evernote.api.client import EvernoteClient
# Set your Evernote developer token here
dev_token = config['EVERNOTE_DEVTOKEN']

# Create an Evernote client
client = EvernoteClient(token=dev_token, sandbox=False)

will work

0
Vedthedataguy On

Access Evernote API in a virtual/conda environment. You need to do sandbox = True if you are trying to test sandbox environment.

If you are trying to access production evernote, then developer token wont work. You need to activate your keys by raising request.