Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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__)
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')