gitmyhub

Tkinter-Designer

Python ★ 10k updated 1mo ago

An easy and fast way to create a Python GUI 🐍

Tkinter Designer converts Figma UI designs into ready-to-run Python desktop app code, design your interface visually in Figma, run one CLI command, and get a working Tkinter window with all your buttons and inputs laid out.

PythonTkintersetup: moderatecomplexity 2/5

Tkinter Designer is a Python tool that converts visual designs made in Figma into working Python desktop app code. Figma is a popular browser-based design tool where you can drag and drop buttons, text fields, images, and other interface elements to build the look of an app without writing code. Tkinter is the built-in GUI library that comes with Python. Tkinter Designer bridges the two: you design in Figma, then Tkinter Designer generates the Python code that recreates that design as a runnable desktop application.

The workflow is: design your app interface in Figma, copy the Figma file URL and your Figma API token, then run the tkdesigner command-line tool with those two values. The tool calls the Figma API, reads your design, and writes out a Python file plus any image assets needed to reproduce the layout. You can then run that generated file as a standard Python application.

The tool supports a few output templates. The default produces a straightforward Python script. A class-based template wraps the generated code in a class, which makes it easier to connect your own logic to the buttons and inputs. A pages template handles designs with multiple frames and generates navigation between them. There is also an option to apply a visual theme to the generated app.

You need Python 3.9 or newer and install the tool with pip install tkdesigner. Designs with multiple frames in a single Figma file are supported; Tkinter Designer generates code for each frame separately.

The project is open source and accepts community contributions. Examples of apps built with it are shown in the README, and the creator maintains a Discord server for users.

Where it fits