Read My Own Evernotes

evernote, macos, python

Solution

That special API Key you mentioned is for OAuth, which is overkill for some app that accesses only your own account. Evernote has a developer token for that purpose.

Below is a simple example how you can get a note with title.

import evernote.edam.type.ttypes as Types
import evernote.edam.notestore.ttypes as NoteStore

from evernote.api.client import EvernoteClient

auth_token = "your developer token"

client = EvernoteClient(token=auth_token, sandbox=True)
note_store = client.get_note_store()

note_filter = NoteStore.NoteFilter()
note_filter.words = 'intitle:"test"'
notes_metadata_result_spec = NoteStore.NotesMetadataResultSpec()

notes_metadata_list = note_store.findNotesMetadata(note_filter, 0, 1, notes_metadata_result_spec)
note_guid = notes_metadata_list.notes[0].guid
note = note_store.getNote(note_guid, True, False, False, False)

Problem

I'm aware that the Evernote Python API provides a method called `getNote` if I get a special API key. However, this is all overkill for my desired application: to use Python to textually analyze my own personal Evernotes. Even using the API seems like overkill, since it is more geared toward app developers. Is there an easier way to access my own personal Evernotes in Python by name of note and read their content?

Original source