Skip to main content

Plugin which provides XML format (data input) support for jinjanator

Project description

jinjanator-plugin-format-xml: Provides XML format (data input) support for jinjanator

This plugin allows jinjanator to parse XML data for processing in templates. The format can be selected using --format xml or autoselected by using a data file with a name ending with .xml.

Installation

pip install jinjanator-plugin-format-xml

Usage

Suppose you have an NGINX configuration file template, nginx.j2:

server {
  listen 80;
  server_name {{ nginx.hostname }};

  root {{ nginx.webroot }};
  index index.htm;
}

And you have an XML file with the data, nginx.xml:

<nginx>
  <hostname>
    localhost
  </hostname>
  <webroot>
    /var/www/project
  </webroot>
</nginx>

This is how you render it into a working configuration file:

$ jinjanate nginx.j2 nginx.xml > nginx.conf

Options

  • process-namespaces: configures the XML parser to replace namespace references in element names with the corresponding namespaces from xmlns attributes in the top-level element in the document.

Release Information

Backwards-incompatible Changes

  • Support for Python 3.9 has been removed, and support for Python 3.14 has been added. Since the minimum supported version is now 3.10, the code has been updated to use features introduced in that version.

  • Upgraded to version 25.1.0 of jinjanator-plugins.

Additions

  • Added testing against Python 3.13 (again).

→ Full Changelog

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

jinjanator_plugin_format_xml-25.1.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jinjanator_plugin_format_xml-25.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file jinjanator_plugin_format_xml-25.1.0.tar.gz.

File metadata

File hashes

Hashes for jinjanator_plugin_format_xml-25.1.0.tar.gz
Algorithm Hash digest
SHA256 18b41587963e586af8abef7f2ca3bffc3332c954fe97c5f08143c4b33edb551a
MD5 8f1e4d042c83ae5947f28a0cb4cdee42
BLAKE2b-256 ad5f9d1ff233d4dbd91e8e0c01b52b835a3853575668fcfe50a590b4f394fa08

See more details on using hashes here.

Provenance

The following attestation bundles were made for jinjanator_plugin_format_xml-25.1.0.tar.gz:

Publisher: pypi-package.yml on kpfleming/jinjanator-plugin-format-xml

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jinjanator_plugin_format_xml-25.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jinjanator_plugin_format_xml-25.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00bc7992b9be596e6e1a3fa278b584195d7ff86ef5ee2445980beda15d3fa7c2
MD5 3e9eecb0cc23a4e89b7f33243977a3a1
BLAKE2b-256 0f4789bc806f05e2240f96ed57e3309682c9b3b5d5f8c96d887c4607cba7f1f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for jinjanator_plugin_format_xml-25.1.0-py3-none-any.whl:

Publisher: pypi-package.yml on kpfleming/jinjanator-plugin-format-xml

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page