## What is Framework?
Writer Framework is an open-source framework for creating AI applications. Build user interfaces using a visual editor; write the backend code in Python.
Writer Framework is fast and flexible with a clean, easily-testable syntax. It provides separation of concerns between UI and business logic, enabling more complex applications.
## Highlights
### Reactive and state-driven
Writer Framework is **fully state-driven** and provides **separation of concerns** between user interface and business logic.
```py
import writer as wf
def handle_increment(state):
state["counter"] += 1
wf.init_state({
"counter": 0
})
```
The user interface is a template, which is defined visually. The template contains reactive references to state, e.g. `@{counter}`, and references to event handlers, e.g. when _Button_ is clicked, trigger `handle_increment`.
### Flexible
- Elements are highly customizable with no CSS required, allowing for shadows, button icons, background colors, etc.
- HTML elements with custom CSS can be included using the _HTML Element_ component. They can serve as containers for built-in components.
### Fast
- Event handling adds minimal overhead to your Python code (~1-2ms\*).
- Streaming (WebSockets) is used to synchronize frontend and backend states.
- The script only runs once.
- Non-blocking by default. Events are handled asynchronously in a thread pool running in a dedicated process.
\*End-to-end figure, including DOM mutation. Tested locally on a Macbook Air M2. [Measurement methodology](https://medium.com/@ramiromedina/measuring-time-elapsed-between-an-event-and-its-associated-dom-mutation-80431ad576e1).
### Developer-friendly
- It's all contained in a standard Python package, just one `pip install` away.
- User interfaces are saved as JSON, so they can be version controlled together with the rest of the application.
- Use your local code editor and get instant refreshes when you save your code. Alternatively, use the provided web-based editor.
- You edit the UI while your app is running. No hitting "Preview" and seeing something completely different to what you expected.
## Installation and Quickstart
Getting started with Writer Framework is easy. It works on Linux, Mac and Windows.
```sh
pip install writer
writer hello
```
- The first command will install Writer Framework using `pip`.
- The second command will create a demo application in the subfolder "hello" and start Writer Framework Builder, the framework's visual editor, which will be accessible via a local URL.
The following commands can be used to create, launch Writer Framework Builder and run an application.
```sh
writer create my_app
writer edit my_app
writer run my_app
```
## Documentation
Full documentation, including how to use Writer's AI module and deployment options, is available at [Writer](https://dev.writer.com/framework?utm_source=github&utm_medium=readme&utm_campaign=framework).
## About Writer
Writer is the full-stack generative AI platform for enterprises. Quickly and easily build and deploy generative AI apps with a suite of developer tools fully integrated with our platform of LLMs, graph-based RAG tools, AI guardrails, and more. Learn more at [writer.com](https://www.writer.com?utm_source=github&utm_medium=readme&utm_campaign=framework).
## License
This project is licensed under the Apache 2.0 License.
Raw data
{
"_id": null,
"home_page": "https://www.writer.com",
"name": "writer",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9.2",
"maintainer_email": null,
"keywords": "data apps, gui, ui, framework, writer framework",
"author": "Writer, Inc.",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/b6/39/d61011764d072efd9c3abd0a711cf4a72b1ac3cddc5665297eb70eae1419/writer-0.8.2.tar.gz",
"platform": null,
"description": "## What is Framework?\n\nWriter Framework is an open-source framework for creating AI applications. Build user interfaces using a visual editor; write the backend code in Python.\n\nWriter Framework is fast and flexible with a clean, easily-testable syntax. It provides separation of concerns between UI and business logic, enabling more complex applications.\n\n## Highlights\n\n### Reactive and state-driven\n\nWriter Framework is **fully state-driven** and provides **separation of concerns** between user interface and business logic.\n\n```py\nimport writer as wf\n\ndef handle_increment(state):\n state[\"counter\"] += 1\n\nwf.init_state({\n \"counter\": 0\n})\n```\n\nThe user interface is a template, which is defined visually. The template contains reactive references to state, e.g. `@{counter}`, and references to event handlers, e.g. when _Button_ is clicked, trigger `handle_increment`.\n\n### Flexible\n\n- Elements are highly customizable with no CSS required, allowing for shadows, button icons, background colors, etc.\n- HTML elements with custom CSS can be included using the _HTML Element_ component. They can serve as containers for built-in components.\n\n### Fast\n\n- Event handling adds minimal overhead to your Python code (~1-2ms\\*).\n- Streaming (WebSockets) is used to synchronize frontend and backend states.\n- The script only runs once.\n- Non-blocking by default. Events are handled asynchronously in a thread pool running in a dedicated process.\n\n\\*End-to-end figure, including DOM mutation. Tested locally on a Macbook Air M2. [Measurement methodology](https://medium.com/@ramiromedina/measuring-time-elapsed-between-an-event-and-its-associated-dom-mutation-80431ad576e1).\n\n### Developer-friendly\n\n- It's all contained in a standard Python package, just one `pip install` away.\n- User interfaces are saved as JSON, so they can be version controlled together with the rest of the application.\n- Use your local code editor and get instant refreshes when you save your code. Alternatively, use the provided web-based editor.\n- You edit the UI while your app is running. No hitting \"Preview\" and seeing something completely different to what you expected.\n\n## Installation and Quickstart\n\nGetting started with Writer Framework is easy. It works on Linux, Mac and Windows.\n\n```sh\npip install writer\nwriter hello\n```\n\n- The first command will install Writer Framework using `pip`.\n- The second command will create a demo application in the subfolder \"hello\" and start Writer Framework Builder, the framework's visual editor, which will be accessible via a local URL.\n\nThe following commands can be used to create, launch Writer Framework Builder and run an application.\n\n```sh\nwriter create my_app\nwriter edit my_app\nwriter run my_app\n```\n\n## Documentation\n\nFull documentation, including how to use Writer's AI module and deployment options, is available at [Writer](https://dev.writer.com/framework?utm_source=github&utm_medium=readme&utm_campaign=framework).\n\n## About Writer\n\nWriter is the full-stack generative AI platform for enterprises. Quickly and easily build and deploy generative AI apps with a suite of developer tools fully integrated with our platform of LLMs, graph-based RAG tools, AI guardrails, and more. Learn more at [writer.com](https://www.writer.com?utm_source=github&utm_medium=readme&utm_campaign=framework).\n\n## License\n\nThis project is licensed under the Apache 2.0 License.\n",
"bugtrack_url": null,
"license": null,
"summary": "An open-source, Python framework for building feature-rich apps that are fully integrated with the Writer platform.",
"version": "0.8.2",
"project_urls": {
"Documentation": "https://dev.writer.com/framework",
"Homepage": "https://www.writer.com",
"Repository": "https://www.github.com/streamsync-cloud/streamsync"
},
"split_keywords": [
"data apps",
" gui",
" ui",
" framework",
" writer framework"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "471e0028ecf3a957f9955afb3ec677720ac73f3eca998a95581ddf3360f01c05",
"md5": "cae1622b71acfbe8137feedca28a7972",
"sha256": "42d2972b258759e83f2c5d7a819fc24ef1f37397b2cca6f924f772a01d5b65f1"
},
"downloads": -1,
"filename": "writer-0.8.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cae1622b71acfbe8137feedca28a7972",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9.2",
"size": 7380639,
"upload_time": "2024-12-02T21:55:47",
"upload_time_iso_8601": "2024-12-02T21:55:47.060553Z",
"url": "https://files.pythonhosted.org/packages/47/1e/0028ecf3a957f9955afb3ec677720ac73f3eca998a95581ddf3360f01c05/writer-0.8.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b639d61011764d072efd9c3abd0a711cf4a72b1ac3cddc5665297eb70eae1419",
"md5": "82e5e0d56c2651e2b91ed8c4322be383",
"sha256": "c4f1a4284335d46cb65ad907f1462fa29da394cb32c6b083b12c30acaec80160"
},
"downloads": -1,
"filename": "writer-0.8.2.tar.gz",
"has_sig": false,
"md5_digest": "82e5e0d56c2651e2b91ed8c4322be383",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9.2",
"size": 7227287,
"upload_time": "2024-12-02T21:55:49",
"upload_time_iso_8601": "2024-12-02T21:55:49.713031Z",
"url": "https://files.pythonhosted.org/packages/b6/39/d61011764d072efd9c3abd0a711cf4a72b1ac3cddc5665297eb70eae1419/writer-0.8.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-02 21:55:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "streamsync-cloud",
"github_project": "streamsync",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "writer"
}