Metadata-Version: 2.4
Name: writer
Version: 1.19.1
Summary: An open-source, Python framework for building feature-rich apps that are fully integrated with the Writer platform.
License-File: LICENSE.txt
Keywords: data apps,gui,ui,framework,writer framework
Author: Writer, Inc.
Requires-Python: >=3.9.2,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.9
Provides-Extra: redis
Requires-Dist: authlib (>=1.3.0,<1.7)
Requires-Dist: click (>=8.1.7,<9.0.0)
Requires-Dist: fastapi (>=0.89.1,<1)
Requires-Dist: gitignore-parser (>=0.1.11,<0.2.0)
Requires-Dist: jinja2 (>=3.1.4,<4.0.0)
Requires-Dist: numpy (<=2.0.2) ; python_version < "3.10"
Requires-Dist: numpy (>=2.0,<3.0) ; python_version >= "3.10"
Requires-Dist: orjson (>=3.11.0,<4.0.0)
Requires-Dist: pandas (>=2.2.0,<3)
Requires-Dist: plotly (>=5.24.1,<6.0.0)
Requires-Dist: pyarrow (>=15.0.0,<19.0.0)
Requires-Dist: pydantic (>=2.6.0,<3)
Requires-Dist: python-dateutil (>=2.9.0.post0,<3.0.0)
Requires-Dist: python-multipart (>=0.0.7,<1)
Requires-Dist: pytz (>=2024.1,<2025.0)
Requires-Dist: requests (>=2.31.0,<2.33)
Requires-Dist: uvicorn (>=0.20.0,<1)
Requires-Dist: watchdog (>=3.0.0,<4)
Requires-Dist: websockets (>=12,<16)
Requires-Dist: writer-sdk (>=2.3.1,<3)
Project-URL: Documentation, https://dev.writer.com/framework
Project-URL: Homepage, https://www.writer.com
Project-URL: Repository, https://github.com/writer/writer-framework
Description-Content-Type: text/markdown

## 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, 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.

