pygmy
pygmy is a little app that colorizes source codez in your Python templates. Supported template engines: Django and Jinja2.
Requirements
Python 2.6+ (or Python 3.2+)
pygments 1.6+
Requirements for Django
Django 1.3+
Requirements for Jinja2
Jinja2 2.4+
Installation
Install using pip:
pip install pygmy
Installation for Django
Add pygmy to your INSTALLED_APPS:
INSTALLED_APPS = (
...,
'pygmy',
)
Usage for Django
Render the awesomeness in your template:
{% load pygmy %}
{% pygmy object.code %}
It also takes the same options as HtmlFormatter class:
{% pygmy object.code nowrap='True' linenos='table' %}
Lexers
By default pygmy tries to guess which lexer to use based on the provided code.
If you wish you can define any lexer of Pygments lexers like so:
{% pygmy object.code lexer='python' %}
Metadata
Release files for pygmy 0.2.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 |
|---|---|---|---|---|
| pygmy-0.2.0.tar.gz | 3.6 kB | Without provenance | Details for pygmy-0.2.0.tar.gz |
Release files / pygmy-0.2.0.tar.gz
| Download URL | pygmy-0.2.0.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2dc0bd308f4f8cd970423834417d64a3bb1e77c9ca5c6dce4315756a74a5d18b
|
|
BLAKE2b-256 checksum How to use checksums |
bc7ee742d16b69436f0d1e0d1a54ba36b355e4e8b71293eded4ebdd29a27d5e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pygmy 0.2.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.