Skip to content

programmersd21/pyced

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Pyced

Build beautiful GUIs in Python with the power of Rust + Iced


Pyced is a Python binding for the Iced GUI library, built with Rust under the hood. It gives you a dead-simple, reactive interface to build cross-platform desktop apps that look clean and modern — without losing your mind.

🚀 Why Pyced?

  • Python simplicity with Rust performance
  • Hot reload-style widget creation
  • Easy widget binding: Button, Input, Text, and more coming
  • Custom callbacks straight from Python
  • Cross-platform: Linux, macOS, Windows

🔧 Installation

pip install pyced  # (coming soon to PyPI)

Or for development:

git clone https://github.com/yourname/pyced
cd pyced/venv/components
maturin develop

Make sure you have Rust + maturin installed:

cargo install maturin

📦 Basic Usage

from pyced.components import PyApp, Text, Button, Input, WidgetWrapper

app = PyApp("My App", (800, 600), "icon.png")

input_field = Input("Enter your name", False)
input_cb_id = app.add_callback(lambda: print("Input changed!"))

app.add_widget(WidgetWrapper.from_input(input_field, input_cb_id, size=(300, 40)))

button_cb_id = app.add_callback(lambda: print(input_field.get()))
btn = Button("Click me!")
btn.onclicked(button_cb_id)

app.add_widget(WidgetWrapper.from_button(btn, size=(200, 40)))
app.add_widget(WidgetWrapper.from_text(Text("Welcome!"), size=(300, 50)))

app.run()

🧱 Components

PyApp(title, resizable, size, theme, icon_path)

Creates the main application window.

Text(content)

Simple text display widget.

Button(label)

Standard button. You can attach a callback via btn.onclicked(id).

Input(placeholder, is_password)

Basic text input. Use .get() to read the value.

WidgetWrapper

Wraps a widget and its size (width, height).

🧠 Under the Hood

  • Built with Rust + PyO3 + Iced
  • Everything runs in a single-threaded Iced event loop
  • Widgets are passed between Python and Rust via a wrapper

💡 Roadmap

  • Add sliders, dropdowns, checkboxes
  • Theme customization
  • Async support
  • Events/messaging bus

🤝 Contributing

Pull requests, issues, and feedback are welcome.

🪪 License

MIT


Made with 💚 in Rust & Python

About

developing rust-based gui library in python using `iced`

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors