Back to Blog
Guides

Building Your First App with Bravura SDK: A Step-by-Step Tutorial

You've heard the pitch: modern Python GUIs with GPU acceleration, professional themes, and components that don't look like they escaped from 1998. But what does it actually look like to build something with Bravura SDK? This tutorial takes you from installation to a working, styled application in about 30 minutes.

What You'll Build

By the end of this tutorial, you'll have a desktop note-taking application with:

The entire app will be under 80 lines of Python. No CSS files, no HTML templates, no JavaScript — just Python.

Prerequisites

Before you start, make sure you have:

Which Tier Do You Need?

This tutorial uses components available in all tiers. The Standard tier ($49.99/month or $1,999.99 one-time) includes everything shown here: themed widgets, layout managers, event handling, and file I/O integration. Professional and Enterprise tiers add GPU acceleration, advanced components, and priority support.

Step 1: Installation

Install the Bravura SDK package via pip using your license credentials:

# Install the Bravura SDK package pip install bravura-sdk # Activate your license (run once) python -m bravura activate --key YOUR_LICENSE_KEY

The activation step validates your license and configures the SDK for your machine. You only need to do this once per installation. After activation, the SDK is ready to use in any Python script.

Step 2: The Minimal App

Let's start with the absolute minimum — a window with a theme:

from bravura import App, Theme app = App( title="My Notes", size=("900x600"), theme=Theme.MIDNIGHT ) app.run()

That's it. Four lines, and you have a GPU-accelerated window with the Midnight theme applied. The theme handles colors, fonts, borders, hover states, scrollbar styling, and focus indicators. No configuration needed.

Available Themes

Bravura SDK ships with 13 professional themes: MIDNIGHT (dark blue), BLACK (pure dark), WHITE (light), CORPORATE (navy/steel), OCEAN (calming blue), and more. Every widget automatically inherits the active theme. Switch themes with a single line change.

Step 3: Adding a Layout

Bravura uses a panel-based layout system. Panels are containers that arrange their children horizontally or vertically. Let's create a sidebar and a main content area:

from bravura import App, Panel, Label, Theme app = App(title="My Notes", size="900x600", theme=Theme.MIDNIGHT) # Create layout root = Panel(direction="horizontal", padding="0") # Sidebar (fixed width) sidebar = Panel( width="220px", padding="16px", style="sidebar" ) sidebar.add(Label("My Notes", style="heading")) # Main content (fills remaining space) content = Panel( expand=True, padding="24px" ) content.add(Label("Select a note or create a new one.")) root.add(sidebar, content) app.set_root(root) app.run()

The direction="horizontal" parameter tells the root panel to lay out its children side by side. The sidebar has a fixed width, while the content area uses expand=True to fill the remaining space. Resize the window and the layout adapts automatically.

Step 4: Interactive Components

Now let's add the actual note-taking functionality — a text area for writing and buttons for saving:

from bravura import App, Panel, Label, Button, TextArea, Theme import json from pathlib import Path app = App(title="My Notes", size="900x600", theme=Theme.MIDNIGHT) notes_file = Path("notes.json") notes = json.loads(notes_file.read_text()) if notes_file.exists() else {} root = Panel(direction="horizontal", padding="0") # Sidebar sidebar = Panel(width="220px", padding="16px", style="sidebar") sidebar.add(Label("My Notes", style="heading")) def new_note(): name = f"Note {len(notes) + 1}" notes[name] = "" refresh_sidebar() editor.set_text("") sidebar.add(Button("+ New Note", on_click=new_note, style="primary")) # Main content content = Panel(expand=True, padding="24px", gap="12px") editor = TextArea(placeholder="Start writing...", expand=True) def save_current(): notes_file.write_text(json.dumps(notes, indent=2)) content.add(editor) content.add(Button("Save", on_click=save_current, style="primary")) root.add(sidebar, content) app.set_root(root) app.run()

A few things to notice:

Step 5: Polish and Ship

Let's add some finishing touches that take the app from "works" to "feels professional":

# Add status bar at the bottom status = Label( "Ready", style="caption", align="right" ) def save_current(): notes_file.write_text(json.dumps(notes, indent=2)) status.set_text("Saved successfully") # Add keyboard shortcut app.bind("Ctrl+S", save_current) app.bind("Ctrl+N", new_note)

Keyboard shortcuts, status feedback, and styled captions — all in a few lines. The resulting application looks and feels like native software. No electron wrapper, no web view, no 200MB runtime. Just Python and a GPU-accelerated render pipeline.

What You Get Out of the Box

Beyond the components used in this tutorial, Bravura SDK includes a full widget library:

Category Components
Input Button, TextInput, TextArea, Checkbox, Radio, Toggle, Slider, Dropdown, DatePicker
Display Label, Image, Icon, Badge, ProgressBar, Spinner, Card, Table
Layout Panel, Grid, Tabs, Accordion, Sidebar, SplitView, ScrollView
Feedback Toast, Modal, Dialog, Tooltip, Notification, StatusBar
Navigation MenuBar, ContextMenu, Breadcrumb, Pagination, Toolbar

Every component respects the active theme, supports keyboard navigation, and handles high-DPI displays correctly. You build your application logic. Bravura handles the rest.

Common Patterns

Responsive Layouts

Bravura panels automatically handle responsive behavior. Use expand=True for flexible children, fixed widths/heights for rigid sections, and min_width/max_width for constrained flexibility. The layout engine recalculates on every resize event — GPU-accelerated, so there's no stutter.

State Management

For simple apps, Python variables and callbacks work perfectly (as shown above). For larger applications, Bravura provides a reactive state system where UI components automatically update when their bound data changes. No manual refresh calls needed.

File Dialogs

from bravura import FileDialog path = FileDialog.open( title="Open Note", file_types=[("Text Files", "*.txt"), ("All Files", "*.*")] )

File dialogs are native to the operating system. Bravura wraps them in a clean API without losing platform-native behavior.

Next Steps

This tutorial covered the fundamentals — windows, themes, layouts, components, events, and file I/O. From here, you can:

From Tutorial to Production

The note-taking app in this tutorial is intentionally simple. Real-world Bravura applications include data dashboards, admin panels, audio editors, scientific tools, and customer-facing software used by thousands. The same components scale from prototype to production.

Python has always been one of the fastest languages to prototype with. With Bravura SDK, the prototype is the production app. No rewrite in another framework, no compromises on visual quality, no "it works but it looks like a developer made it" disclaimers. Build once, ship something you're proud of.

Ready to Build?

Get started with Bravura SDK and see what professional Python desktop development looks like.

Explore Bravura SDK
WS

Wigley Studios Team

Building tools for developers who demand more from their stack.

Previous: PromptUI in Action Next: DearPyGui vs Bravura