API Docs

Media asset management for Invenio.

class invenio_assets.ext.InvenioAssets(app=None, **kwargs)[source]

Invenio asset extension.

Extension initialization.

  • app – An instance of Flask.
  • **kwargs – Keyword arguments are passed to init_app method.
init_app(app, **kwargs)[source]

Initialize application object.

Parameters:app – An instance of Flask.

Changed in version 1.0.0b2: The entrypoint has been renamed to entry_point_group.


Initialize configuration.

Parameters:app – An instance of Flask.


Default Webpack project for Invenio.

class invenio_assets.webpack.UniqueJinjaManifestEntry(name, paths)[source]

Manifest entry which avoids double output of chunks.

Initialize manifest entry.

class invenio_assets.webpack.UniqueJinjaManifestLoader(manifest_cls=<class 'flask_webpackext.manifest.JinjaManifest'>, entry_cls=<class 'invenio_assets.webpack.UniqueJinjaManifestEntry'>)[source]

Factory which uses the Jinja manifest entry.

Initialize manifest loader.

class invenio_assets.webpack.WebpackThemeBundle(import_name, folder, default=None, themes=None)[source]

Webpack themed bundle.

Initialize webpack bundle.

  • import_name – Name of the module where the WebpackBundle class is instantiated.
  • folder – Relative path to the assets.
  • default – The default theme to be used when APP_THEME is not set.
  • themes – Dictionary where the keys are theme names and the values are the keyword arguments passed to the WebpackBundle class.

Command Line Interface

Click command-line interface for assets and collect.