Assets server#
Module: ansys.solutions.dash_super_components.utils.assets_server
For configuration instructions on how to register the component assets endpoint in your Dash application, see the Register component assets and add external scripts section in the Getting started guide.
Provides a helper function for adding asset endpoints to a Dash application.
Some components in this library (for example, LogsSupervisor) rely on
custom JavaScript and other static assets that are shipped with the package.
Rather than requiring consumers to copy those files into their application’s
assets folder, this helper module allows to register a simple Flask route that
serves files directly from the package’s bundled assets directory.
- ansys.solutions.dash_super_components.utils.assets_server.add_super_components_assets(app: DashProxy) None#
Add a Flask endpoint to serve static assets from the library.
This allows components to reference assets like JavaScript or CSS files without requiring the user to manually copy them to their app’s assets folder.
- Parameters:
- app
DashProxy The
DashProxyapplication instance (fromdash_extensions.enrich).
- app