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.2.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

pypiuma-1.0.2-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pypiuma-1.0.2.tar.gz
  • Upload date:
  • Size: 3.3 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.2.tar.gz
Algorithm Hash digest
SHA256 1732c88e7c60ccd66647a5c7200e0e7727e2f36eac92fb774178a7e3f1f4f641
MD5 8ad3a7863e69179d981eb95b39774032
BLAKE2b-256 fbfc24f8395816999867188c8b8b062ee1547b65cb36426a86134c43a6f226c0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pypiuma-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2e0d5ed769aa1a38620f83ce8e3a1e503476384f0c284ad9e32b4d6c0bf525af
MD5 8659dec35bab863f272d68a145aa8b81
BLAKE2b-256 f9d1e56113c2ac335cd3cd894ccac8da5912882bfcbe7afe77e48e45aeee4993

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