PyPiuma
A library to use Piuma with Python and Django
Install
pip install pypiuma
Usage
from pypiuma import piuma_url
piuma_url("http://mypiumahost", "http://myimagehost/static/img/a.png", 200, 200, 80)
Usage with Django
{% load pypiuma_tags %}
<img src="{% piuma 'http://myimagehost/static/img/a.png' width=200 convert_to="auto" %}">
<img src="{% piuma_static 'img/mylogo.png' width=200 %}">
Settings
PIUMA_DISABLED
Disable Piuma core, useful in development.
Default: False
PIUMA_HOST
The host of your Piuma instance.
Default: /piuma/
PIUMA_MEDIA_RULES
Media rules for picture tags.
Default: (max-width: 576px),(max-width: 768px),(max-width: 992px),(max-width: 1366px)
PIUMA_SIZES
Fast configurations for your images. These can be handy if you want to define different sizes like small, medium, full to serve the best optimized version of the image for your needs. The * size, if defined, is applied to all images imported with a tag that do not specify a size.
Default: {}
Example:
{
"*": {
"convert_to": "auto",
"quality": 80
},
"small": {
"width": 300,
"convert_to": "auto",
"quality": 80
},
"medium": {
"width": 500,
"convert_to": "auto",
"quality": 80
},
"large": {
"width": 1000,
"convert_to": "auto",
"quality": 80
}
}
Run tests
pip install -r requirements-dev.txt make test
Metadata
Release files for pypiuma 1.1.6
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 |
|---|---|---|---|---|
| pypiuma-1.1.6.tar.gz | 5.8 kB | Without provenance | Details for pypiuma-1.1.6.tar.gz |
Release files / pypiuma-1.1.6.tar.gz
| Download URL | pypiuma-1.1.6.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
737525f137eccd2ce6b9f960f1985146e0fbb65d94d431f879660afc6871eff2
|
|
BLAKE2b-256 checksum How to use checksums |
ec20bad94f25aa8d71d87216a820104063949781cc3d327221241a22ca5d8dcd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.9.5
|
Security for pypiuma 1.1.6
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.