Repository navigation
v1.0.0 - Initial Release
dpy-layout-builder v1.0.0
A fluent builder pattern for creating Discord UI LayoutViews with containers in discord.py. Chain methods instead of nesting components manually.
Features
- Fluent API - chain
.add_header(),.add_text(),.add_button(),.add_select(), and more - Automatic ActionRow grouping - buttons are batched into rows of 5 automatically
- Section accessories - attach thumbnails or buttons inline
ButtonConfig - Select menus - use
SelectOptionConfigfor rich options or plain strings for simple ones - Media Gallery & file display - add up to 10 images or file attachments
- Multi-containers layouts - combine multiple styled containers with
MultiContainerLayoutViewBuilder - Quick helpers -
quick_info_view()andquick_confirm_view()for common patterns - Build safety - call
.build()multiple times without mutating builder state - Typed - ships with
py.typedfor full type checker support
Install
pip install dpy-layout-builder
Quick Example
Requirements
- Python 3.10+
- discord.py 2.7.1+