Python library for the simplenote.com API
simplenote.py is a python library for the simplenote.com web service.
Install via pip:
pip install simplenote
Or if you must:
simplenote.py can be imported into any python module:
import simplenote sn = simplenote.Simplenote(user, password)
The object then provides the following API methods:
sn.get_note_list(data=True, since=cursor, tags=) # Supports optional `tags` parameter that takes a list of tags # to return only notes that contain at least one of these tags. # Also supports a `since` parameter, but as per the Simperium # API this is no longer a date, rather a cursor. # Lastly, also supports a `data` parameter (defaults to True) # to only return keys/ids and versions sn.get_note(note_id) # note id is value of key `key` in note dict as returned # by get_note_list. Supports optional version integer as # argument to return previous versions sn.add_note(note) # A ``note`` object is a dictionary with at least a # ``content`` property, containing the note text. sn.update_note(note) # The ``update_note`` method needs a note object which # also has a ``key`` property. sn.trash_note(note_id) simplenote.delete_note(note_id)
Handle BadStatusLine errors
Fix issue where update_note was actually modifying the external note object passed to it rather than creating a copy and returning that.
Fix error in version number
Handle invalid/expired tokens
Fixed KeyError in get_note_list() when offline
Fix order of note, status for trash_note
Adds since paramter back in (as Simperium cursor, not date)
No end facing change in functionality - just removes a superfluous default modificationDate
Actually remove the since support like I thought I had. I could have re-implemented since in as per tags so it filters after pulling everything else, but since (ha!) I used “since” for a faster note loading there seems little point.
Documentation updatess only
Update to the Simperium API: https://simperium.com/docs/http/
Breaking changes: * The since parameter has been removed. Simperium supports the since parameter, but as a cursor, not a date. * The syncnum key no longer exists (this is an upstream change) * Things seem to be UTF-8 by default
This should largely be a drop in replacement though: E.g. Simperium uses id instead of key, but simplenote.py handles that for you.
Sort tags in get_note and update_note
Unescape html entites due to api change
Bug fix for an error introduce as a result of code review improvements.
Code review improvements only. No change to functionality.
I ended up pointing tag v1.0.0 at a re-written commit so need to retag. No changes beyond that.
I think this is stable and proven enough to be version 1 by now. Can then roll into Simplenote.vim v1.
Python 2 and 3 compatibility
Fix version number of deploy, now deploying is working
Testing deploying to PyPi with a change in credentials
Testing deploying to PyPi again, changes to .travis.yml
Testing deploying to PyPi again, this time will use an annotate tag
Test related changes again (using single instance)
Also testing deploying to PyPi via Travis
Minor change to a test, setting it as expected failure.
update_note uses utf-8 encoding on returned note content
Minor change to Travis CI PyPi deply details
Change optional argument for get_note_list() to be “since date” instead of quanity
Various tweaks to tests and CI in attempt to make more robust
get_note_list() now supports optional tag argument
get_note() now supports optional version argument
Add optional argument for quantity to get_note_list()
catch HTTPError when fetching notes
immediately return if note could not be fetched
trash_note has to succeed for deleting
add json import fallbacks
fix display of ‘+’ signs
add sphinx docs
minor changes for pypi
basic API methods
get note list
get single note
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.