Module Expr Str Import alias ImportFrom alias Assign NameStore Str Assign NameStore ListLoad Str Str ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad FunctionDef arguments args NameParam NameParam NameParam defaults Str body Assign AttributeStore NameLoad attr NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign NameStore BinOpAdd Str NameLoad Assign NameStore BinOpAdd NameLoad Str Assign AttributeStore NameLoad attr Call Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad NameLoad keyword AttributeLoad NameLoad attr decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults ListLoad body Expr Str For NameStore NameLoad body TryExcept body Return Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Pass Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Return Call NameLoad NameLoad NameLoad decorator_list
N/A N/A 
    flask_silk
    ~~~~~~~~~~

    A small extension for adding `Silk
    <http://www.famfamfam.com/lab/icons/silk/>`_ icons.

    :copyright: (c) 2010-2013 by Heungsub Lee.
    :license: BSD, see LICENSE for more details.
 N/A os flask send_from_directory N/A __version__ 0.2 N/A __all__ N/A Silk send_silkicon Silk N/A object N/A N/A This small extension adds :meth:`silkicon` to your Flask application::

        from flask import Flask
        from flask.ext.silk import Silk
        app = Flask(__name__)
        silk = Silk(app)

    Or it works with your Flask blueprint::

        from flask import Blueprint
        from flask.ext.silk import Silk
        blu = Blueprint(__name__, __name__)
        silk = Silk(blu)

    Now the application or blueprint's ``/icons/<filaname>`` is bound to
    :meth:`silkicon` for serves a prepared silk icon.

    Also you can work with your own icon directory::

        import os.path
        my_icons = os.path.join(silk.base.static_path, 'icons')
        my_icons2 = os.path.join(silk.base.static_path, 'other-icons')
        silk.register_icon_directory(my_icons)
        silk.register_icon_directory(my_icons2)

    Silk finds the icon in the registered directories first. If the icon does
    not exist in any directories, Silk finds the prepared silk icon.

    :param base: the flask application or blueprint.
    :param silk_path: the path to serve silk icons. Defaults to ``/icons``.
     N/A directories N/A __init__ N/A N/A self base silk_path N/A /icons N/A N/A N/A self base base N/A N/A N/A N/A silk_path startswith / N/A N/A silk_path N/A / silk_path N/A rule N/A silk_path /<filename> N/A N/A self silkicon N/A N/A N/A N/A self base route rule N/A self silkicon N/A register_icon_directory N/A N/A self path N/A N/A N/A N/A N/A N/A self directories append path N/A silkicon N/A N/A self filename N/A N/A N/A N/A send_silkicon filename directories N/A self directories N/A N/A send_silkicon N/A N/A filename directories N/A N/A N/A N/A Sends an icon. The icon is in a shared directory or specified
    directories. Here's a simple examples of how to send an icon::

        from flask.ext.silk import send_silkicon
        from myapplication import app

        my_icons = os.path.join(app.static_path, 'icons')
        my_icons2 = os.path.join(app.static_path, 'other-icons')

        @app.route('/static/icons/<filename>')
        def icon(filename):
            return send_silkicon(filename, directories=[my_icons, my_icons2])

    :param filename: the filename for icon.
    :param directories: specified icon directories.
     N/A directory directories N/A N/A N/A N/A N/A send_from_directory directory filename N/A N/A N/A Exception N/A N/A N/A directory N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ icons N/A N/A send_from_directory directory filename N/A