How to use the awe.resources.get function in awe

To help you get started, we’ve selected a few awe examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dankilman / awe / awe / export.py View on Github external
def __init__(self, export_fn, get_initial_state, custom_component, encoder):
        from . import __version__
        self.client_root = 'client/awe/build'
        self.export_fn = export_fn or self.default_export_fn
        self.get_initial_state = get_initial_state
        self.custom_component = custom_component
        self.encoder = encoder
        self.index = resources.get(os.path.join(self.client_root, 'index.html'))
        self.base_url = BASE_URL or '{}/{}'.format(BASE_STATIC_URL, __version__)
github dankilman / awe / awe / __init__.py View on Github external
try:
    from .page import Page  # noqa
    from .decorators import inject  # noqa
    from .view import CustomElement
    from .chart import Chart as _Chart
    from .api_client import APIClient
except ImportError:
    if not os.environ.get('AWE_BUILD'):
        raise
    Page = None
    inject = None
    CustomElement = None
    _Chart = None
    APIClient = None

__version__ = resources.get('VERSION')