Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Convert stylus to css real time. Easily used by any web framwork.

Project Description
python-live-stylus
==============

Convert stylus to css real time. Easily used with any web framwork.

It depends on the Python Stylus: https://github.com/bkad/python-stylus

And the Python Stylus depends on [Node](http://nodejs.org) and [Stylus](http://learnboost.github.com/stylus/)

So you need install nodejs and stylus node package before .


#Install

```
pip install live-stylus
```

#Usage

For example , in a flask project :

```python
from flask import Flask
from live_stylus import ConvStylus

app = Flask(__name__)

from views import *


if __name__ == "__main__":
app.debug = True
ConvStylus()
app.run()
```

In a bottle project :

```python
from bottle import route, run, template
from live_stylus import ConvStylus

@route('/hello/:name')
def index(name='World'):
return template('<b>Hello {{name}}</b>!', name=name)

if __name__ == "__main__":
ConvStylus()
run(host='localhost', port=8080)
```

Then when you modify a .styl file , it will be converted to a same name css file immediately.
eg. css/global.styl => css/global.css

If you use other web framwork , just put the ConvStylus() before the .run() or .start() code.

If you want monitor a explicitly directoty's stylus file , you can use:

```python
ConvStylus('/home/xxx/work/project/static/css')
```

## Questions?

If you have any questions, please feel free to ask through [New Issue](https://github.com/allenm/python-live-stylus/issues/new).

## License

python-live-stylus is available under the terms of the [MIT License](https://github.com/allenm/python-live-stylus/blob/master/license).
Release History

Release History

This version
History Node

0.2.7

History Node

0.2.6

History Node

0.2.5

History Node

0.2.4

History Node

0.2.3

History Node

0.2.1

History Node

0.2

History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
live_stylus-0.2.7.tar.gz (2.8 kB) Copy SHA256 Checksum SHA256 Source Nov 22, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting