Skip to main content
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).

Metadata

Release files for live_stylus 0.2.7

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

Source distribution (sdist)

Source distribution for live_stylus 0.2.7
File Size Uploaded Provenance
live_stylus-0.2.7.tar.gz 2.8 kB Without provenance Details

Release files / live_stylus-0.2.7.tar.gz

Download URL live_stylus-0.2.7.tar.gz
Size 2.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b76940b0c89966eface8228e9ba536bee1c86249828e3331c66919b3b0dd4715
BLAKE2b-256 checksum
How to use checksums
2941b498c4ed37a3d9dba06559ea2f6b15ae8c421860c0dcecb8f87bf5366e10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for live_stylus 0.2.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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