Skip to content

simplenote-vim/simplenote.py

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

simplenote.py

Documentation Status https://travis-ci.org/mrtazz/simplenote.py.svg?branch=master Code Climate PyPi MIT License

Introduction

simplenote.py is a python library for the simplenote.com web service.

Installation

Install via pip:

pip install simplenote

Or if you must:

easy_install simplenote

Usage

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)