pyramid_webpack package

Module contents


class pyramid_webpack.StaticResource(path)[source]

Bases: object

Wrapper around a filepath or asset path

classmethod create(path, root_package)[source]

Create a StaticResource, setting the package if needed


Open a stream object to the resource data

class pyramid_webpack.Webpack(request, name='DEFAULT')[source]

Bases: object

Wrapper object for the public webpack API

get_bundle(bundle_name, extensions=None)[source]

Get all the chunks contained in a bundle


Load and cache the webpack stats file

class pyramid_webpack.WebpackState(settings, root_package_name='pyramid_webpack', name='DEFAULT')[source]

Bases: object

Wrapper for all webpack configuration and cached data

load_stats(cache=None, wait=None)[source]

Load and cache the webpack-stats file

pyramid_webpack.get_webpack(request, name='DEFAULT')[source]

Get the Webpack object for a given webpack config.

Called at most once per request per config name.


Add pyramid_webpack methods and config to the app