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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dpgcontainers-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 2906b7627470dd71d6c33cb38ede496e115919488f6d363492aa9756c75dbd54
MD5 861bfe45066406b0700f22382a3225db
BLAKE2b-256 257189bd71abbc768b92f53e7ae17f094a20b122127325b2fe5a7a1b40ba1248

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dpgcontainers-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 91cb9d32561355b51ba4d23c83a18e24768438078af7f3e28db1b910e659aa54
MD5 c65d4683f0163cf61078f9462ddd8708
BLAKE2b-256 01825762ad0faafac7ce962cb730db5fc157b152e5fe5004223f16ffb3a7df9f

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