Skip to main content

Jinja2 Pluralize

https://badge.fury.io/py/jinja2_pluralize.png https://travis-ci.org/audreyr/jinja2_pluralize.png?branch=master

Jinja2 pluralize filters.

Features

  1. Simple pluralize filter based on inflect.py. For example, this renders as geese:

{{ 'goose'|pluralize }}
  1. Django-style pluralize filter. Works as described in the Django docs. For example, this renders as votes:

vote{{ 0|pluralize }}

Usage

To use it with Jinja2, update the filters dict on the environment like this:

from jinja2 import Environment
from jinja2_pluralize import pluralize_dj

env = Environment()
env.filters['pluralize'] = pluralize_dj
tmpl = env.from_string('vote{{ 0|pluralize }}')
assert tmpl.render() == 'votes'

History

0.2.1 (2014-07-09)

  • Remove the shebang from __init__.py (#2), thanks to @dashea.

0.2.0 (2014-07-02)

  • Package works as per the README.

0.1.0 (2014-04-25)

  • First release on PyPI.

Metadata

Release files for jinja2_pluralize 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jinja2_pluralize 0.2.1
File Size Uploaded Provenance Actions
jinja2_pluralize-0.2.1.tar.gz 12.3 kB Without provenance Details for jinja2_pluralize-0.2.1.tar.gz

Release files / jinja2_pluralize-0.2.1.tar.gz

Download URL jinja2_pluralize-0.2.1.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9a9af6f4a15b0e005dd47ca3d8162a27fba0119e00e32f9288ab3b6e7af89f5b
BLAKE2b-256 checksum
How to use checksums
58abd28f1eafff5f38fc0e73006a5546a2d9683fd8f9670d60d4c016ca3b0c49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for jinja2_pluralize 0.2.1

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.

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file No provenance

0.1.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page