Skip to main content

Fancy Pythonic String Builder.

Project description

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

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

buildstr-0.1.1.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

buildstr-0.1.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file buildstr-0.1.1.tar.gz.

File metadata

  • Download URL: buildstr-0.1.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for buildstr-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e22d13b40d601b4fa8345604cf260cb2277d1e0bf98f9ae1f7b6ca5eaa0de29b
MD5 50d20f7f5deb3d2ae398f27e8a08dcd6
BLAKE2b-256 62857ff647c2429f58737d7508f62206fd8e1efc370f507104919010d731cb04

See more details on using hashes here.

File details

Details for the file buildstr-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: buildstr-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for buildstr-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b27b24e0e447460c1c828887fe79bb102743d2ced59882530fed6275959682da
MD5 c0c347cf211f34f20382b1fd94eaf3ef
BLAKE2b-256 b6e7fe00c6f9f32f32975cd392ed80cd72a905a8564f84406537141406780f4f

See more details on using hashes here.

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