Skip to main content

Piuma Python library with Django support

Project description

Latest Version codecov Build Status License: MIT

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 %}">
<img src="{% piuma_static 'img/mylogo.png' width=200 %}">

Picture tags

{% load pypiuma_tags %}

{% piuma_picture 'http://myimagehost/static/img/a.png'%}
{% piuma_picture_static 'img/a.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)

Run tests

pip install -r requirements-dev.txt
make test

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

pypiuma-1.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

pypiuma-1.0.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file pypiuma-1.0.1.tar.gz.

File metadata

  • Download URL: pypiuma-1.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/18.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.0

File hashes

Hashes for pypiuma-1.0.1.tar.gz
Algorithm Hash digest
SHA256 c7881ca65f0a7b5101fbd8f1d3ab1ded77203f9967be5ad02069a0124620c8fe
MD5 55f8ab4c414dd37a29a9f02885a7a934
BLAKE2b-256 8abe1564fa2cc9672572a173f8a331ef9ef914ca80d40d44501a1afda9ca4afc

See more details on using hashes here.

File details

Details for the file pypiuma-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pypiuma-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/18.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.0

File hashes

Hashes for pypiuma-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9e945533a65eb3a14ca81957cc07a62032fb3edca6c8ccb145b3cdb2f2e3c884
MD5 0350a21cdf697cc6680165065d73a554
BLAKE2b-256 d697a7e8f19705553d8a4437d71743304ad936e46ee59f948a3ae9ff12e6c355

See more details on using hashes here.

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