Skip to main content

Functional dataclass implementations for DearPyGUI container types

Project description

DPGContainers

Motivation

DearPyGUI provides a functional interface for creating objects - windows, groups, et al. This library provides a collection of classes that can be used to create DPG objects as instances.

Example usage

from dpgcontainers.containers import Window, Group, Button

window = Window(width=100, height=200)(
    Group(horizontal=True)(
        Button(tag='button_1'),
        Button(tag='button_2'),
    ),
)


window.tagged_entities['button_1'].callback = lambda: print('clicked!')
window.render()

Children are captured by calling instances as functions. The render cycle is aware of objects that have already been rendered, so the following is fine:

window = Window()

window(Button('button_1'))
window.render()

window(Button('button_2'))
window.render()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dpgcontainers-0.1.1.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dpgcontainers-0.1.1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file dpgcontainers-0.1.1.tar.gz.

File metadata

  • Download URL: dpgcontainers-0.1.1.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for dpgcontainers-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b6b20728d1e047fe934e9b2742da9dc91fae7de445a893b1b632d03530694d7c
MD5 b3aa16b4bdbfa8bbfe28f441bf4f5a0c
BLAKE2b-256 71f9f5df25d78974bb2a5241b3a02d5d0d0fa0af49f370af37a8048a20894a17

See more details on using hashes here.

File details

Details for the file dpgcontainers-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for dpgcontainers-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 df8f08273952cfb64c411bb7c0b9eaf983f224db76acc390d576c72372e67396
MD5 355aa80b13abb87c56dc9410a4d610fe
BLAKE2b-256 14334b8a9464af5badc69b7ba9e223ed456648983ddfdc3b737406576d2cfe99

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page