An open API service indexing awesome lists of open source software.

https://github.com/cmason3/jinjafx_server

JinjaFx Server - Jinja2 Templating Tool
https://github.com/cmason3/jinjafx_server

ansible-filter csv docker-container jinja2-template python template-engine xpath yaml

Last synced: 23 days ago
JSON representation

JinjaFx Server - Jinja2 Templating Tool

Awesome Lists containing this project

README

          

[![PyPI](https://img.shields.io/pypi/v/jinjafx-server.svg)](https://pypi.python.org/pypi/jinjafx-server/)
![Python](https://img.shields.io/badge/python-≥ 3.10-brightgreen)
[](https://jinjafx.io)

# JinjaFx Server - Jinja2 Templating Tool

JinjaFx Server is a lightweight web server that provides a Web UI to JinjaFx. It is a separate Python module which imports the "jinjafx" module to generate outputs from a web interface. Usage instructions are provided below, although it is considered an additional component and not part of the base JinjaFx tool, although it is probably a much easier way to use it. There is an AWS hosted version available at https://jinjafx.io, which is free to use and will always be running the latest development version.

### Installation

```
python3 -m venv /opt/jinjafx
/opt/jinjafx/bin/python3 -m pip install jinjafx_server
```
```
tee /etc/systemd/system/jinjafx.service >/dev/null <<-EOF
[Unit]
Description=JinjaFx Server

[Service]
Environment="VIRTUAL_ENV=/opt/jinjafx"
ExecStart=/opt/jinjafx/bin/python3 -u -m jinjafx_server -s -l 127.0.0.1 -p 8080
SyslogIdentifier=jinjafx_server
TimeoutStartSec=60
Restart=always

[Install]
WantedBy=multi-user.target
EOF
```
```
systemctl enable --now jinjafx
```

### JinjaFx Server Usage

Once JinjaFx Server has been started with the `-s` argument then point your web browser at http://localhost:8080 and you will be presented with a web page that allows you to specify "data.csv", "template.j2" and "vars.yml" and then generate outputs. If you click on "Export" then it will present you with an output that can be pasted back into any pane of JinjaFx to restore the values.

```
jinjafx_server -s [-l

] [-p ]
[-r | -s3 | -github /[:]] [-insecure]
[-rl ] [-tl