Skip to main content

AssetReload uses WebSockets to broadcast asset changes to the browser.

## Installation

Install with pip:

pip install assetreload

If you don’t have it installed, use easy_install instead.

## Usage

Once setup, cd into a directory you would like to monitor for changes and start the server by running assetreload.

There are optional arguments:

  • path defines the directory to monitor (defaults to current directory)

  • port the port on which to start the server (defaults to 8888)

E.g.

assetreload –path=~/mysite/ –port=8889

### In the browser

Make a copy of assetreload.js in your project, and include the following:

<script id=”assetreload” src=”assetreload.js”></script>

Changes to the current document or JavaScript trigger a page reload, but images and CSS can happen without. Configure your port to match the above by using data-port on the script tag.

You can automatically generate assetreload.js into a directory of your choosing by running:

assetreload genscript

## Changelog

### Version 1.1

  • Added: error handling for incorrectly configured ports

  • Removed: need to specify a list of files to watch - files are now handled automatically

Release files for assetreload 1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for assetreload 1.1
File Size Uploaded
assetreload-1.1.tar.gz 3.3 kB Details

Release files / assetreload-1.1.tar.gz

Download URL assetreload-1.1.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4b921cfd7de69b8f1e2279234beef307df0d92c86c8a2b3a7a4d44087c36db68
BLAKE2b-256 checksum
How to use checksums
86238a6cb0f8a8f094968c304b5f4e3b3d2a85b851b0388642b8ca3475af6b2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.1 This release

1 release file

1.0.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page