Module Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias Assign NameStore Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad FunctionDef arguments args defaults vararg body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Return Call NameLoad Str decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad Return TupleLoad Call AttributeLoad NameLoad attr Num Dict Str Str decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad Return TupleLoad Call AttributeLoad NameLoad attr Num Dict Str Str decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad Return TupleLoad Call AttributeLoad NameLoad attr Num Dict Str Str decorator_list Call AttributeLoad NameLoad attr Str ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Return NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Num Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad AttributeLoad NameLoad attr If NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body For NameStore Call AttributeLoad NameLoad attr Str body If CompareEq Call AttributeLoad NameLoad attr Str Str body Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str If NameLoad body Return NameLoad Return Call AttributeLoad NameLoad attr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad Call AttributeLoad NameLoad attr attr Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body For NameStore Call AttributeLoad NameLoad attr Str body If CompareEq Call AttributeLoad NameLoad attr Str Str body Return SubscriptLoad NameLoad Index Str Assign NameStore Call AttributeLoad NameLoad attr Str If NameLoad body Return Call NameLoad AttributeLoad NameLoad attr Return Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad Str keyword AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Return Call AttributeLoad NameLoad attr Dict Str Str Str Str Call AttributeLoad NameLoad attr Str NameLoad Dict Str Str decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr Dict Str Str Str Str Str Call AttributeLoad NameLoad attr Str Str Dict Num Str Dict Str Str decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad Str keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad Dict Str Str Str Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr Dict Str Str Str Str Str Str Str Num Call AttributeLoad NameLoad attr Str Str ListLoad Str Dict Str Dict Str ListLoad Str Dict Num Str decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad Str keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Dict Str Str Str Str Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Call AttributeLoad NameLoad attr With Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad keyword Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr keyword AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Call NameLoad NameLoad Assign NameStore Call NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str Num Assign NameStore ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr If BoolOpOr CompareNotEq NameLoad NameLoad CompareNotEq NameLoad NameLoad body Return Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad AttributeLoad NameLoad attr orelse Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If Call AttributeLoad NameLoad attr Str body Assign NameStore BinOpAdd Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareNotEq AttributeLoad NameLoad attr Num body Return NameLoad Return Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad With Call NameLoad NameLoad Str NameStore body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list
N/A N/A hashlib N/A io N/A json N/A logging N/A struct N/A os StringIO StringIO textwrap dedent zipfile ZipFile N/A requests bs4 BeautifulSoup cryptography.hazmat.backends default_backend cryptography.hazmat.primitives hashes serialization cryptography.hazmat.primitives.asymmetric padding PIL Image requests.exceptions RequestException flask Flask render_template request url_for N/A __version__ 0.1 N/A app N/A Flask __name__ N/A N/A N/A N/A app config from_object refract.default_settings N/A N/A N/A N/A app config from_pyfile settings.py silent True N/A N/A N/A N/A app config from_envvar REFRACT_SETTINGS silent True N/A N/A N/A N/A app logger addHandler N/A N/A logging StreamHandler N/A ROOT N/A N/A N/A os path dirname N/A N/A N/A os path abspath __file__ path N/A N/A N/A parts N/A N/A N/A N/A N/A os path join ROOT parts N/A index N/A N/A N/A N/A N/A N/A render_template index.html N/A N/A N/A app route / manifest N/A N/A N/A N/A N/A url N/A N/A N/A request args get url N/A name N/A N/A N/A request args get name N/A icon_url N/A N/A N/A request args get icon_url N/A app N/A OpenWebApp url name name icon_url icon_url N/A N/A N/A N/A app mini_manifest 200 N/A Content-Type application/x-web-app-manifest+json N/A N/A N/A app route /manifest.webapp open_web_app_zip N/A N/A N/A N/A N/A url N/A N/A N/A request args get url N/A name N/A N/A N/A request args get name N/A icon_url N/A N/A N/A request args get icon_url N/A app N/A OpenWebApp url name name icon_url icon_url N/A N/A N/A N/A app zipfile 200 N/A Content-Type application/x-chrome-extension N/A N/A N/A app route /webapp.zip chrome_app_crx N/A N/A N/A N/A N/A url N/A N/A N/A request args get url N/A name N/A N/A N/A request args get name N/A icon_url N/A N/A N/A request args get icon_url N/A app N/A ChromeApp url name name icon_url icon_url N/A N/A N/A N/A app crxfile 200 N/A Content-Type application/c N/A N/A N/A app route /chrome_app.crx WebApp N/A object N/A __init__ N/A N/A self url name icon_url N/A None None N/A N/A N/A self url url N/A N/A self id N/A N/A N/A N/A hashlib sha1 url hexdigest N/A N/A self _name name N/A N/A self _icon None N/A N/A self icon_url icon_url N/A N/A self _soup None N/A soup N/A N/A self N/A N/A N/A 
        Fetch the index for the webapp and throw it in BeautifulSoup.
         N/A N/A N/A self _soup N/A N/A N/A N/A response N/A N/A requests get N/A self url N/A N/A N/A response raise_for_status N/A N/A N/A RequestException N/A N/A None N/A N/A self _soup N/A BeautifulSoup N/A response text N/A N/A self _soup N/A icon N/A N/A self N/A N/A N/A N/A N/A self _icon N/A N/A N/A self _icon N/A resize_square N/A N/A self fetch_icon 512 N/A N/A self _icon N/A icon_bytes N/A N/A self N/A N/A N/A icon_bytes N/A N/A io BytesIO N/A N/A N/A N/A N/A self icon save icon_bytes PNG N/A value N/A N/A icon_bytes getvalue N/A N/A N/A icon_bytes close N/A value N/A fetch_icon N/A N/A self N/A N/A N/A 
        Generate a PIL image with an appropriate 512x512 icon for this
        app.
         N/A N/A self icon_url N/A N/A image N/A download_image N/A self icon_url N/A image N/A N/A image N/A soup N/A N/A self soup N/A soup N/A N/A tag N/A N/A soup findAll meta N/A N/A N/A N/A N/A tag get property og:image N/A N/A image N/A download_image N/A tag N/A content N/A image N/A N/A image N/A N/A N/A Image open N/A path static/icon_512.png N/A name N/A N/A self N/A N/A N/A N/A N/A self _name N/A N/A N/A self _name N/A N/A N/A N/A self fetch_name strip N/A N/A self _name N/A fetch_name N/A N/A self N/A N/A N/A Fetch an appropriate name for this app. N/A soup N/A N/A self soup N/A soup N/A N/A tag N/A N/A soup findAll meta N/A N/A N/A N/A N/A tag get property og:site_name N/A N/A N/A tag N/A content N/A title_tag N/A N/A soup find title N/A title_tag N/A N/A N/A unicode N/A title_tag string N/A Refracted Web App N/A N/A OpenWebApp N/A WebApp N/A mini_manifest N/A N/A self N/A N/A N/A 
        Generate the mini-manifest for this app that points to the
        zipfile with the full packaged app.
         N/A package_path N/A url_for open_web_app_zip url N/A self url name N/A N/A self name icon_url N/A self icon_url N/A N/A N/A json dumps N/A name description package_path developer N/A N/A self name A refracted web app. package_path N/A name Refract N/A manifest N/A N/A self N/A N/A N/A N/A N/A json dumps N/A name description launch_path icons developer N/A N/A self name A refracted web app. /index.html N/A 512 icon_512.png N/A name Refract N/A index_html N/A N/A self N/A N/A N/A N/A render_template open_web_app/index.html app_url N/A self url N/A zipfile N/A N/A self N/A N/A N/A N/A build_zipfile N/A manifest.webapp index.html icon_512.png N/A N/A N/A N/A self manifest encode utf8 N/A N/A N/A N/A self index_html encode utf8 N/A N/A self icon_bytes N/A N/A ChromeApp N/A WebApp N/A manifest N/A N/A self N/A N/A N/A N/A N/A json dumps N/A manifest_version name description version permissions app icons 2 N/A N/A self name A refracted web app. 0.1 N/A webview N/A background N/A scripts N/A background.js N/A 512 icon_512.png N/A background_js N/A N/A self N/A N/A N/A N/A render_template chrome_app/background.js N/A index_html N/A N/A self N/A N/A N/A N/A render_template chrome_app/index.html app_url N/A self url N/A crxfile N/A N/A self N/A N/A N/A zip_data N/A build_zipfile N/A manifest.json background.js index.html icon_512.png N/A N/A N/A N/A self manifest encode utf8 N/A N/A N/A N/A self background_js encode utf8 N/A N/A N/A N/A self index_html encode utf8 N/A N/A self icon_bytes N/A N/A open N/A N/A app config N/A PRIVATE_KEY rb f N/A N/A private_key N/A N/A serialization load_pem_private_key N/A N/A f read password None backend N/A default_backend N/A signer N/A N/A private_key signer N/A N/A padding PKCS1v15 N/A N/A hashes SHA1 N/A N/A N/A signer update zip_data N/A sig N/A N/A signer finalize N/A der N/A N/A N/A N/A private_key public_key public_bytes encoding N/A N/A serialization Encoding DER format N/A N/A serialization PublicFormat SubjectPublicKeyInfo N/A der_len N/A N/A struct pack <I N/A len der N/A sig_len N/A N/A struct pack <I N/A len sig N/A out N/A StringIO N/A MAGIC Cr24 N/A VERSION N/A N/A struct pack <I 2 N/A data N/A MAGIC VERSION der_len sig_len der sig zip_data N/A d data N/A N/A N/A N/A out write d N/A crx N/A N/A out getvalue N/A N/A N/A out close N/A crx N/A N/A resize_square N/A N/A image size N/A N/A N/A N/A width height N/A image size N/A N/A N/A width size N/A height size N/A N/A N/A N/A image resize N/A size size N/A Image BILINEAR N/A N/A image N/A download_image N/A N/A image_url N/A N/A N/A N/A N/A image_url startswith // N/A N/A image_url N/A http: image_url N/A response N/A N/A requests get image_url N/A N/A N/A response status_code 200 N/A N/A None N/A N/A N/A Image open N/A StringIO N/A response content N/A build_zipfile N/A N/A files N/A N/A N/A 
    Generate a string containing the data for a zipfile containing the
    given files.

    :param dict files: Dictionary of files to zip. Keys are filenames,
                       values are file contents.
     N/A out N/A StringIO N/A N/A ZipFile out w zipf N/A N/A N/A filename file_contents N/A N/A files items N/A N/A N/A N/A zipf writestr filename file_contents N/A zip_contents N/A N/A out getvalue N/A N/A N/A out close N/A zip_contents N/A