Skip to main content

pybars3_extensions

pybars3_extensions library.

This introduces #each, #case and #default for building switch/case statements.

Usage

Template:

{{#each cool.items}}
{{#switch this.type}}
{{#case '1'}}MATCH: {{this}}{{/case}}
{{#default}}NO MATCH{{/default}}
{{/switch}}
{{/each}}

Python code:

from pybars3_extensions import helpers

# ...

hbs = pybars.Compiler().compile(source=template)
print(hbs(data, helpers=helpers))

Installation

pip install pybars3_extensions

Metadata

Release files for pybars3_extensions 1.0.0

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

Source distribution (sdist)

Source distribution for pybars3_extensions 1.0.0
File Size Uploaded Provenance Actions
pybars3_extensions-1.0.0.tar.gz 1.6 kB Without provenance Details for pybars3_extensions-1.0.0.tar.gz

Release files / pybars3_extensions-1.0.0.tar.gz

Download URL pybars3_extensions-1.0.0.tar.gz
Size 1.6 kB
Tags Source
SHA-256 checksum
How to use checksums
99fa229af3fe32957d7008b3d64465d79c2ea47d735375d094cc9a32d6506657
BLAKE2b-256 checksum
How to use checksums
de53c4a5bcf5edb5ecb82fb5261b853569757dd23176a4c359128a802a1ffae4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Security for pybars3_extensions 1.0.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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file No provenance

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