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.4.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.4-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dpgcontainers-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 bdec5370000edf9324c613610286fc0cfc09847101a341b7c1850390133b0059
MD5 828a07869bd0eece4cdb2c739d9f95a8
BLAKE2b-256 a386064d8a889a11dfe69c290eb31a0071fd51fd4fd238311217eef8d9fba8a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dpgcontainers-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 90fa27eeb376fe1d3a7bd6a3fb05e3e474d91903ebdf30fbe8066a229c7f619f
MD5 ea4c067514c05a037c39d7d32d94ed09
BLAKE2b-256 83dc9d8a0dbba88657d97308789170cdb34814e8665b4fa930a16da782d59bad

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