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.5.tar.gz (18.4 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.5-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for dpgcontainers-0.1.5.tar.gz
Algorithm Hash digest
SHA256 b534757ff41ccaf88dfaea663e33062e858e782672aaa678a11d6907901a82c3
MD5 43ce6bc00dd97c425f53b9c05b73441b
BLAKE2b-256 60f6f50b76e7ba7ea094d0c398ebae0a6a0ebaa2bffcfff0c0dec002b2a935c3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dpgcontainers-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 21ff23aa97a61ef167a50c42cd42dc40b6e6c887f94cb0d27bfa078efaa8cdc5
MD5 609da0cfe208679e14b600ee15617135
BLAKE2b-256 a7429c8856e22ca2749340f2a248549e38b53ca8470282f6f1fc44af1b6a45bd

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