Module TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias Import alias Assign NameStore Str Assign NameStore BinOpMod Str Call AttributeLoad NameLoad attr NameLoad Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Raise NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpMult Num Num While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If CompareLt Call NameLoad NameLoad NameLoad body Break decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str With Call NameLoad NameLoad Str NameStore body Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return CompareIn NameLoad Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Raise NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str With Call NameLoad NameLoad Str NameStore body Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Raise NameLoad decorator_list decorator_list
N/A N/A N/A cStringIO StringIO N/A N/A N/A ImportError N/A StringIO StringIO N/A re N/A VALID_NON_NUM \`\!"#$%&'()+,-.<=>?@[]^_{}~ N/A VALID_KEY_REGEXP N/A ^[%s0-9a-zA-Z]+$ N/A N/A re escape VALID_NON_NUM N/A This regular expression tests if a key is valid. Allowed are all
alphanumeric characters, as well as ``!"`#$%&'()+,-.<=>?@[]^_{}~``. N/A VALID_KEY_RE N/A N/A re compile VALID_KEY_REGEXP N/A A compiled version of :data:`~simplekv.VALID_KEY_REGEXP`. KeyValueStore N/A object N/A N/A The smallest API supported by all backends.

    Keys are ascii-strings with certain restrictions, guaranteed to be properly
    handled up to a length of at least 250 characters. Any function that takes
    a key as an argument raises a ValueError if the key is incorrect.

    The regular expression for what constitutes a valid key is available as
    :data:`simplekv.VALID_KEY_REGEXP`.
     __contains__ N/A N/A self key N/A N/A N/A Checks if a key is present

        :param key: The key whose existence should be verified.

        :raises ValueError: If the key is not valid.
        :raises IOError: If there was an error accessing the store.

        :returns: True if the key exists, False otherwise.
         N/A N/A N/A self _check_valid_key key N/A N/A N/A self _has_key key N/A __iter__ N/A N/A self N/A N/A N/A Iterate over keys

        :raises IOError: If there was an error accessing the store.
         N/A N/A N/A self iter_keys N/A delete N/A N/A self key N/A N/A N/A Delete key and data associated with it.

        If the key does not exist, no error is reported.

        :raises ValueError: If the key is not valid.
        :raises IOError: If there was an error deleting.
         N/A N/A N/A self _check_valid_key key N/A N/A N/A self _delete key N/A get N/A N/A self key N/A N/A N/A Returns the key data as a string.

        :param key: Key to get

        :raises ValueError: If the key is not valid.
        :raises IOError: If the file could not be read.
        :raises KeyError: If the key was not found.
         N/A N/A N/A self _check_valid_key key N/A N/A N/A self _get key N/A get_file N/A N/A self key file N/A N/A N/A Write contents of key to file

        Like :func:`put_file`, this method allows backends to implement a
        specialized function if data needs to be written to disk or streamed.

        If *file* is a string, contents of *key* are written to a newly
        created file with the filename *file*. Otherwise, the data will be
        written using the *write* method of *file*.

        :param key: The key to be read
        :param file: Output filename or an object with a *write* method.

        :raises ValueError: If the key is not valid.
        :raises IOError: If there was a problem reading or writing data.
        :raises KeyError: If the key was not found.
         N/A N/A N/A self _check_valid_key key N/A N/A isinstance file str N/A N/A N/A N/A self _get_filename key file N/A N/A N/A N/A self _get_file key file N/A iter_keys N/A N/A self N/A N/A N/A Return an Iterator over all keys currently in the store, in any
        order.

        :raises IOError: If there was an error accessing the store.
         N/A NotImplementedError N/A keys N/A N/A self N/A N/A N/A Return a list of keys currently in store, in any order

        :raises IOError: If there was an error accessing the store.
         N/A N/A list N/A N/A self iter_keys N/A open N/A N/A self key N/A N/A N/A Open key for reading.

        Returns a read-only file-like object for reading a key.

        :param key: Key to open

        :raises ValueError: If the key is not valid.
        :raises IOError: If the file could not be read.
        :raises KeyError: If the key was not found.
         N/A N/A N/A self _check_valid_key key N/A N/A N/A self _open key N/A put N/A N/A self key data N/A N/A N/A Store into key from file

        Stores string *data* in *key*.

        :param key: The key under which the data is to be stored
        :param data: Data to be stored into key

        :returns: The key under which data was stored

        :raises ValueError: If the key is not valid.
        :raises IOError: If storing failed or the file could not be read
         N/A N/A N/A self _check_valid_key key N/A N/A N/A self _put key data N/A put_file N/A N/A self key file N/A N/A N/A Store into key from file on disk

        Stores data from a source into key. *file* can either be a string,
        which will be interpretet as a filename, or an object with a *read()*
        method.

        If the passed object has a *fileno()* method, it may be used to speed
        up the operation.

        The file specified by *file*, if it is a filename, may be removed in
        the process, to avoid copying if possible. If you need to make a copy,
        pass the opened file instead.

        :param key: The key under which the data is to be stored
        :param file: A filename or an object with a read method. If a filename,
                     may be removed

        :returns: The key under which data was stored

        :raises ValueError: If the key is not valid.
        :raises IOError: If there was a problem moving the file in.
         N/A N/A isinstance file str N/A N/A N/A N/A self _put_filename key file N/A N/A N/A N/A self _put_file key file N/A _check_valid_key N/A N/A self key N/A N/A N/A Checks if a key is valid and raises a ValueError if its not.

        When in need of checking a key for validity, always use this
        method if possible.

        :param key: The key to be checked
         N/A N/A N/A N/A VALID_KEY_RE match key N/A N/A N/A ValueError N/A %r contains illegal characters key N/A _delete N/A N/A self key N/A N/A N/A Implementation for :meth:`~simplekv.KeyValueStore.delete`. The
        default implementation will simply raise a
        :py:exc:`NotImplementedError`.
         N/A NotImplementedError N/A _get N/A N/A self key N/A N/A N/A Implementation for :meth:`~simplekv.KeyValueStore.get`. The default
        implementation will create a :mod:`StringIO`-buffer and then call
        :meth:`~simplekv.KeyValueStore._get_file`.

        :param key: Key to be retrieved
         N/A buf N/A StringIO N/A N/A N/A self _get_file key buf N/A N/A N/A buf getvalue N/A _get_file N/A N/A self key file N/A N/A N/A Write key to file-like object file. Either this method or
        :meth:`~simplekv.KeyValueStore._get_filename` will be called by
        :meth:`~simplekv.KeyValueStore.get_file`. Note that this method does
        not accept strings.

        :param key: Key to be retrieved
        :param file: File-like object to write to
         N/A source N/A N/A self open key N/A bufsize N/A 1024 1024 N/A True N/A N/A buf N/A N/A source read bufsize N/A N/A N/A file write buf N/A N/A N/A len buf bufsize N/A N/A N/A _get_filename N/A N/A self key filename N/A N/A N/A Write key to file. Either this method or
        :meth:`~simplekv.KeyValueStore._get_file` will be called by
        :meth:`~simplekv.KeyValueStore.get_file`. This method only accepts
        filenames and will open the file with a mode of ``wb``, then call
        :meth:`~simplekv.KeyValueStore._get_file`.

        :param key: Key to be retrieved
        :param filename: Filename to write to
         N/A N/A open filename wb dest N/A N/A N/A N/A self _get_file key dest N/A _has_key N/A N/A self key N/A N/A N/A Default implementation for
        :meth:`~simplekv.KeyValueStore.__contains__`.

        Determines whether or not a key exists by calling
        :meth:`~simplekv.KeyValueStore.keys`.

        :param key: Key to check existance of
         N/A N/A key N/A N/A self keys N/A _open N/A N/A self key N/A N/A N/A Open key for reading. Default implementation simply raises a
        :exc:`NotImplementedError`.

        :param key: Key to open
         N/A NotImplementedError N/A _put N/A N/A self key data N/A N/A N/A Implementation for :meth:`~simplekv.KeyValueStore.put`. The default
        implementation will create a :mod:`StringIO`-buffer and then call
        :meth:`~simplekv.KeyValueStore._put_file`.

        :param key: Key under which data should be stored
        :param data: Data to be stored
         N/A N/A N/A self _put_file key N/A StringIO data N/A _put_file N/A N/A self key file N/A N/A N/A Store data from file-like object in key. Either this method or
        :meth:`~simplekv.KeyValueStore._put_filename` will be called by
        :meth:`~simplekv.KeyValueStore.put_file`. Note that this method does
        not accept strings.

        The default implementation will simply raise a
        :exc:`NotImplementedError`.

        :param key: Key under which data should be stored
        :param file: File-like object to store data from
         N/A NotImplementedError N/A _put_filename N/A N/A self key filename N/A N/A N/A Store data from file in key. Either this method or
        :meth:`~simplekv.KeyValueStore._put_file` will be called by
        :meth:`~simplekv.KeyValueStore.put_file`. Note that this method does
        not accept strings.

        The default implementation will open the file in ``rb`` mode, then call
        :meth:`~simplekv.KeyValueStore._put_file`.

        :param key: Key under which data should be stored
        :param file: Filename of file to store
         N/A N/A open filename rb source N/A N/A N/A N/A self _put_file key source N/A N/A UrlKeyValueStore N/A KeyValueStore N/A N/A A KeyValueStore that supports getting a download URL for keys.
     url_for N/A N/A self key N/A N/A N/A Returns a full external URL that can be used to retrieve *key*.

        Does not perform any checks (such as if a key exists), other than
        whether or not *key* is a valid key.

        :param key: The key for which the url is to be generated

        :raises ValueError: If the key is not valid.

        :return: A string containing a URL to access key
         N/A N/A N/A self _check_valid_key key N/A N/A N/A self _url_for key N/A _url_for N/A N/A self key N/A N/A N/A NotImplementedError N/A N/A