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.

Installation

pip install dpgcontainers

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.2.tar.gz (18.3 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.2-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for dpgcontainers-0.1.2.tar.gz
Algorithm Hash digest
SHA256 54c23f11c7cbc9699cea66a2c884d69e6736b4bb719255bfd12dce7c43692677
MD5 3d60448f33de7b1383e7201aea2d5315
BLAKE2b-256 c3ac43fd3c57ca0ca2770436818e73b9d6139282dc33c4bea8de51df089f9ab7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dpgcontainers-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8908013708a42980e4fbd9be370c34154e6250b251acd9bd41c2ffa52938710c
MD5 344dd2098634a8b54cf2c10718aa7bda
BLAKE2b-256 4d22f91080f3f9c84452afde7d5fd2696cbca74a8050a5858f356608cbede24d

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