Skip to main content

string_templates

Library to create string templates in python and execute them.

Single line

render("Hello, $name", name="Tom")
# "Hello, Tom"

Multiline strings

render("""
Hello
$name
""", name="Tom")
# '\nHello\nTom\n'

# no newline at start and end
render("""\
Hello
$name\
""", name="Tom")
# 'Hello\nTom'

template classes

@template
class Test:
    name: str
    _template = """Hello, $name"""
str(Test("Tom"))
# 'Hello, Tom'

Metadata

Release files for string-templates 0.1.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 string-templates 0.1.1
File Size Uploaded Provenance Actions
string_templates-0.1.1.tar.gz 2.6 kB Without provenance Details for string_templates-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for string-templates 0.1.1
File Interpreter ABI Platform Actions
string_templates-0.1.1-py3-none-any.whl Python 3 none any Details for string_templates-0.1.1-py3-none-any.whl

Total release size: 5.2 kB

Release files / string_templates-0.1.1.tar.gz

Download URL string_templates-0.1.1.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
872fe4285c1d53770f283ee51144fd84da426e1a7d9813d2361825fb4086ed1b
BLAKE2b-256 checksum
How to use checksums
89e30951db5c2ac8c73347abe571fc787be62e582ef489b1a073d7a1629a5dd6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.5 CPython/3.9.1 Linux/5.10.16-arch1-1

Release files / string_templates-0.1.1-py3-none-any.whl

Download URL string_templates-0.1.1-py3-none-any.whl
Size 2.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
41762c0b62b61f786320e656f5780e865cd9fe1d81be7cc495a5a4a740b8d3fa
BLAKE2b-256 checksum
How to use checksums
0e7d6960dc15e666559e65b3e98f44c12a1ec0191fc7971e7ce6b3d7df830cef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.5 CPython/3.9.1 Linux/5.10.16-arch1-1

Security for string-templates 0.1.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.

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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