Metadata-Version: 2.1
Name: string-templates
Version: 0.1.1
Summary: simple string template library
Home-page: https://github.com/JulianSobott/string_templates
Keywords: template
Author: JulianSobott
Author-email: julian.sobott@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Project-URL: Repository, https://github.com/JulianSobott/string_templates
Description-Content-Type: text/markdown

# string_templates

Library to create string templates in python and execute them.

## Single line

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

## Multiline strings

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

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

## template classes

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

