# Viewflow
**The low-code for developers with yesterday's deadline**
[![build]][build] [![coverage]][coverage] [![pypi-version]][pypi] [![py-versions]][pypi]
Viewflow is a low-code, reusable component library for creating comprehensive business applications with ease. Built on top of Django, Viewflow simplifies development by providing pre-built components for user management, workflows, and reporting, while still offering flexibility to customize and integrate with existing systems.
With Viewflow, you can create full-featured business applications in just a few lines of code using its reusable component library. It's shipped as a single package with batteries included, and each part of Viewflow can be used independently of the others, but they all work well together.
GPT assisted with Viewflow documentation: [Viewflow Pair Programming Buddy][gpt]
Viewflow comes in two flavors:
- **Viewflow Core:** A lightweight, open-source library with only non-opinionated core classes that allows you to build your custom solution on top.
- **Viewflow PRO:** A comprehensive package that includes reference functionality implementation and integrated with third-party Django packages. This package has a commercial-friendly license that allows private forks and modifications of Viewflow.
<img src="assets/ShipmentProcess.png" alt="drawing" width="600"/>
## Features
- Modern, responsive user interface with an SPA-style look and feel
- Reusable workflow library for quick implementation of BPMN workflows
- Built-in customizable CRUD for managing complex forms and data
- Integrated reporting dashboard
- Small and concise API
## Installation
Viewflow works with Python 3.8 or greater and Django 4.0+
Viewflow:
pip install django-viewflow
Viewflow-PRO:
pip install django-viewflow-pro --extra-index-url https://pypi.viewflow.io/<licence_id>/simple/
Add 'viewflow' and, in case you need workflow capabilities 'viewflow.workflow' to the INSTALLED_APPS settings.py
```python
INSTALLED_APPS = [
....
'viewflow',
'viewflow.workflow',
]
```
## Quick start
Here's an example of how to create a simple pizza ordering workflow using Viewflow:
1. Create a model to store process data
Before creating the workflow, you'll need to define a model to store the process
data. Viewflow provides a Process model as the base model for your process
instances. You can add your own fields to the model using jsonstore fields to
avoid model inheritance and additional joins:
```python
from viewflow import jsonstore
from viewflow.workflow.models import Process
class PizzaOrder(Process):
customer_name = jsonstore.CharField(max_length=250)
address = jsonstore.TextField()
toppings = jsonstore.TextField()
tips_received = jsonstore.IntegerField(default=0)
baking_time = jsonstore.IntegerField(default=10)
class Meta:
proxy = True
```
2. Create a new flow definition file flows.py
Next, create a new flow definition file *flows.py* and define your workflow. In
this example, we'll create a PizzaFlow class that inherits from flow.Flow.
We'll define three steps in the workflow: start, bake, and deliver. We'll
use CreateProcessView and UpdateProcessView to create and update the process
data from PizzaOrder:
```python
from viewflow import this
from viewflow.workflow import flow
from viewflow.workflow.flow.views import CreateProcessView, UpdateProcessView
from .models import PizzaOrder
class PizzaFlow(flow.Flow):
process_class = PizzaOrder
start = flow.Start(
CreateProcessView.as_view(
fields=["customer_name", "address", "toppings"]
)
).Next(this.bake)
bake = flow.View(
UpdateProcessView.as_view(fields=["baking_time"])
).Next(this.deliver)
deliver = flow.View(
UpdateProcessView.as_view(fields=["tips_received"])
).Next(this.end)
end = flow.End()
```
3. Add the flow to your URL configuration:
Finally, add the PizzaFlow to your URL configuration. You can use the Site and
FlowAppViewset classes to register your workflow with the pre-built frontend.
```python
from django.urls import path
from viewflow.contrib.auth import AuthViewset
from viewflow.urls import Application, Site
from viewflow.workflow.flow import FlowAppViewset
from my_pizza.flows import PizzaFlow
site = Site(
title="Pizza Flow Demo",
viewsets=[
FlowAppViewset(PizzaFlow, icon="local_pizza"),
]
)
urlpatterns = [
path("accounts/", AuthViewset().urls),
path("", site.urls),
]
```
4. Make and run migrations and access the workflow through the pre-built frontend.
Make and run migrations to create the necessary database tables, then start your Django
server and access the workflow through the pre-built frontend. You should be
able to create and track pizza orders with the workflow.
Go to the https://docs.viewflow.io/workflow/writing.html for the next steps
## Documentation
Viewflow's documentation for the latest version is available at
http://docs.viewflow.io/
Documentarian for Viewflow 1.xx series available at http://v1-docs.viewflow.io
## Demo
http://demo.viewflow.io/
## Cookbook
For sample applications and code snippets, check out the Viewflow PRO cookbook at
https://github.com/viewflow/cookbook
## License
Viewflow is an Open Source project licensed under the terms of the AGPL license - [The GNU Affero General Public License v3.0](http://www.gnu.org/licenses/agpl-3.0.html) with the Additional Permissions
described in [LICENSE_EXCEPTION](./LICENSE_EXCEPTION)
The AGPL license with Additional Permissions is a free software license that
allows commercial use and distribution of the software. It is similar to the GNU
GCC Runtime Library license, and it includes additional permissions that make it
more friendly for commercial development.
You can read more about AGPL and its compatibility with commercial use at the
[AGPL FAQ](http://www.affero.org/oagf.html)
If you use Linux already, this package license likely won't bring anything new to your stack.
Viewflow PRO has a commercial-friendly license allowing private forks and
modifications of Viewflow. You can find the commercial license terms in
[COMM-LICENSE](./COMM-LICENSE).
## Changelog
# 2.2.12 2025-07-25
- Allow to extend and override process_data template
## 2.2.11 2025-05-14
- Return .Avaialble(..) for the start node
[build]: https://img.shields.io/github/actions/workflow/status/viewflow/viewflow/django.yml?branch=main
[coverage]: https://img.shields.io/coveralls/github/viewflow/viewflow/v2
[travis-svg]: https://travis-ci.org/viewflow/viewflow.svg
[travis]: https://travis-ci.org/viewflow/viewflow
[pypi]: https://pypi.org/project/django-viewflow/
[pypi-version]: https://img.shields.io/pypi/v/django-viewflow.svg
[py-versions]: https://img.shields.io/pypi/pyversions/django-viewflow.svg
[requirements-svg]: https://requires.io/github/viewflow/viewflow/requirements.svg?branch=v2
[requirements]: https://requires.io/github/viewflow/viewflow/requirements/?branch=v2
[gpt]: https://chatgpt.com/g/g-8UHAnOpE3-viewflow-pair-programming
Raw data
{
"_id": null,
"home_page": null,
"name": "django-viewflow",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "django, admin, workflow, fsm, bpm, bpmn",
"author": "Mikhail Podgurskiy",
"author_email": "kmmbvnr@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/f9/d3/cbcd9abc276f9fc2666757a8dee7d363edc301c374a957420e874718977a/django_viewflow-2.2.12.tar.gz",
"platform": null,
"description": "# Viewflow\n\n**The low-code for developers with yesterday's deadline**\n\n[![build]][build] [![coverage]][coverage] [![pypi-version]][pypi] [![py-versions]][pypi]\n\n\nViewflow is a low-code, reusable component library for creating comprehensive business applications with ease. Built on top of Django, Viewflow simplifies development by providing pre-built components for user management, workflows, and reporting, while still offering flexibility to customize and integrate with existing systems.\n\nWith Viewflow, you can create full-featured business applications in just a few lines of code using its reusable component library. It's shipped as a single package with batteries included, and each part of Viewflow can be used independently of the others, but they all work well together.\n\nGPT assisted with Viewflow documentation: [Viewflow Pair Programming Buddy][gpt]\n\n\nViewflow comes in two flavors:\n- **Viewflow Core:** A lightweight, open-source library with only non-opinionated core classes that allows you to build your custom solution on top.\n- **Viewflow PRO:** A comprehensive package that includes reference functionality implementation and integrated with third-party Django packages. This package has a commercial-friendly license that allows private forks and modifications of Viewflow.\n\n<img src=\"assets/ShipmentProcess.png\" alt=\"drawing\" width=\"600\"/>\n\n## Features\n\n- Modern, responsive user interface with an SPA-style look and feel\n- Reusable workflow library for quick implementation of BPMN workflows\n- Built-in customizable CRUD for managing complex forms and data\n- Integrated reporting dashboard\n- Small and concise API\n\n\n## Installation\n\nViewflow works with Python 3.8 or greater and Django 4.0+\n\nViewflow:\n\n pip install django-viewflow\n\nViewflow-PRO:\n\n pip install django-viewflow-pro --extra-index-url https://pypi.viewflow.io/<licence_id>/simple/\n\nAdd 'viewflow' and, in case you need workflow capabilities 'viewflow.workflow' to the INSTALLED_APPS settings.py\n\n```python\n INSTALLED_APPS = [\n ....\n 'viewflow',\n 'viewflow.workflow',\n ]\n```\n\n\n## Quick start\n\nHere's an example of how to create a simple pizza ordering workflow using Viewflow:\n\n1. Create a model to store process data\n\nBefore creating the workflow, you'll need to define a model to store the process\ndata. Viewflow provides a Process model as the base model for your process\ninstances. You can add your own fields to the model using jsonstore fields to\navoid model inheritance and additional joins:\n\n```python\n\n from viewflow import jsonstore\n from viewflow.workflow.models import Process\n\n class PizzaOrder(Process):\n customer_name = jsonstore.CharField(max_length=250)\n address = jsonstore.TextField()\n toppings = jsonstore.TextField()\n tips_received = jsonstore.IntegerField(default=0)\n baking_time = jsonstore.IntegerField(default=10)\n\n class Meta:\n proxy = True\n```\n\n2. Create a new flow definition file flows.py\n\nNext, create a new flow definition file *flows.py* and define your workflow. In\nthis example, we'll create a PizzaFlow class that inherits from flow.Flow.\nWe'll define three steps in the workflow: start, bake, and deliver. We'll\nuse CreateProcessView and UpdateProcessView to create and update the process\ndata from PizzaOrder:\n\n```python\n\n from viewflow import this\n from viewflow.workflow import flow\n from viewflow.workflow.flow.views import CreateProcessView, UpdateProcessView\n from .models import PizzaOrder\n\n class PizzaFlow(flow.Flow):\n process_class = PizzaOrder\n\n start = flow.Start(\n CreateProcessView.as_view(\n fields=[\"customer_name\", \"address\", \"toppings\"]\n )\n ).Next(this.bake)\n\n bake = flow.View(\n UpdateProcessView.as_view(fields=[\"baking_time\"])\n ).Next(this.deliver)\n\n deliver = flow.View(\n UpdateProcessView.as_view(fields=[\"tips_received\"])\n ).Next(this.end)\n\n end = flow.End()\n```\n\n3. Add the flow to your URL configuration:\n\nFinally, add the PizzaFlow to your URL configuration. You can use the Site and\nFlowAppViewset classes to register your workflow with the pre-built frontend.\n\n```python\n\n from django.urls import path\n from viewflow.contrib.auth import AuthViewset\n from viewflow.urls import Application, Site\n from viewflow.workflow.flow import FlowAppViewset\n from my_pizza.flows import PizzaFlow\n\n site = Site(\n title=\"Pizza Flow Demo\",\n viewsets=[\n FlowAppViewset(PizzaFlow, icon=\"local_pizza\"),\n ]\n )\n\n urlpatterns = [\n path(\"accounts/\", AuthViewset().urls),\n path(\"\", site.urls),\n ]\n\n```\n\n4. Make and run migrations and access the workflow through the pre-built frontend.\n\nMake and run migrations to create the necessary database tables, then start your Django\nserver and access the workflow through the pre-built frontend. You should be\nable to create and track pizza orders with the workflow.\n\nGo to the https://docs.viewflow.io/workflow/writing.html for the next steps\n\n## Documentation\n\nViewflow's documentation for the latest version is available at\nhttp://docs.viewflow.io/\n\nDocumentarian for Viewflow 1.xx series available at http://v1-docs.viewflow.io\n\n\n## Demo\n\nhttp://demo.viewflow.io/\n\n## Cookbook\n\nFor sample applications and code snippets, check out the Viewflow PRO cookbook at\n\nhttps://github.com/viewflow/cookbook\n\n\n## License\n\nViewflow is an Open Source project licensed under the terms of the AGPL license - [The GNU Affero General Public License v3.0](http://www.gnu.org/licenses/agpl-3.0.html) with the Additional Permissions\ndescribed in [LICENSE_EXCEPTION](./LICENSE_EXCEPTION)\n\nThe AGPL license with Additional Permissions is a free software license that\nallows commercial use and distribution of the software. It is similar to the GNU\nGCC Runtime Library license, and it includes additional permissions that make it\nmore friendly for commercial development.\n\nYou can read more about AGPL and its compatibility with commercial use at the\n[AGPL FAQ](http://www.affero.org/oagf.html)\n\nIf you use Linux already, this package license likely won't bring anything new to your stack.\n\nViewflow PRO has a commercial-friendly license allowing private forks and\nmodifications of Viewflow. You can find the commercial license terms in\n[COMM-LICENSE](./COMM-LICENSE).\n\n## Changelog\n\n# 2.2.12 2025-07-25\n\n- Allow to extend and override process_data template\n\n## 2.2.11 2025-05-14\n\n- Return .Avaialble(..) for the start node\n\n\n\n[build]: https://img.shields.io/github/actions/workflow/status/viewflow/viewflow/django.yml?branch=main\n[coverage]: https://img.shields.io/coveralls/github/viewflow/viewflow/v2\n[travis-svg]: https://travis-ci.org/viewflow/viewflow.svg\n[travis]: https://travis-ci.org/viewflow/viewflow\n[pypi]: https://pypi.org/project/django-viewflow/\n[pypi-version]: https://img.shields.io/pypi/v/django-viewflow.svg\n[py-versions]: https://img.shields.io/pypi/pyversions/django-viewflow.svg\n[requirements-svg]: https://requires.io/github/viewflow/viewflow/requirements.svg?branch=v2\n[requirements]: https://requires.io/github/viewflow/viewflow/requirements/?branch=v2\n[gpt]: https://chatgpt.com/g/g-8UHAnOpE3-viewflow-pair-programming\n",
"bugtrack_url": null,
"license": "AGPL",
"summary": "Reusable library to build business applications fast",
"version": "2.2.12",
"project_urls": null,
"split_keywords": [
"django",
" admin",
" workflow",
" fsm",
" bpm",
" bpmn"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f833399325ca74077909c64fdefc005e5e925dc7a59b3341eeab526b1efba28c",
"md5": "58fcac06a2594ca2105a69963698970a",
"sha256": "24a1bb8109b68b44498852a88884748dd94e694ce5e45ea5317d68a1ba1f8730"
},
"downloads": -1,
"filename": "django_viewflow-2.2.12-py3-none-any.whl",
"has_sig": false,
"md5_digest": "58fcac06a2594ca2105a69963698970a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 15616435,
"upload_time": "2025-07-25T06:00:02",
"upload_time_iso_8601": "2025-07-25T06:00:02.850160Z",
"url": "https://files.pythonhosted.org/packages/f8/33/399325ca74077909c64fdefc005e5e925dc7a59b3341eeab526b1efba28c/django_viewflow-2.2.12-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f9d3cbcd9abc276f9fc2666757a8dee7d363edc301c374a957420e874718977a",
"md5": "64ea11b80b7e38e03cd11a3946296e4b",
"sha256": "5d37fab5aeee567efc9c5944f2be8019a0d4159e40499110eba09071e5c501cf"
},
"downloads": -1,
"filename": "django_viewflow-2.2.12.tar.gz",
"has_sig": false,
"md5_digest": "64ea11b80b7e38e03cd11a3946296e4b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 15450607,
"upload_time": "2025-07-25T06:00:15",
"upload_time_iso_8601": "2025-07-25T06:00:15.003136Z",
"url": "https://files.pythonhosted.org/packages/f9/d3/cbcd9abc276f9fc2666757a8dee7d363edc301c374a957420e874718977a/django_viewflow-2.2.12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-25 06:00:15",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "django-viewflow"
}