DearPyGui Demo Project
A comprehensive demonstration project showcasing various integration patterns with DearPyGui, including threading, task queues, and multiprocessing approaches for building responsive GUI applications.
Demonstrations
| File | Description | Key Features |
|---|---|---|
hello.py |
Threading + Queue Demo | Basic GUI with background worker thread using Python threading and queues for progress updates |
hello_huey.py |
Huey Task Queue Integration | Advanced GUI demonstrating Huey task queue integration with real-time progress tracking and comprehensive logging |
Test Demonstrations
| File | Description | Purpose |
|---|---|---|
tests/test_hello.py |
Unit tests for basic threading demo | Testing thread-based GUI components |
tests/test_hello_huey.py |
Unit tests for Huey integration | Testing task queue functionality |
tests/test_queue.py |
Queue-based worker testing | Multiprocessing queue communication patterns |
tests/test_queue_fixed.py |
Enhanced queue worker tests | Improved queue handling with error recovery |
tests/test_mp.py |
Multiprocessing demonstrations | Process-based parallelism examples |
tests/test_combined_filter.py |
Combined filtering operations | Data processing and filtering demonstrations |
Key Technologies
- DearPyGui: Modern, fast Python GUI framework
- Huey: Lightweight task queue for background processing
- Threading: Python threading for concurrent operations
- Multiprocessing: Process-based parallelism
- Queue: Inter-thread/process communication
Features Demonstrated
Threading Integration (hello.py)
- Background worker threads
- Thread-safe queue communication
- Real-time progress updates
- Non-blocking GUI operations
Huey Task Queue (hello_huey.py)
- Task queue management
- Background task execution
- Progress tracking with global state
- Comprehensive logging system
- Memory-based task storage
- Frame-based polling for UI updates
Installation
Prerequisites
- Python 3.12 or higher
- UV package manager (recommended) or pip
Using UV (Recommended)
# Clone the repository
git clone https://github.com/fxyzbtc/dearpyguidemo.git
cd dearpyguidemo
# Install dependencies
uv sync
# Activate virtual environment
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate
Using Pip
# Clone the repository
git clone https://github.com/fxyzbtc/dearpyguidemo.git
cd dearpyguidemo
# Create virtual environment
python -m venv .venv
# Activate virtual environment
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate
# Install dependencies
pip install -e .
Running the Demos
Basic Threading Demo
python hello.py
Features a simple GUI with:
- Start Job button to begin background work
- Real-time progress bar
- Log output window
- Clear Log functionality
Advanced Huey Integration Demo
python hello_huey.py
Features an advanced GUI with:
- Multiple task types (simulation, network, file operations)
- Real-time progress tracking
- Comprehensive logging
- Task queue management
- Background consumer threads
Running Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=. --cov-report=html
# Run specific test files
pytest tests/test_hello.py
pytest tests/test_hello_huey.py
Project Structure
dearpyguidemo/
├── hello.py # Basic threading demo
├── hello_huey.py # Huey task queue demo
├── tests/ # Test suite
│ ├── test_hello.py # Threading demo tests
│ ├── test_hello_huey.py # Huey demo tests
│ ├── test_queue.py # Queue communication tests
│ ├── test_queue_fixed.py # Enhanced queue tests
│ ├── test_mp.py # Multiprocessing tests
│ └── test_combined_filter.py # Data filtering tests
├── pyproject.toml # Project configuration
├── pytest.ini # Test configuration
├── uv.lock # Dependency lock file
└── README.md # This file
Dependencies
Core Dependencies
dearpygui>=2.1.0- Modern Python GUI frameworkhuey>=2.5.3- Lightweight task queuematplotlib>=3.10.5- Plotting and visualizationnetworkx>=3.5- Network analysis librarytqdm>=4.67.1- Progress bars for command line
Development Dependencies
pytest>=8.4.1- Testing frameworkpytest-cov>=6.2.1- Coverage testingcoverage>=7.10.2- Code coverage analysis
Contributing
We welcome contributions! Here are some ways you can help:
Ways to Contribute
- Report Bugs: Open an issue describing the bug and steps to reproduce
- Suggest Features: Propose new demonstrations or improvements
- Submit Pull Requests: Add new examples or fix existing issues
- Improve Documentation: Help improve code comments and README
Development Setup
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and add tests
- Run the test suite:
pytest - Submit a pull request
Code Style
- Follow PEP 8 guidelines
- Add docstrings to functions and classes
- Include type hints where appropriate
- Write tests for new functionality
Links
- Homepage: GitHub Repository
- Issues: Report Issues
- Pull Requests: Contribute Code
- DearPyGui Documentation: https://dearpygui.readthedocs.io/
- Huey Documentation: https://huey.readthedocs.io/
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Metadata
Release files for dearpyguidemo 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dearpyguidemo-0.1.0.tar.gz | 15.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dearpyguidemo-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.8 kB
Release files / dearpyguidemo-0.1.0.tar.gz
| Download URL | dearpyguidemo-0.1.0.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1861c8bc3da701a1cfdc540ab4b745d30a8ee7353cbf73bcab954220ec47d74d
|
|
BLAKE2b-256 checksum How to use checksums |
b0608dce3fecf7ffd053c6e572fad81908119dca538861cba71f0110871c3e2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.25
|
Release files / dearpyguidemo-0.1.0-py3-none-any.whl
| Download URL | dearpyguidemo-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e65b060b66e0cae83be8dd861a9b01f3cbdd98f1d1e61f1556889d0f15441ac7
|
|
BLAKE2b-256 checksum How to use checksums |
85560412df4f15378b48341a6c49281c943568422129b1df8ca8cc1a28f37d24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.25
|