Skip to main content

Tiny Render

This is a very simple wrapper for Jinja2 by providing few built-in variables.

Variables,

  • {{ _gitsha }} - will be the shortsha for git hash, the value will be None if git is not installed or the current directory is not a git repo.
  • {{ 'HOME' | getenv }} - the environment variable HOME will be renderred. It will raise exception if HOME is not set
  • {{ _date_str }} - the current date in yyyymmdd format
  • {{ _time_str }} - the current date/time in yyyymmddHHMMSS format

Installation

pip install tiny-render

Sample Code

from tiny_render import Render

with open(os.path.join("/tmp","test.txt"), 'w') as f:
    f.write("gitsha: {{_gitsha}}, hello {{key}}")

params = {"key": "world"}

r = Render("/tmp")

r.go("test.txt", **params)

# the output is "gitsha: xxxxxxx, hello world"

Metadata

Release files for tiny-render 0.1.3

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

Source distribution (sdist)

Source distribution for tiny-render 0.1.3
File Size Uploaded Provenance Actions
tiny-render-0.1.3.tar.gz 2.6 kB Without provenance Details for tiny-render-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tiny-render 0.1.3
File Interpreter ABI Platform Actions
tiny_render-0.1.3-py3-none-any.whl Python 3 none any Details for tiny_render-0.1.3-py3-none-any.whl

Total release size: 5.4 kB

Release files / tiny-render-0.1.3.tar.gz

Download URL tiny-render-0.1.3.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
56432be1d50f89f14cfbdaab776a0dfd9ed692e4bd770c98fd9ec0f53634f055
BLAKE2b-256 checksum
How to use checksums
f551ccdbe17a3002c12ced4263da8e36ab7342840fb84fb6e79be71dc84ba3cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.6 Darwin/20.2.0

Release files / tiny_render-0.1.3-py3-none-any.whl

Download URL tiny_render-0.1.3-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e93e77b96d3a1fc87e088d2fac75082b406dfcdc514b9790fd775c69d771334f
BLAKE2b-256 checksum
How to use checksums
f38e8a19ee01f9af38dcdcbd1d5e0ed6fab9608a6b9b7032e75c64d9cc2efb07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.6 Darwin/20.2.0

Security for tiny-render 0.1.3

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.

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