Skip to main content

Triplate (Python)

A templating engine for RDF query & data languages (SPARQL, Turtle, …) with a typed --- frontmatter header, injection-safe values, loops and conditionals. Python reference implementation of the Triplate language.

from triplate import compile

template = """\
---
params {
  classes: iri[] min 1
  limit:   int optional
}
---
SELECT ?s WHERE {
{% for c in classes join "UNION" %}
  { ?s a ${c} }
{% endfor %}
}
{% if limit %}LIMIT ${limit}{% endif %}
"""

tmpl = compile(template)
sparql = tmpl.render(classes=["http://example.org/Person"], limit=10)

Every input is declared in the mandatory --- frontmatter header with its RDF type; the context is validated and each value escaped accordingly, so rendered output is injection-safe and an unprocessed template fails fast.

See triplate.dev for the full guide and specification.

Metadata

Release files for triplate 0.7.1

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

Source distribution (sdist)

Source distribution for triplate 0.7.1
File Size Uploaded Provenance Actions
triplate-0.7.1.tar.gz 21.8 kB With provenance Details for triplate-0.7.1.tar.gz

Built distribution (wheel)

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

Total release size: 43.7 kB

Release files / triplate-0.7.1.tar.gz

Download URL triplate-0.7.1.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4d41b409a0a8ce0a72080ca44174e1356521a4f94bd3e58410bbb03c08d24fff
BLAKE2b-256 checksum
How to use checksums
18ce85457de6e3e07af78732d622b931779ef601167eea89404c6e6dfcb2de59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Release files / triplate-0.7.1-py3-none-any.whl

Download URL triplate-0.7.1-py3-none-any.whl
Size 21.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ba1d3878b2a443927a695eb1c736a4d41dcb0e169e62b3a6a83fd6cf2ea5a1a
BLAKE2b-256 checksum
How to use checksums
7a4c0800305fd5aa1f6b6f861acfc11c4eaa5b1b7543a752325580312b1422ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

Security for triplate 0.7.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for triplate-0.7.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 24, 2026.

Transparency log

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