DEV Community

Alin Climente
Alin Climente

Posted on • Edited on

6 4

Desktop apps with Django without Electronjs

Not only JS folks can reuse web tehnologies for desktop applications we can do it too. If you want to create a nice gui and you want to reuse your web tech knowledge try flaskwebgui.

First, install it:

pip install flaskwebgui
Enter fullscreen mode Exit fullscreen mode

Next to manage.py file create a gui.py file where you need to import application from project's wsgi.py file.

├── project_name
│   ├── asgi.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
├── gui.py # this 
├── manage.py
Enter fullscreen mode Exit fullscreen mode
#gui.py

from flaskwebgui import FlaskUI
from project_name.wsgi import application

FlaskUI(application).run()

Enter fullscreen mode Exit fullscreen mode

Next start the application with:

python gui.py  
Enter fullscreen mode Exit fullscreen mode

Django will be served by waitress.

Also, you can use any frontend framework you like + any python web framework you like, just pass a function which starts the server to start_server parameter.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more