Module Expr Str Import alias Import alias ImportFrom alias Import alias TryExcept body Import alias handlers ExceptHandler type NameLoad body TryExcept body Import alias identifier handlers ExceptHandler type NameLoad body ImportFrom alias identifier Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Num ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore BinOpMod Str TupleLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad BinOpAdd NameLoad NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Return TupleLoad NameLoad Num ExceptHandler type NameLoad name NameStore body Return TupleLoad NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr If Call NameLoad SubscriptLoad NameLoad Index Str NameLoad body Assign SubscriptStore NameLoad Index Str Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str ListComp IfExp Call NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr Str NameLoad comprehension NameStore SubscriptLoad NameLoad Index Str Return TupleLoad NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If Call NameLoad SubscriptLoad NameLoad Index Str NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad SubscriptLoad NameLoad Index Str Str If CompareIn Str NameLoad body Assign SubscriptStore NameLoad Index Str ListComp IfExp Call NameLoad NameLoad NameLoad Call NameLoad NameLoad Str NameLoad comprehension NameStore SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Assign NameStore BinOpMod Str TupleLoad NameLoad SubscriptLoad NameLoad Index Str Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign NameStore BinOpMod Str TupleLoad NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str TryExcept body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Return TupleLoad NameLoad Num Return TupleLoad Call AttributeLoad NameLoad attr NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr Dict Str NameLoad orelse If BoolOpAnd CompareEq Call NameLoad NameLoad NameLoad CompareIn Str NameLoad body Return Call AttributeLoad NameLoad attr NameLoad orelse Return TupleLoad Str Num decorator_list FunctionDef arguments args NameParam NameParam defaults Call NameLoad Str body Expr Str Assign NameStore Num Assign NameStore ListLoad Assign NameStore Dict Assign NameStore Dict Str ListLoad If CompareLt NameLoad NameLoad body Assign NameStore BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad orelse Assign NameStore BinOpMod Str TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad TryExcept body Assign NameStore Call NameLoad BinOpAdd NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr SubscriptLoad NameLoad Index Str handlers ExceptHandler type NameLoad body Assign NameStore Num While BoolOpAnd CompareIn Str NameLoad CompareLt Call NameLoad SubscriptLoad NameLoad Index Str NameLoad body If CompareLt BinOpSub NameLoad Call NameLoad SubscriptLoad NameLoad Index Str NameLoad body Assign NameStore TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str BinOpSub NameLoad Call NameLoad SubscriptLoad NameLoad Index Str orelse Assign NameStore TupleLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str NameLoad Assign NameStore BinOpMod Str NameLoad TryExcept body Assign NameStore Call NameLoad BinOpAdd NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr SubscriptLoad NameLoad Index Str handlers ExceptHandler type NameLoad body Assign NameStore Num Assign NameStore SubscriptLoad NameLoad Index Str Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad Num body Return TupleLoad NameLoad NameLoad Assign SubscriptStore NameLoad Index Str Num Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad Num body Return TupleLoad NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad Call NameLoad NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword BinOpAdd NameLoad NameLoad keyword Str TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Return TupleLoad NameLoad Num Return TupleLoad Dict Num decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Dict NameLoad NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list decorator_list
N/A N/A 
    simplenote.py
    ~~~~~~~~~~~~~~

    Python library for accessing the Simplenote API

    :copyright: (c) 2011 by Daniel Schauenberg
    :license: MIT, see LICENSE for more details.
 N/A urllib N/A urllib2 urllib2 HTTPError N/A base64 N/A N/A N/A json N/A N/A N/A ImportError N/A N/A N/A N/A simplejson json N/A N/A N/A ImportError N/A django.utils simplejson json N/A AUTH_URL https://simple-note.appspot.com/api/login N/A DATA_URL https://simple-note.appspot.com/api2/data N/A INDX_URL https://simple-note.appspot.com/api2/index? N/A NOTE_FETCH_LENGTH 20 Simplenote N/A object N/A N/A  Class for interacting with the simplenote web service  __init__ N/A N/A self username password N/A N/A N/A  object constructor  N/A N/A self username N/A N/A urllib2 quote username N/A N/A self password N/A N/A urllib2 quote password N/A N/A self token None N/A authenticate N/A N/A self user password N/A N/A N/A  Method to get simplenote auth token

        Arguments:
            - user (string):     simplenote email address
            - password (string): simplenote password

        Returns:
            Simplenote API token as string

         N/A auth_params N/A email=%s&password=%s N/A user password N/A values N/A N/A base64 encodestring auth_params N/A request N/A Request AUTH_URL values N/A N/A N/A res N/A N/A N/A N/A urllib2 urlopen request read N/A token N/A N/A urllib2 quote res N/A N/A N/A IOError N/A N/A token None N/A token N/A get_token N/A N/A self N/A N/A N/A  Method to retrieve an auth token.

        The cached global token is looked up and returned if it exists. If it
        is `None` a new one is requested and returned.

        Returns:
            Simplenote API token as string

         N/A N/A N/A self token None N/A N/A N/A self token N/A N/A self authenticate N/A self username N/A self password N/A N/A self token N/A get_note N/A N/A self noteid N/A N/A N/A  method to get a specific note

        Arguments:
            - noteid (string): ID of the note to get

        Returns:
            A tuple `(note, status)`

            - note (dict): note object
            - status (int): 0 on sucesss and -1 otherwise

         N/A params N/A /%s?auth=%s&email=%s N/A N/A str noteid N/A N/A self get_token N/A self username N/A request N/A Request N/A DATA_URL params N/A N/A N/A response N/A N/A urllib2 urlopen request N/A N/A N/A HTTPError N/A e N/A N/A N/A e -1 N/A N/A IOError N/A e N/A N/A N/A e -1 N/A note N/A N/A json loads N/A N/A response read N/A N/A isinstance N/A note N/A content str N/A N/A N/A note N/A content N/A N/A N/A note N/A content encode utf-8 N/A N/A tags note N/A N/A N/A note N/A tags N/A N/A N/A isinstance t str N/A N/A t encode utf-8 t N/A t N/A note N/A tags N/A N/A note 0 N/A update_note N/A N/A self note N/A N/A N/A  function to update a specific note object, if the note object does not
        have a "key" field, a new note is created

        Arguments
            - note (dict): note object to update

        Returns:
            A tuple `(note, status)`

            - note (dict): note object
            - status (int): 0 on sucesss and -1 otherwise

         N/A N/A isinstance N/A note N/A content str N/A N/A N/A note N/A content N/A unicode N/A note N/A content utf-8 N/A N/A tags note N/A N/A N/A note N/A tags N/A N/A N/A isinstance t str N/A unicode t utf-8 t N/A t N/A note N/A tags N/A N/A key note N/A N/A url N/A %s/%s?auth=%s&email=%s N/A DATA_URL N/A note N/A key N/A N/A self get_token N/A self username N/A N/A url N/A %s?auth=%s&email=%s N/A DATA_URL N/A N/A self get_token N/A self username N/A request N/A Request url N/A N/A urllib quote N/A N/A json dumps note N/A response N/A N/A N/A response N/A N/A N/A N/A urllib2 urlopen request read N/A N/A N/A IOError N/A e N/A N/A N/A e -1 N/A N/A N/A N/A json loads response 0 N/A add_note N/A N/A self note N/A N/A N/A wrapper function to add a note

        The function can be passed the note as a dict with the `content`
        property set, which is then directly send to the web service for
        creation. Alternatively, only the body as string can also be passed. In
        this case the parameter is used as `content` for the new note.

        Arguments:
            - note (dict or string): the note to add

        Returns:
            A tuple `(note, status)`

            - note (dict): the newly created note
            - status (int): 0 on sucesss and -1 otherwise

         N/A N/A N/A type note str N/A N/A N/A N/A self update_note N/A content note N/A N/A N/A N/A N/A type note dict N/A content note N/A N/A N/A N/A self update_note note N/A N/A N/A No string or valid note. -1 N/A get_note_list N/A N/A self qty N/A N/A float inf N/A N/A  function to get the note list

        The function can be passed an optional argument to limit the
        size of the list returned. If omitted a list of all notes is
        returned.

        Arguments:
            - quantity (integer number): of notes to list

        Returns:
            An array of note objects with all properties set except
            `content`.

         N/A status 0 N/A ret N/A N/A response N/A N/A notes N/A data N/A N/A N/A qty NOTE_FETCH_LENGTH N/A N/A params N/A auth=%s&email=%s&length=%s N/A N/A N/A self get_token N/A self username qty N/A N/A params N/A auth=%s&email=%s&length=%s N/A N/A N/A self get_token N/A self username NOTE_FETCH_LENGTH N/A N/A N/A request N/A Request N/A INDX_URL params N/A response N/A N/A json loads N/A N/A N/A N/A urllib2 urlopen request read N/A N/A N/A N/A notes N/A data extend N/A response N/A data N/A N/A N/A IOError N/A N/A status -1 N/A N/A N/A mark response N/A N/A len N/A notes N/A data qty N/A N/A N/A N/A qty N/A len N/A notes N/A data NOTE_FETCH_LENGTH N/A N/A vals N/A N/A N/A self get_token N/A self username N/A response N/A mark N/A qty N/A len N/A notes N/A data N/A N/A vals N/A N/A N/A self get_token N/A self username N/A response N/A mark NOTE_FETCH_LENGTH N/A params N/A auth=%s&email=%s&mark=%s&length=%s vals N/A N/A N/A request N/A Request N/A INDX_URL params N/A response N/A N/A json loads N/A N/A N/A N/A urllib2 urlopen request read N/A N/A N/A N/A notes N/A data extend N/A response N/A data N/A N/A N/A IOError N/A N/A status -1 N/A ret N/A notes N/A data N/A N/A ret status N/A trash_note N/A N/A self note_id N/A N/A N/A  method to move a note to the trash

        Arguments:
            - note_id (string): key of the note to trash

        Returns:
            A tuple `(note, status)`

            - note (dict): the newly created note or an error message
            - status (int): 0 on sucesss and -1 otherwise

         N/A N/A note status N/A N/A self get_note note_id N/A N/A status -1 N/A N/A N/A note status N/A N/A note N/A deleted 1 N/A N/A N/A self update_note note N/A delete_note N/A N/A self note_id N/A N/A N/A  method to permanently delete a note

        Arguments:
            - note_id (string): key of the note to trash

        Returns:
            A tuple `(note, status)`

            - note (dict): an empty dict or an error message
            - status (int): 0 on sucesss and -1 otherwise

         N/A N/A note status N/A N/A self trash_note note_id N/A N/A status -1 N/A N/A N/A note status N/A params N/A /%s?auth=%s&email=%s N/A N/A str note_id N/A N/A self get_token N/A self username N/A request N/A Request url N/A DATA_URL params method DELETE N/A N/A N/A N/A N/A urllib2 urlopen request N/A N/A N/A IOError N/A e N/A N/A N/A e -1 N/A N/A N/A 0 N/A N/A Request N/A N/A urllib2 Request N/A N/A  monkey patched version of urllib2's Request to support HTTP DELETE
        Taken from http://python-requests.org, thanks @kennethreitz
     __init__ N/A N/A self url data headers origin_req_host unverifiable method N/A None N/A None False None N/A N/A N/A N/A N/A urllib2 Request __init__ self url data headers origin_req_host unverifiable N/A N/A self method method N/A get_method N/A N/A self N/A N/A N/A N/A self method N/A N/A N/A self method N/A N/A N/A N/A urllib2 Request get_method self N/A N/A