Pyrustic Framework is a lightweight framework to develop, package, and publish
Python desktop applications.
Python is one of the world's most popular programming languages. It's used in many application domains from machine learning to web development. Desktop application development is exciting.
Pyrustic Framework aims to help you build great desktop apps.
Pyrustic Framework comes with batteries included:
builda distribution package,
publishthe distribution package, and more. This tool comes with a nice
hookingmechanism and an
APIso you could easily automate your workflow with
lifecyclemechanism that will make it easier to build and maintain your
dark theme. Theme built with
light theme. Coming soon !
Threadomis a library to make it easy to develop multithreading applications. You can retrieve from the main thread the values returned and the exceptions raised by the functions executed in other threads.
Diasporaallows loosely coupled components to exchange data, subscribe to events and publish events notifications.
Jayson, you can initialize preferences/configuration/whatever
JSONfiles easily, thanks to its internal mechanism that creates a fresh copy of the given default
JSONfile at the target path.
Jaysonalso comes with a lock to open
JSONfiles in readonly mode.
libraryto fetch resources with an implementation of conditional request and a smart responses caching system.
libraryto simplify the connection to your SQLite database with some cool features like the ability to specify what I call a
creational scriptthat will be used to create a new database when it is missing.
As you can see, the framework covers various topics, from GUI to database connection, and it enforces good practices like the project structure by example.
This is the typical content of
from pyrustic.app import App from cyberpunk_theme import Cyberpunk # the framework comes with a graphical 'Hello World' view from pyrustic.hello import HelloView def main(): # The App app = App() # Set the theme app.theme = Cyberpunk() # Set the main view (it could be a plain old Tkinter object) app.view = HelloView(app) # Center the window app.center() # Lift off ! app.start() if __name__ == "__main__": main()
This is an example of a
import tkinter as tk from viewable import Viewable class View(Viewable): def __init__(self, master): super().__init__() self._master = master def _build(self): self._body = tk.Frame(self._master) label = tk.Label(self._body, text="Hello !") label.pack() def _on_map(self): """ This method is called when the view is mapped for the first time """ def _on_destroy(self): """ This method is called when the view is destroyed """ if __name__ == "__main__": root = tk.Tk() view = View(root) # the method build_pack() builds then packs the view. # In fact you could do: # view.build() then view.pack() # or: # view.build() then view.body.pack() view.build_pack() # it accepts arguments like the Tkinter pack() method root.mainloop()
This is an example of a
naked view (a view that doesn't subclass
import tkinter as tk from pyrustic.app import App from cyberpunk_theme import Cyberpunk def view(app): """ A Naked View is a function that accepts the app reference as argument and returns a Tkinter object (generally a container like tk.Frame) """ master = app.root # The body of this naked view is a tk.Frame body = tk.Frame(master) label = tk.Label(body, text="Hello !") label.pack() return body # mandatory ! if __name__ == "__main__": app = App() app.theme = Cyberpunk() app.view = view # Naked view reference app.start()
Install for the first time:
$ pip install pyrustic
$ pip install pyrustic --upgrade --upgrade-strategy eager
I recommend upgrading
Pyrustic Framework with the
eager upgrade strategy as specified since the project is under active development.
Read the FAQ.
Read the Tutorial.
Read the Guide.
Read the Glossary.
Read the Reference.
Some interesting links below to get started with
Note: I am not affiliated with any of these entities. A simple web search brings them up.
Pyrustic Framework is part of the Open Pyrustic Ecosystem. Let's discover some other ecosystem projects.
Once you have published your app to Github with the command
publish in the
Project Manager, the next question that arises is: "How to make the
find-download-install-run process easier for users ?". This is where
Hubstore comes in.
Hubstore - To Connect Apps With Users
Hubstore, it's easy to showcase, distribute, install, and manage your Python desktop apps.
Note that any Python Wheel app is compatible with
Hubstore, in others words, you don't need to use the
Pyrustic Framework to have a
Hubstore compatible app.
The Pyrustic Open Pipeline to distribute apps
Hubstore itself is built with
Pyrustic Framework and is available on
Do you want to learn more about
Hubstore ? Discover Hubstore !
Pyrustic Framework is C,
Dresscode would be Python.
Dresscode is a high productivity framework for developing a graphical user interface without prior knowledge of using a GUI Toolkit.
As a high productivity framework,
Dresscode is suitable for teaching, prototyping, testing, adding a GUI to command-line scripts, developing simple to complex desktop applications, etc.
Dresscode demo built with 1 hex-digit lines of Python code
Under the hood,
Discover Dresscode !
Here are some desktop apps built with
Pyrustic Framework is licensed under the terms of the permissive free software license
Hi ! I'm Alex, operating by "Crocker's Rules"