Growler-Sass
A Growler middleware package for rendering sass files into CSS to be sent to the browser.
This implementation uses libsass as the backend.
Usage
This package provides the SassMiddleware class exposed in growler.ext, as well as the ‘standard’ location of growler_sass. As a middleware class, objects are given to the application object in the order they should be called after receiving a client’s request. This object checks for the existence of a
Example
If you have a sass source files named client/style/neat_style.sass with contents:
body
> p
color: red
And a python script to run a webapp, server/app.py
# MUST be called like this! You cannot use import growler.ext.SassMiddleware
from growler.ext import SassMiddleware
from growler import App
app = App("SassExample")
app.use(SassMiddleware(source="client/style", dest='/styles'))
...
@app.get("/")
def index(req, res):
res.send_html("""<!DOCTYPE html>
<html>
<head>
<link href='/styles/neat_style.css' rel='stylesheet'>
</head>
<body>
<p>This text should be red!</p>
</body>
</html>""")
app.create_server_and_run_forever(...)
A request made to /styles/neat_style.css will return the compiled contents of neat_style.sass:
body > p {
color: red; }
License
This python package is licensed under the MIT license.
Metadata
Release files for growler-sass 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| growler-sass-0.1.0.tar.gz | 6.3 kB | Without provenance | Details for growler-sass-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| growler_sass-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for growler_sass-0.1.0-py3-none-any.whl |
Total release size: 11.5 kB
Release files / growler-sass-0.1.0.tar.gz
| Download URL | growler-sass-0.1.0.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d74bb12a4213d5ad1c72efb69e629b5539466f367cbfcd0fa64343c672cdd5c9
|
|
BLAKE2b-256 checksum How to use checksums |
426d14e0284090fa0e9a668b3f065a1bb8e4adcf652ae59047f76f760e989db1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / growler_sass-0.1.0-py3-none-any.whl
| Download URL | growler_sass-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f74bf7c2f9f193db906e2615445054a279e58a909e9c4dd920fba99a031f26ce
|
|
BLAKE2b-256 checksum How to use checksums |
ecd0fbf69e0244d5c166a0460f9938f990851d0e93bcd662634755b5ef110010
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for growler-sass 0.1.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.