Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

dearfy

Desription

Dearfy is a library built on top of DearPyGUI (which itself is a wrapper for Dear ImGui), designed to simplify the creation of complex, highly-structured user interfaces.

The project is fully open-source (MIT License) and was inspired by the object-oriented interface building approach of Textual (a popular library for creating Terminal User Interfaces).

Instatting

Direct installation from PyPi via pip:

pip install dearfy

Installation from the GitHub repository:

pip install git+https://github.com/peachboy0/dearfy.git

Using

import dearpygui.dearpygui as dpg
from dearfy.app import App, action
from dearfy.widgets import *
from dearfy.typing import Tag

from typing_extensions import Any

# ! Menu

class MyApp(App):
    primary_window_tag: Tag | None = None

    def compose(self):
        with Window(tag="FirstWindow"):
            yield Button(label="[P]", callback='SetPrimaryWindow')
            with Group(horizontal=True):
                yield InputText(width=-100)
                yield Button(label="OK", width=50)
        with Window(tag="SecondWindow"):
            yield Button(label="[P]", callback='SetPrimaryWindow')
            with Group(horizontal=True):
                yield Checkbox()
                yield Text("It's okay?")

    @action('SetPrimaryWindow', callmode='one')
    def action_SetPrimaryWindow(self, sender: Tag, app_data: Tag, user_data: Any) -> None:
        button: Button = self.get_item(sender)
        if self.primary_window_tag is not None:
            if self.primary_window_tag == button._node_parent.tag:
                self.set_primary_window(self.primary_window_tag, False)
                self.primary_window_tag = None
            else:
                self.set_primary_window(self.primary_window_tag, False)
                self.set_primary_window(button._node_parent.tag, True)
                self.primary_window_tag = button._node_parent.tag
        else:
            self.set_primary_window(button._node_parent.tag, True)
            self.primary_window_tag = button._node_parent.tag

# ! Run

if __name__ == "__main__":
    app = MyApp()
    app.run()

Metadata

Release files for dearfy 0.1.10a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dearfy 0.1.10a1
File Size Uploaded Provenance Actions
dearfy-0.1.10a1.tar.gz 28.5 kB Without provenance Details for dearfy-0.1.10a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dearfy 0.1.10a1
File Interpreter ABI Platform Actions
dearfy-0.1.10a1-py3-none-any.whl Python 3 none any Details for dearfy-0.1.10a1-py3-none-any.whl

Total release size: 80.0 kB

Release files / dearfy-0.1.10a1.tar.gz

Download URL dearfy-0.1.10a1.tar.gz
Size 28.5 kB
Tags Source
SHA-256 checksum
How to use checksums
66159a88b77ef78c6e932121024cab8f0a5a52496a2db4ec285f1399151a894b
BLAKE2b-256 checksum
How to use checksums
a0c63bcafe319494a786ed672669189a5912b00904288c8e0268b82c0a88b1d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / dearfy-0.1.10a1-py3-none-any.whl

Download URL dearfy-0.1.10a1-py3-none-any.whl
Size 51.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d4a058bd45fe33e0af356ae3ceba5015c417f188fe11e1f07188d1e4f593844
BLAKE2b-256 checksum
How to use checksums
3757d3699154ced59535481f9536ff38bf0d104f1b8c56a912ba16c2d30393d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for dearfy 0.1.10a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page