buildzr


Namebuildzr JSON
Version 0.0.23 PyPI version JSON
download
home_pageNone
SummaryStructurizr for the `buildzr`s 🧱⚒️
upload_time2025-10-14 13:41:48
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords architecture buildzr c4model design diagram structurizr
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Structurizr for the `buildzr`s 🧱⚒️

`buildzr` is a [Structurizr](https://structurizr.com/) authoring tool for Python programmers. It allows you to declaratively or procedurally author Structurizr models and diagrams.

If you're not familiar with Structurizr, it is both an open standard (see [Structurizr JSON schema](https://github.com/structurizr/json)) and a [set of tools](https://docs.structurizr.com/usage) for building software architecture diagrams as code. Structurizr derives its architecture modeling paradigm based on the [C4 model](https://c4model.com/), the modeling language for describing software architectures and their relationships.

In Structurizr, you define architecture models and their relationships first. And then, you can re-use the models to present multiple perspectives, views, and stories about your architecture.

`buildzr` supercharges this workflow with Pythonic syntax sugar and intuitive APIs that make modeling as code more fun and productive.

## Install

```bash
pip install buildzr
```

## Quick Example

```python
from buildzr.dsl import (
    Workspace,
    SoftwareSystem,
    Person,
    Container,
    SystemContextView,
    ContainerView,
    desc,
    Group,
    StyleElements,
)

with Workspace('w') as w:

    # Define your models (architecture elements and their relationships).

    with Group("My Company") as my_company:
        u = Person('Web Application User')
        webapp = SoftwareSystem('Corporate Web App')
        with webapp:
            database = Container('database', tags={'db'})
            api = Container('api')
            api >> ("Reads and writes data from/to", "http/api") >> database
    with Group("Microsoft") as microsoft:
        email_system = SoftwareSystem('Microsoft 365')

    u >> [
        desc("Reads and writes email using") >> email_system,
        desc("Create work order using") >> webapp,
    ]
    webapp >> "sends notification using" >> email_system

    # Define the views.

    SystemContextView(
        software_system_selector=webapp,
        key='web_app_system_context_00',
        description="Web App System Context",
        auto_layout='lr',
    )

    ContainerView(
        software_system_selector=webapp,
        key='web_app_container_view_00',
        auto_layout='lr',
        description="Web App Container View",
    )

    # Stylize the views.

    StyleElements(
        on=[u],
        shape='Person',
        background='blue',
    )

    StyleElements(
        on=['db'],
        shape='Cylinder'
    )

    # Export to JSON.

    w.to_json('workspace.json')
```

![Example Software System View](./docs/images/example_system_context_view.png)
![Example Container View](./docs/images/example_container_view.png)

## Getting Started

Ready to dive in? Check out the [Quick Start Tutorial](https://buildzr.dev/getting-started/quick-start/) and [User Guides](https://buildzr.dev/user-guide/core-concepts/).

## Why use `buildzr`?

✅ **Intuitive Pythonic Syntax**: Use Python's context managers (`with` statements) to create nested structures that naturally mirror your architecture's hierarchy. See the [example](#quick-example) below.

✅ **Programmatic Creation**: Use `buildzr`'s DSL APIs to programmatically create C4 model architecture diagrams. Great for automation!

✅ **Advanced Styling**: Style elements beyond just tags --- target by direct reference, type, group membership, or custom predicates for fine-grained visual control. Just take a look at [Styles](https://buildzr.dev/user-guide/styles/)!

✅ **Type Safety**: Write Structurizr diagrams more securely with extensive type hints and [Mypy](https://mypy-lang.org) support.

✅ **Standards Compliant**: Stays true to the [Structurizr JSON schema](https://github.com/structurizr/json) standards. `buildzr` uses [datamodel-code-generator](https://github.com/koxudaxi/datamodel-code-generator) to automatically generate the low-level representation of the Workspace model.

✅ **Rich Toolchain**: Uses the familiar Python programming language and its rich toolchains to write software architecture models and diagrams!


## Project Links

- [GitHub Repository](https://github.com/amirulmenjeni/buildzr)
- [Issue Tracker](https://github.com/amirulmenjeni/buildzr/issues)
- [Roadmap](roadmap.md)
- [Contributing Guide](contributing.md)
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "buildzr",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "architecture, buildzr, c4model, design, diagram, structurizr",
    "author": null,
    "author_email": "Amirul Menjeni <amirulmenjeni@pm.me>",
    "download_url": "https://files.pythonhosted.org/packages/77/ef/ab9c061df623496222ba78f11ed3fbcf452492b5499b1fb5456d5bb8881b/buildzr-0.0.23.tar.gz",
    "platform": null,
    "description": "# Structurizr for the `buildzr`s \ud83e\uddf1\u2692\ufe0f\n\n`buildzr` is a [Structurizr](https://structurizr.com/) authoring tool for Python programmers. It allows you to declaratively or procedurally author Structurizr models and diagrams.\n\nIf you're not familiar with Structurizr, it is both an open standard (see [Structurizr JSON schema](https://github.com/structurizr/json)) and a [set of tools](https://docs.structurizr.com/usage) for building software architecture diagrams as code. Structurizr derives its architecture modeling paradigm based on the [C4 model](https://c4model.com/), the modeling language for describing software architectures and their relationships.\n\nIn Structurizr, you define architecture models and their relationships first. And then, you can re-use the models to present multiple perspectives, views, and stories about your architecture.\n\n`buildzr` supercharges this workflow with Pythonic syntax sugar and intuitive APIs that make modeling as code more fun and productive.\n\n## Install\n\n```bash\npip install buildzr\n```\n\n## Quick Example\n\n```python\nfrom buildzr.dsl import (\n    Workspace,\n    SoftwareSystem,\n    Person,\n    Container,\n    SystemContextView,\n    ContainerView,\n    desc,\n    Group,\n    StyleElements,\n)\n\nwith Workspace('w') as w:\n\n    # Define your models (architecture elements and their relationships).\n\n    with Group(\"My Company\") as my_company:\n        u = Person('Web Application User')\n        webapp = SoftwareSystem('Corporate Web App')\n        with webapp:\n            database = Container('database', tags={'db'})\n            api = Container('api')\n            api >> (\"Reads and writes data from/to\", \"http/api\") >> database\n    with Group(\"Microsoft\") as microsoft:\n        email_system = SoftwareSystem('Microsoft 365')\n\n    u >> [\n        desc(\"Reads and writes email using\") >> email_system,\n        desc(\"Create work order using\") >> webapp,\n    ]\n    webapp >> \"sends notification using\" >> email_system\n\n    # Define the views.\n\n    SystemContextView(\n        software_system_selector=webapp,\n        key='web_app_system_context_00',\n        description=\"Web App System Context\",\n        auto_layout='lr',\n    )\n\n    ContainerView(\n        software_system_selector=webapp,\n        key='web_app_container_view_00',\n        auto_layout='lr',\n        description=\"Web App Container View\",\n    )\n\n    # Stylize the views.\n\n    StyleElements(\n        on=[u],\n        shape='Person',\n        background='blue',\n    )\n\n    StyleElements(\n        on=['db'],\n        shape='Cylinder'\n    )\n\n    # Export to JSON.\n\n    w.to_json('workspace.json')\n```\n\n![Example Software System View](./docs/images/example_system_context_view.png)\n![Example Container View](./docs/images/example_container_view.png)\n\n## Getting Started\n\nReady to dive in? Check out the [Quick Start Tutorial](https://buildzr.dev/getting-started/quick-start/) and [User Guides](https://buildzr.dev/user-guide/core-concepts/).\n\n## Why use `buildzr`?\n\n\u2705 **Intuitive Pythonic Syntax**: Use Python's context managers (`with` statements) to create nested structures that naturally mirror your architecture's hierarchy. See the [example](#quick-example) below.\n\n\u2705 **Programmatic Creation**: Use `buildzr`'s DSL APIs to programmatically create C4 model architecture diagrams. Great for automation!\n\n\u2705 **Advanced Styling**: Style elements beyond just tags --- target by direct reference, type, group membership, or custom predicates for fine-grained visual control. Just take a look at [Styles](https://buildzr.dev/user-guide/styles/)!\n\n\u2705 **Type Safety**: Write Structurizr diagrams more securely with extensive type hints and [Mypy](https://mypy-lang.org) support.\n\n\u2705 **Standards Compliant**: Stays true to the [Structurizr JSON schema](https://github.com/structurizr/json) standards. `buildzr` uses [datamodel-code-generator](https://github.com/koxudaxi/datamodel-code-generator) to automatically generate the low-level representation of the Workspace model.\n\n\u2705 **Rich Toolchain**: Uses the familiar Python programming language and its rich toolchains to write software architecture models and diagrams!\n\n\n## Project Links\n\n- [GitHub Repository](https://github.com/amirulmenjeni/buildzr)\n- [Issue Tracker](https://github.com/amirulmenjeni/buildzr/issues)\n- [Roadmap](roadmap.md)\n- [Contributing Guide](contributing.md)",
    "bugtrack_url": null,
    "license": null,
    "summary": "Structurizr for the `buildzr`s \ud83e\uddf1\u2692\ufe0f",
    "version": "0.0.23",
    "project_urls": {
        "homepage": "https://github.com/amirulmenjeni/buildzr",
        "issues": "https://github.com/amirulmenjeni/buildzr/issues"
    },
    "split_keywords": [
        "architecture",
        " buildzr",
        " c4model",
        " design",
        " diagram",
        " structurizr"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "16e86eeaa425d1110936d2751b7061716613732e14e49f0acac3bf91f61330fa",
                "md5": "794608b3bb2a689e6165aa031944af1b",
                "sha256": "d023e558240c7c62573f87bbddff11751094aff38800af278a55e791a264a4fa"
            },
            "downloads": -1,
            "filename": "buildzr-0.0.23-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "794608b3bb2a689e6165aa031944af1b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 36104,
            "upload_time": "2025-10-14T13:41:46",
            "upload_time_iso_8601": "2025-10-14T13:41:46.895525Z",
            "url": "https://files.pythonhosted.org/packages/16/e8/6eeaa425d1110936d2751b7061716613732e14e49f0acac3bf91f61330fa/buildzr-0.0.23-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "77efab9c061df623496222ba78f11ed3fbcf452492b5499b1fb5456d5bb8881b",
                "md5": "ca0516855b27749a51497a3c8d70cdaa",
                "sha256": "5213b7e85d5119b1f0107d1bee0dfe702af352a1fd916c0aab03695cf660eb1c"
            },
            "downloads": -1,
            "filename": "buildzr-0.0.23.tar.gz",
            "has_sig": false,
            "md5_digest": "ca0516855b27749a51497a3c8d70cdaa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 58275,
            "upload_time": "2025-10-14T13:41:48",
            "upload_time_iso_8601": "2025-10-14T13:41:48.209550Z",
            "url": "https://files.pythonhosted.org/packages/77/ef/ab9c061df623496222ba78f11ed3fbcf452492b5499b1fb5456d5bb8881b/buildzr-0.0.23.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-14 13:41:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "amirulmenjeni",
    "github_project": "buildzr",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "buildzr"
}
        
Elapsed time: 2.00953s