Skip to content

Tiny jinja2 extension to add b64encode and b64decode filters.

License

Notifications You must be signed in to change notification settings

lumapps/jinja2_base64_filters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jinja2_base64_filters

Latest PyPI version

Tiny jinja2 extension to add b64encode and b64decode filters.

Usage

from jinja2_base64_filters import jinja2_base64_filters
from jinja2 import Environment

env = Environment(extensions=["jinja2_base64_filters.Base64Filters"])

# "my_string" -> "bXlfc3RyaW5n"
env.from_string("{{teststring|b64encode}}").render(teststring="my_string")

# "bXlfc3RyaW5n" -> "my_string"
env.from_string("{{teststring|b64decode}}").render(teststring="bXlfc3RyaW5n")

Installation

jinja2_base64_filters is available for download from PyPI via pip:

$ pip install jinja2-base64-filters

It will automatically install jinja2

Requirements

Compatibility

Licence

  • Free software: MIT license

Authors

jinja2_base64_filters was written by Timothée GERMAIN.

This package was created with Cookiecutter and the kragniz/cookiecutter-pypackage-minimal project template.

About

Tiny jinja2 extension to add b64encode and b64decode filters.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published