popsicle: Python integration for JUCE with pybind11.
Project description
Popsicle: Python integration for JUCE with pybind11
Overview
Popsicle is a groundbreaking project designed to extend the accessibility of JUCE by seamlessly integrating it with Python. Leveraging the power of pybind11, Popsicle offers a Pythonic interface to the JUCE framework. This integration allows developers to utilize JUCE in a manner similar to using Qt with PySide, offering a simplified yet robust approach.
Popsicle serves multiple purposes, each contributing to its significance in the development landscape.
Features
Effortless JUCE App Prototyping: Effortlessly prototype JUCE apps. Popsicle streamlines the development process, allowing developers to focus on creativity by eliminating the need for intricate build configurations and setups.
Python Scripting Integration: Seamlessly integrate Python scripting by embedding Popsicle into existing JUCE applications as a dedicated module. Extend and enhance your JUCE projects with the flexibility and ease of Python within the familiar JUCE framework.
Unit Testing Made Easy: Ensure the robustness and reliability of JUCE classes with Popsicle’s built-in unit testing support. Leverage Python’s testing infrastructure for a seamless testing process.
Cross-Platform Compatibility: Enjoy cross-platform compatibility with Popsicle. Work consistently across Windows, macOS, and Linux environments for a unified development experience.
Popsicle stands as a humble yet powerful solution, aimed at enriching the development experience with JUCE by simplifying, extending, and enhancing its integration with Python.
Example Usage
A single 80 lines script is better than thousand of words:
import popsicle as juce
class MainContentComponent(juce.Component, juce.Timer):
def __init__(self):
juce.Component.__init__(self)
juce.Timer.__init__(self)
self.setSize(600, 400)
self.startTimerHz(60)
def __del__(self):
self.stopTimer()
def paint(self, g):
g.fillAll(juce.Colours.black)
random = juce.Random.getSystemRandom()
rect = juce.Rectangle[int](0, 0, 20, 20)
for _ in range(100):
g.setColour(juce.Colour.fromRGBA(
random.nextInt(256),
random.nextInt(256),
random.nextInt(256),
255))
rect.setCentre(random.nextInt(self.getWidth()), random.nextInt(self.getHeight()))
g.drawRect(rect, 1)
def timerCallback(self):
if self.isVisible():
self.repaint()
class MainWindow(juce.DocumentWindow):
component = None
def __init__(self):
super().__init__(
juce.JUCEApplication.getInstance().getApplicationName(),
juce.Desktop.getInstance().getDefaultLookAndFeel()
.findColour(juce.ResizableWindow.backgroundColourId),
juce.DocumentWindow.allButtons,
True)
self.component = MainContentComponent()
self.setResizable(True, True)
self.setContentNonOwned(self.component, True)
self.centreWithSize(800, 600)
self.setVisible(True)
def __del__(self):
if self.component:
del self.component
def closeButtonPressed(self):
juce.JUCEApplication.getInstance().systemRequestedQuit()
class Application(juce.JUCEApplication):
window = None
def getApplicationName(self):
return "JUCE-o-matic"
def getApplicationVersion(self):
return "1.0"
def initialise(self, commandLine):
self.window = MainWindow()
def shutdown(self):
if self.window:
del self.window
if __name__ == "__main__":
juce.START_JUCE_APPLICATION(Application)
As easy as that ! You will find more example on JUCE usage in the examples folder.
Supported Platforms
Platform |
Python 3.10 |
Python 3.11 |
Python 3.12 |
Notes |
---|---|---|---|---|
macOS-universal2 |
✅ |
✅ |
✅ |
|
win_amd64 |
✅ |
✅ |
✅ |
|
win_arm64 |
✅ |
✅ |
✅ |
|
manylinux_2014-x86_64 |
✅ |
✅ |
✅ |
|
manylinux_2014-aarch64 |
⚠️ |
⚠️ |
⚠️ |
Built but not tested exhaustively |
Supported Modules
Module |
Supported |
Test Coverage |
Notes |
---|---|---|---|
juce_analytics |
⛔️ |
N/A |
Not Planned |
juce_audio_basics |
✅ |
0.87% |
In Progress |
juce_audio_devices |
✅ |
0.0% |
In Progress |
juce_audio_formats |
✅ |
0.0% |
In Progress |
juce_audio_plugin_client |
⛔️ |
N/A |
Not planned |
juce_audio_processors |
✅ |
0.0% |
In Progress |
juce_audio_utils |
✅ |
0.0% |
In Progress |
juce_box2d |
⛔️ |
N/A |
Planned |
juce_core |
✅ |
44.82% |
Ready |
juce_cryptography |
⛔️ |
N/A |
Planned |
juce_data_structures |
✅ |
55.61% |
Ready |
juce_dsp |
⛔️ |
N/A |
Planned |
juce_events |
✅ |
49.68% |
Ready |
juce_graphics |
✅ |
15.76% |
In Progress |
juce_gui_basics |
✅ |
9.77% |
In Progress, Basic Components Available |
juce_gui_extra |
✅ |
0.57% |
In Progress |
juce_midi_ci |
⛔️ |
N/A |
Not Planned |
juce_opengl |
⛔️ |
N/A |
Planned |
juce_osc |
⛔️ |
N/A |
Not Planned |
juce_product_unlocking |
⛔️ |
N/A |
Not Planned |
juce_video |
⛔️ |
N/A |
Not planned |
Example Applications
Some images of JUCE tutorials and other small apps ported to popsicle.
Hot Reloading (hotreload_main.py and hotreload_component.py)
Animated Component (https://docs.juce.com/master/tutorial_animation.html)
Advanced GUI layout techniques (https://docs.juce.com/master/tutorial_rectangle_advanced.html)
Responsive GUI layouts using FlexBox and Grid (https://docs.juce.com/master/tutorial_flex_box_grid.html)
Table listbox (https://docs.juce.com/master/tutorial_table_list_box.html)
Slider values example (https://docs.juce.com/master/tutorial_slider_values.html)
Audio Player (https://docs.juce.com/master/tutorial_playing_sound_files.html)
Audio Player with waveform (https://docs.juce.com/master/tutorial_audio_thumbnail.html)
OpenCV Integration
Matplotlib Integration
Emojis Components (emojis_component.py and emojis_font_component.py)
Code Coverage
The current code coverage of the project refers to the combined JUCE + popsicle
Popsicle places a strong emphasis on comprehensive code coverage to ensure the reliability and quality of the project. Our code coverage encompasses thorough testing of the JUCE framework, providing developers with confidence in the stability and performance of their applications.
To explore detailed information about the testing, refer to the tests directory in our GitHub repository. This resource offers insights into the specific areas of the JUCE framework that have been rigorously tested, empowering developers to make informed decisions about the robustness of their implementations.
At Popsicle, we believe that extensive code coverage is essential for delivering software solutions that meet the highest standards of excellence. Feel free to delve into our testing documentation to gain a deeper understanding of the meticulous approach we take towards ensuring code quality and reliability.
Licensing
Popsicle is offered in two distinct licensed flavors to cater to diverse usage scenarios:
GPLv3 License: This license is applicable when utilizing Popsicle from Python through the PyPi-provided wheels or embedding it in an open-source (OSS) application. Embracing the principles of open-source development, the GPLv3 license ensures that Popsicle remains freely accessible and modifiable within the open-source community.
Commercial License: Tailored for scenarios where Popsicle is integrated into a closed-source application, the commercial license provides a flexible solution for proprietary software development. This option offers a streamlined approach for utilizing Popsicle within closed environments, with further details to be announced.
Popsicle’s dual licensing approach ensures compatibility with a wide range of projects, whether they align with open-source principles or require the flexibility of a commercial license for closed-source applications.
It’s important to note that when Popsicle is employed in a closed-source application, a corresponding JUCE license is also required to ensure proper adherence to licensing requirements.
Installation
Getting started with Popsicle is a straightforward process, requiring just a few simple steps. Follow the instructions below to install Popsicle effortlessly:
pip3 install popsicle
Ensure that you have an up-to-date version of pip to ensure a smooth installation process.
Be sure you follow the quick start guide to know more abut how to use popsicle.
Build From Source
Clone the repository recursively as JUCE is a submodule.
git clone --recursive git@github.com:kunitoki/popsicle.git
Install python dependencies.
# Build the binary distribution
python3 -m build --wheel
# Install the local wheel
pip3 install dist/popsicle-*.whl
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file popsicle-0.9.6-cp312-cp312-win_arm64.whl
.
File metadata
- Download URL: popsicle-0.9.6-cp312-cp312-win_arm64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.12, Windows ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c40d8301b08690b041ed5710f0e9a63bf83c48ab51f5cf015b6fb7cf95921744 |
|
MD5 | 1f92a655923bfbc9d96c4a67037d9bba |
|
BLAKE2b-256 | 2d4fef8ccd54d49f7b87d368015f732db114d5b691474befdd2fb376e72d5744 |
File details
Details for the file popsicle-0.9.6-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: popsicle-0.9.6-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce7f79069151860a1bd43ba50e786d57c8db3e2f6e8538db45bb0ac67adba7f6 |
|
MD5 | 560f929faefa3cec1ee13647e4f0d464 |
|
BLAKE2b-256 | e706564c23a8c39326795bf9c33b254c46177c3e69ea93c5e51deac067b5a99d |
File details
Details for the file popsicle-0.9.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: popsicle-0.9.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11de3ccfb5a8f422f1532aaca835ab6907affcbf91ff45312ebcb1d424b4723f |
|
MD5 | 349d35afd71bb2fe664c9a59a0727bf8 |
|
BLAKE2b-256 | 960f237bd8e92f001a0dfdf27e1c102579f905254224772b83a67a524f7fe61e |
File details
Details for the file popsicle-0.9.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: popsicle-0.9.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4429eeee549cf340b3bcc60e7244881b08b8357aeafc88a2a9aee9dd1e3b9fc1 |
|
MD5 | 8fee5bb8bc96d94d7e7b97aae4f8f68c |
|
BLAKE2b-256 | 1ed0f4e364f972a49fb56fc13eba09370531ef32a8b7f4324ac78636acec3073 |
File details
Details for the file popsicle-0.9.6-cp312-cp312-macosx_10_15_universal2.whl
.
File metadata
- Download URL: popsicle-0.9.6-cp312-cp312-macosx_10_15_universal2.whl
- Upload date:
- Size: 8.0 MB
- Tags: CPython 3.12, macOS 10.15+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a42d53580ddbaca15e64e34c4971f83a862a95c5e50d3e1be5b127c4ff056e48 |
|
MD5 | d9e124ac10d420b1733d5c844e7ed913 |
|
BLAKE2b-256 | a94bdab88c2b55611574ce90afe3ce79b3314af42b757a2eb0b60161019e4418 |
File details
Details for the file popsicle-0.9.6-cp311-cp311-win_arm64.whl
.
File metadata
- Download URL: popsicle-0.9.6-cp311-cp311-win_arm64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.11, Windows ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d0eafff83b08b6ada954e897a0e07b17f6994398c1860a5a9560af402c8f6e9 |
|
MD5 | a82004655458626cafa0aab33ec0c1b4 |
|
BLAKE2b-256 | 732c2ff08fb47134ab13dcbac3318c2d00fd38990067eef9f054e94c9176c9c7 |
File details
Details for the file popsicle-0.9.6-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: popsicle-0.9.6-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f30b6309b015f3a26a461223c19d7c8f962f42868575af076f15f71f53b58496 |
|
MD5 | cde5f80aa079fd3696a4f6d7b97ff386 |
|
BLAKE2b-256 | 0dcea68e9c72fb74e0fbd90a5b3e391c95d1a471159793941b4bd6b5be69ad99 |
File details
Details for the file popsicle-0.9.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: popsicle-0.9.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95063399a42258b56b469ae31a380d6c2ddb4ab01d729a52300ee3e55ecececb |
|
MD5 | 49afcf9827521bac0f86361ffb954457 |
|
BLAKE2b-256 | d0ae6c68d7ec5dbf910014aae893a81285225c21a912e6ca90d9362cae32d538 |
File details
Details for the file popsicle-0.9.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: popsicle-0.9.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cafbace5fb0df51aac0336cce47fc5208335c43670a103d1a7f8ee0f3094f118 |
|
MD5 | 587204c839874e8ef84eb7a988cc84de |
|
BLAKE2b-256 | a7779b221a09aedde6a43670f587fb9c3753e584380bfdff7f340ec5eb0bbdac |
File details
Details for the file popsicle-0.9.6-cp311-cp311-macosx_10_15_universal2.whl
.
File metadata
- Download URL: popsicle-0.9.6-cp311-cp311-macosx_10_15_universal2.whl
- Upload date:
- Size: 7.8 MB
- Tags: CPython 3.11, macOS 10.15+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d013f08cfd2c491d3f4a35b6477592bd58ece3d59c37a513b6d1e620f50145f1 |
|
MD5 | b54905f6469f394947e088d14b49fc7d |
|
BLAKE2b-256 | 699a5f7f683e6771903d2ded407698e923e37e8fabc744ea9e1e92d688e216ab |
File details
Details for the file popsicle-0.9.6-cp310-cp310-win_arm64.whl
.
File metadata
- Download URL: popsicle-0.9.6-cp310-cp310-win_arm64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.10, Windows ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e22ffb9aca2b468915d7c4b5bd7ce82cdf52ce86e1f4d54eacf6a033dd13c98 |
|
MD5 | 13a927ae661b7e14e79f814f1869390c |
|
BLAKE2b-256 | a3569586dda4244bb54e25101b3361bc6f0d1f17c72bc8d1f7870f04fbafc1d3 |
File details
Details for the file popsicle-0.9.6-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: popsicle-0.9.6-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c55c6f840269a49b395626ce600c65078aeeda8c727d305d1dca7bded5cf587b |
|
MD5 | 9c6e09e71b74e72d39698020819fbb34 |
|
BLAKE2b-256 | a9f15e4a1b371d95618cb25a51b828010760d8829f700a9983709b81809ddf8d |
File details
Details for the file popsicle-0.9.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: popsicle-0.9.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 5.4 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e2d51bd173da55f84aec6c2a3b5c4b8c0ac3742491a20110531fcc3a3f308bc |
|
MD5 | d902e4cda3d0314cfa56e1de2b8af3a6 |
|
BLAKE2b-256 | a395ac52c32f7d041ab8661bcdc122eab8a8db56fd2b6c178cb340ac76b6b080 |
File details
Details for the file popsicle-0.9.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: popsicle-0.9.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10ef070c120e782d852eb47a55a187cf7276e8a759110bbbec713e5bbd0faf6a |
|
MD5 | 66a5d0b92c0070080a35432c4d39b532 |
|
BLAKE2b-256 | 40d7a34e02432ba5476da22cefcdda33fe0833050611a377103e8a6ac86b7f80 |
File details
Details for the file popsicle-0.9.6-cp310-cp310-macosx_10_15_universal2.whl
.
File metadata
- Download URL: popsicle-0.9.6-cp310-cp310-macosx_10_15_universal2.whl
- Upload date:
- Size: 7.8 MB
- Tags: CPython 3.10, macOS 10.15+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0abedd3790cfe63b14ac3aa46263993e8d859b2c1f769dad8e8685d9995e8e2e |
|
MD5 | 0d4a6adc56b291b825ed59bf932dfa85 |
|
BLAKE2b-256 | 8df41742f8bc023808776f29cf6cb1c24091d961f6ea141632eb2eb04045a58b |