# Fancy Pythonic String Builder
[![image](https://img.shields.io/pypi/v/buildstr.svg)](https://pypi.python.org/pypi/buildstr)
[![image](https://img.shields.io/travis/sfermigier/buildstr.svg)](https://travis-ci.com/sfermigier/buildstr)
[![Documentation Status](https://readthedocs.org/projects/str-builder/badge/?version=latest)](https://str-builder.readthedocs.io/en/latest/?version=latest)
- Free software: Apache Software License 2.0
<!-- - Documentation: <https://str-builder.readthedocs.io>. -->
## 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
```python
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 }"
```
Raw data
{
"_id": null,
"home_page": "https://github.com/abilian/buildstr",
"name": "buildstr",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Abilian SAS",
"author_email": "sf@abilian.com",
"download_url": "https://files.pythonhosted.org/packages/62/85/7ff647c2429f58737d7508f62206fd8e1efc370f507104919010d731cb04/buildstr-0.1.1.tar.gz",
"platform": null,
"description": "# Fancy Pythonic String Builder\n\n[![image](https://img.shields.io/pypi/v/buildstr.svg)](https://pypi.python.org/pypi/buildstr)\n\n[![image](https://img.shields.io/travis/sfermigier/buildstr.svg)](https://travis-ci.com/sfermigier/buildstr)\n\n[![Documentation Status](https://readthedocs.org/projects/str-builder/badge/?version=latest)](https://str-builder.readthedocs.io/en/latest/?version=latest)\n\n- Free software: Apache Software License 2.0\n<!-- - Documentation: <https://str-builder.readthedocs.io>. -->\n\n## Features\n\n- Builds strings in a pythonic way.\n- We're using the `with` statement to build substrings.\n- Python code can be interleaved with the string building. \n\nUseful for generating code.\n\n## Example\n\n```python\n\nfrom buildstr import Builder\n\nb = Builder(\"A\")\nb << \"B\"\nwith b(surround=(\"{ \", \" }\"), separator=\"; \") as b1:\n b1 << [\"a\", \"b\", \"c\"]\n\nassert b.build() == \"A B { a; b; c }\"\n```\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Fancy Pythonic String Builder.",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/abilian/buildstr"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b6e7fe00c6f9f32f32975cd392ed80cd72a905a8564f84406537141406780f4f",
"md5": "c0c347cf211f34f20382b1fd94eaf3ef",
"sha256": "b27b24e0e447460c1c828887fe79bb102743d2ced59882530fed6275959682da"
},
"downloads": -1,
"filename": "buildstr-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c0c347cf211f34f20382b1fd94eaf3ef",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<4.0",
"size": 4062,
"upload_time": "2023-08-08T13:23:17",
"upload_time_iso_8601": "2023-08-08T13:23:17.658578Z",
"url": "https://files.pythonhosted.org/packages/b6/e7/fe00c6f9f32f32975cd392ed80cd72a905a8564f84406537141406780f4f/buildstr-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "62857ff647c2429f58737d7508f62206fd8e1efc370f507104919010d731cb04",
"md5": "50d20f7f5deb3d2ae398f27e8a08dcd6",
"sha256": "e22d13b40d601b4fa8345604cf260cb2277d1e0bf98f9ae1f7b6ca5eaa0de29b"
},
"downloads": -1,
"filename": "buildstr-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "50d20f7f5deb3d2ae398f27e8a08dcd6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<4.0",
"size": 3742,
"upload_time": "2023-08-08T13:23:18",
"upload_time_iso_8601": "2023-08-08T13:23:18.664586Z",
"url": "https://files.pythonhosted.org/packages/62/85/7ff647c2429f58737d7508f62206fd8e1efc370f507104919010d731cb04/buildstr-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-08 13:23:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "abilian",
"github_project": "buildstr",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "buildstr"
}