Skip to main content

Fancy Pythonic String Builder

image

image

Documentation Status

  • Free software: Apache Software License 2.0

Features

  • Builds strings in a pythonic way.
  • We're using the with statement to build substrings.
  • Python code can be interleaved with the string building.

Useful for generating code.

Example

from buildstr import Builder

b = Builder("A")
b << "B"
with b(surround=("{ ", " }"), separator="; ") as b1:
    b1 << ["a", "b", "c"]

assert b.build() == "A B { a; b; c }"

Metadata

Release files for buildstr 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 buildstr 0.1.1
File Size Uploaded
buildstr-0.1.1.tar.gz 3.7 kB Details

Built distribution (wheel)

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

Total release size: 7.8 kB

Release files / buildstr-0.1.1.tar.gz

Download URL buildstr-0.1.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e22d13b40d601b4fa8345604cf260cb2277d1e0bf98f9ae1f7b6ca5eaa0de29b
BLAKE2b-256 checksum
How to use checksums
62857ff647c2429f58737d7508f62206fd8e1efc370f507104919010d731cb04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

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

Download URL buildstr-0.1.1-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b27b24e0e447460c1c828887fe79bb102743d2ced59882530fed6275959682da
BLAKE2b-256 checksum
How to use checksums
b6e7fe00c6f9f32f32975cd392ed80cd72a905a8564f84406537141406780f4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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