Skip to main content

Webpack integration layer for Python.

Project description

https://github.com/inveniosoftware/pywebpack/workflows/CI/badge.svg https://img.shields.io/coveralls/inveniosoftware/pywebpack.svg https://img.shields.io/github/tag/inveniosoftware/pywebpack.svg https://img.shields.io/pypi/dm/pywebpack.svg https://img.shields.io/github/license/inveniosoftware/pywebpack.svg

Webpack integration layer for Python.

Using Flask? Check out Flask-WebpackExt.

PyWebpack makes it easy to interface with your existing Webpack project and does not try to manage Webpack for you. PyWebpack does this via:

  • Manifests: You tell Webpack to write a manifest.json using plugins such as webpack-manifest-plugin, webpack-yam-plugin or webpack-bundle-tracker. PyWebpack reads the manifest and makes your compiled assets available to your template engine such as Jinja.

  • API for NPM: PyWebpack provides an API so that e.g. project.install() will run npm install in your Webpack project.

Optionally you can use PyWebpack to also:

  • Inject configuration: PyWebpack will write a config.json into your webpack project, which you can import in your webpack configuration. You can define what goes in the config e.g. let webpack know about output paths or dynamic entry points.

  • Collect bundles: If your Webpack project is spread over multiple Python packages, PyWebpack can help you dynamically assemble the files into a Webpack project. This is useful if you don’t know until build time which packages are installed.

Further documentation is available on https://pywebpack.readthedocs.io/

Changes

Version 2.2.1 (released 2025-12-03)

  • project: allow for LocalProxy in copy to and from fields

Version v2.2.0 (released 2025-07-14)

  • chores: replaced importlib_metadata with importlib

Version 2.1.0 (released 2024-11-26)

  • Add a copy func to copy assets from a directly to another. It validates the from/to path to sandbox the copy locations.

Version 2.0.1 (released 2024-09-20)

  • Removes implicit dependency on setuptools and use importlib-metadata instead of the deprecated pkg_resources module

Version 2.0.0 (released 2024-03-04)

  • Removes dependency on node-semver package

  • Changes the NPM dependencies merging algorithm to fail when conflicting major versions of the same package are found.

Version 1.2.0 (released 2021-01-21)

  • Fixes an issue where if you were using WebpackBundleProject with the LinkStorage to make symlinks, you would end up having your source package.json overwritten.

Version 1.1.0 (released 2020-05-25)

  • Adds support for collecting aliases from bundles.

  • Restore Python 2 compatibility.

Version 1.0.4 (released 2020-05-25)

  • Python commands now fail when the NPM processes exit with an error.

Version 1.0.3 (released 2020-05-12)

  • Fixes issue with incorrect parsing of webpack-bundle-tracker manifests.

Version 1.0.2 (released 2020-04-28)

  • Adds a depth parameter to LinkStorage to allow for higher level symlinking on the folder-level.

Version 1.0.1 (released 2020-02-14)

  • Adds support for having bundles that are callables in bundles_from_entry_point.

Version 1.0.0 (released 2018-10-29)

  • Adds documentation and extra tests.

Version 0.1.2 (released 2017-11-06)

  • Fix invalid closing of </link> tag.

Version 0.1.1 (released 2017-05-29)

  • Fix problem with package.json not being updated.

  • Fix merging of package.json dependencies.

  • Increase test coverage.

Version 0.1.0 (released 2017-05-16)

  • Initial public release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pywebpack-2.2.1.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pywebpack-2.2.1-py2.py3-none-any.whl (18.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pywebpack-2.2.1.tar.gz.

File metadata

  • Download URL: pywebpack-2.2.1.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pywebpack-2.2.1.tar.gz
Algorithm Hash digest
SHA256 dfd175d545063be3e1913865ce327e7d78fa839f0c16ea9f51be997ebcce9b78
MD5 b4af1fa7e57da4bb32f5eb93281cc044
BLAKE2b-256 22aec5883fae42abf9f749cb9d3bd9eef42de5e32403ae758346883b4a3cfbfe

See more details on using hashes here.

File details

Details for the file pywebpack-2.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: pywebpack-2.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pywebpack-2.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e25fadc9d8fddaa0c74c2743c4037fc5bff411091e7c671a490894a295f599e9
MD5 3c05092793b93801a0ad45cb6ff33239
BLAKE2b-256 ffca116aef18f196fe9674871f8d3b3f6f5e89563b9f75e601a42d33dfe5c20a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page