Skip to main content

React like string builder

Project description

https://img.shields.io/github/license/mashape/apistatus.svg https://badge.fury.io/py/strinpy.svg

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
"""

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

strinpy-0.0.4.tar.gz (2.7 kB view hashes)

Uploaded Source

Supported by

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