Follow The Evernote SDK for Python Quick-start Guide:
-
Get an account on sandbox.evernote.com and an API key;
-
Download Evernote SDK for python:
$ sudo pip install evernote;
- A simple demo:
from evernote.api.client import EvernoteClient
dev_token = ... # get it from evernote dev server
client = EvernoteClient(token=dev_token)
userStore = client.get_user_store()
user = userStore.getUser()
type(user) # evernote.edam.type.ttypes.User
user.username # your user name of sandbox account
noteStore = client.get_note_store()
type(noteStore) # evernote.api.client.Store
notebooks = noteStore.listNotebooks()
for n in notebooks:
print n.name
Now add a notebook in your account via web page, then run:
notebooks = noteStore.listNotebooks()
for n in notebooks:
print n.name
You can get the list with newly added notebook.
- Create a new note:
import evernote.edam.type.ttypes as Types
note = Types.Note()
note.title = "Test note from EDAMTest.py"
# set note content ...
created_note = note_store.createNote(note)