Tiny jinja2 extension to add b64encode and b64decode filters.
Project description
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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jinja2_base64_filters-0.1.4.tar.gz.
File metadata
- Download URL: jinja2_base64_filters-0.1.4.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5f5d3e0476c4918ab3266093e8757918aed7cc47dab12338f9bda048cdbacd9
|
|
| MD5 |
cf217b083b26d96f492fe007aad4fef8
|
|
| BLAKE2b-256 |
848547bb9c15bd36d7ff752e887203d8db7c79459369a2d28384d9febcd5373c
|
File details
Details for the file jinja2_base64_filters-0.1.4-py2-none-any.whl.
File metadata
- Download URL: jinja2_base64_filters-0.1.4-py2-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d007d543a9ce1e66a7a65645eef9100bc21a5d060a60b193fa4d4c4239bb3a86
|
|
| MD5 |
f15ed391aadb1d83de3a9bceed979fa1
|
|
| BLAKE2b-256 |
fccf2f75c88e204c83cbf96efa8780cd66fb8ba4169889f9502b8f0536fd5ddc
|