Skip to main content

Python LiveReload is an awesome tool for web developers

Project description

LiveReload Server in Python Version.

Web Developers need to refresh a browser everytime when he saved a file (css, javascript, html), it is really boring. LiveReload will take care of that for you. When you saved a file, your browser will refresh itself. And what’s more, it can do some tasks like compiling less to css before the browser refreshing.

Installation

Python LiveReload is designed for web developers who know Python.

Install python-livereload

Install Python LiveReload with pip:

$ pip install livereload

If you don’t have pip installed, try easy_install:

$ easy_install livereload

Install Browser Extensions

Get Browser Extensions From LiveReload.com

  • Chrome Extension

  • Safari Extension

  • Firefox Extension

Visit: http://help.livereload.com/kb/general-use/browser-extensions

Get Notification

If you are on Mac, and you are a Growl user:

$ pip install gntp

If you are on Ubuntu, you don’t need to do anything. Notification just works.

Working with file protocal

Enable file protocal on Chrome:

http://i.imgur.com/qGpJI.png

Quickstart

LiveReload is designed for more complex tasks, not just for refreshing a browser. But you can still do the simple task.

Assume you have livereload and its extension installed, and now you are in your working directory. With command:

$ livereload

your browser will reload, if any file in the working directory changed.

Guardfile

More complex tasks can be done by Guardfile. Write a Guardfile in your working directory, the basic syntax:

#!/usr/bin/env python
from livereload.task import Task

Task.add('static/style.css')
Task.add('*.html')

Now livereload will only guard static/style.css and html in your workding directory.

But python-livereload is more than that, you can specify a task before refreshing the browser:

#!/usr/bin/env python
from livereload.task import Task
from livereload.compiler import lessc

Task.add('style.less', lessc('style.less', 'style.css'))

And it will compile less css before refreshing the browser now.

Others

If you are on a Mac, you can buy LiveReload2.

If you are a rubist, you can get guard-livereload.

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

livereload-0.15.tar.gz (17.5 kB view details)

Uploaded Source

File details

Details for the file livereload-0.15.tar.gz.

File metadata

  • Download URL: livereload-0.15.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for livereload-0.15.tar.gz
Algorithm Hash digest
SHA256 2447f56cc8b26a7d0a993b3fb8408cb373603bbb6d6f62b6ed99e7f2943c9176
MD5 bfec54e0ce8a8d83616206c2dcb1e87c
BLAKE2b-256 14a36ea418a76e8162ab340dd7c70719c8149faa952878d380c037ffd1dd851b

See more details on using hashes here.

Provenance

Supported by

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