PWry
![]()
This is a complete wrapper for Wry for Python. It's designed to be as simple as possible while maintaining most of the functionality of Wry.
from pwry.pwry import Window, WindowAttributes
from pwry import app
@app.main
def main(_handler: WindowHandler):
# Manipulate the window or webview as needed
# Great place to add middleware
def startup():
# Define the window attributes
window_attributes = WindowAttributes(
inner_size_constraints=WindowSizeConstraints(
min_height=None,
min_width=None,
max_height=Unit.IUnit(1440),
max_width=Unit.IUnit(2560),
),
title="Hello, World!",
)
# Create a window from the attributes
window = Window(window_attributes)
# Run the window in the app
app.run(window)
if __name__ == "__main__":
startup()