The simplest Python GUI library ever created.
CocoaGUI makes building desktop applications incredibly easy. No complex setup, no confusing APIs - just clean, intuitive Python code that anyone can understand.
- Simple Syntax - Create widgets in one line with intuitive parameters
- Fast Development - Build complete applications in minutes, not hours
- Easy to Learn - If you know basic Python, you already know CocoaGUI
- Clean Code - Your GUI code is readable and maintainable
- Zero Dependencies - Uses only Python's built-in tkinter
pip install cocoaguiimport CocoaGUI as gui
# Create a window
app = gui.Window("My App", width=400, height=300)
# Add widgets
gui.Label(app, "Enter your name:", x=20, y=20)
name_input = gui.Input(app, x=20, y=50, width=300)
def greet():
name = name_input.get()
gui.alert(f"Hello, {name}!")
gui.Button(app, "Greet", command=greet, x=20, y=90)
# Run the app
app.run()That's it! Just 13 lines to create a working GUI application.
- Window - Create application windows with custom sizes
- Button - Interactive buttons with click handlers
- Label - Display text with customizable sizes
- Input - Single-line text input fields
- TextArea - Multi-line text editing
- CheckBox - Toggle checkboxes with state management
- Utilities - Alert and confirmation dialogs
import CocoaGUI as gui
app = gui.Window("Calculator", width=300, height=400)
display = gui.TextArea(app, x=25, y=20, width=250, height=60)
display.set("0")
def add_number(n):
current = display.get().strip()
display.set(current + str(n) if current != "0" else str(n))
# Create number buttons
for i, num in enumerate(range(1, 10)):
row, col = divmod(i, 3)
gui.Button(app, str(num), command=lambda n=num: add_number(n),
x=25 + col*70, y=100 + row*50)
app.run()import CocoaGUI as gui
app = gui.Window("Text Editor", width=600, height=400)
text_area = gui.TextArea(app, x=10, y=40, width=580, height=300)
def save():
content = text_area.get()
with open("document.txt", "w") as f:
f.write(content)
gui.alert("Saved successfully!")
gui.Button(app, "Save", command=save, x=10, y=10)
app.run()Full documentation is available at: CocoaGUI Documentation
- Window - Main application window
- Button - Clickable buttons
- Label - Text display
- Input - Text input field
- TextArea - Multi-line text
- CheckBox - Toggle checkbox
- Python 3.6 or higher
- tkinter (usually comes pre-installed with Python)
GNU General Public License V3 - see LICENSE file for details
Camila "Mocha" Rose
CoffeeShop Development