strinpy

React like string builder


Keywords
string
License
MIT
Install
pip install strinpy==0.0.4

Documentation

React like string builder

Usage

import strinpy

condition = True
output = strinpy.build([
    'text',
    condition and 'condition text',
    condition and ['condition text list'],
    condition and (lambda: 'supplier text'),
    [
        'text list',
        [
            'in text list'
        ]
    ]
])
print(output)
"""
text
condition text
condition text list
supplier text
text list
in text list
"""