Skip to main content

pyrender

jinja2を使った簡単なテンプレートレンダー パッケージングの練習に利用

$ renderj2 --help
Usage: renderj2 [OPTIONS] TEMPLATE_FILE

  Rendre Jinja2 tempalte

Options:
  -v, --varsfile PATH  vars file path for jinja2
  -o, --output PATH    output file
  --loglevel LVL       Either CRITICAL, ERROR, WARNING, INFO or DEBUG
                       [default: INFO]
  -h, --help           Show this message and exit.
  -V, --version        Show the version and exit.

使い方

# renderj2 --vars vars.yml template.j2

上記のように実行すると、Jinja2の形式で書かれたtempalte.j2を vars.ymlの変数を用いてレンダリングします。

レンダリング結果はデフォルトで標準出力に出力されます。 --output オプションを指定することで指定のファイルに出力することも可能です。

Jinja2公式ドキュメント

開発

Require

  • python3
  • Poetry

テスト

$ poetry poe test

ビルド

$ poetry build

Metadata

Release files for renderj2 1.2.2

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

Source distribution (sdist)

Source distribution for renderj2 1.2.2
File Size Uploaded Provenance Actions
renderj2-1.2.2.tar.gz 3.5 kB Without provenance Details for renderj2-1.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for renderj2 1.2.2
File Interpreter ABI Platform Actions
renderj2-1.2.2-py3-none-any.whl Python 3 none any Details for renderj2-1.2.2-py3-none-any.whl

Total release size: 7.4 kB

Release files / renderj2-1.2.2.tar.gz

Download URL renderj2-1.2.2.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a83d9d5dc647798c1b41db5245194c4d9157ed385bc55efc77819cf75a2b100b
BLAKE2b-256 checksum
How to use checksums
627825e6de379799138087405e0a50dba934fe81bf28dff1cc5541e38827c34e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / renderj2-1.2.2-py3-none-any.whl

Download URL renderj2-1.2.2-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9939ba41725d8595a54586bef4b67d2835d36376a802dfce1e684e4deb1c1a5a
BLAKE2b-256 checksum
How to use checksums
6f8276b730af972f15c92adc99f09f157f036b53e818869f514ce003e28607a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.6

Security for renderj2 1.2.2

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