Typed async framework for Glimpse exec applets
Project description
Glimpse Applet Python SDK
Small async framework for building Glimpse exec applets without touching stdio or raw JSON.
Goals
- typed protocol models
- typed widget builders
- async runtime
- decorator-based callbacks
- state-driven rendering via
await self.set_state(...)
Example
from dataclasses import dataclass, field
from glimpse_sdk import (
Applet,
AppletState,
Box,
Button,
Hero,
Icon,
InputEvent,
Label,
RenderResult,
StatusItem,
click,
input,
)
@dataclass
class DeployState(AppletState):
version: str = "2026.04.07"
status: str = "Ready"
class DeployApplet(Applet[DeployState]):
def initial_state(self) -> DeployState:
return DeployState()
async def render(self) -> RenderResult:
return RenderResult(
status=[
StatusItem(
id="deploy",
icon=Icon.name("software-update-available-symbolic"),
label=self.state.status,
)
],
hero=Hero(
icon=Icon.name("software-update-available-symbolic"),
title="Deploy",
subtitle=self.state.version,
),
tree=Box.vertical(
[
Label("Version"),
Button(id="deploy_now", label="Deploy now"),
]
),
)
@click("deploy_now")
async def on_deploy(self, _event) -> None:
await self.set_state(status="Deploying")
if __name__ == "__main__":
DeployApplet().run()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file glimpse_applet_sdk-0.1.0.tar.gz.
File metadata
- Download URL: glimpse_applet_sdk-0.1.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac6e768f1e7c42e009598e1c28c87f64ab9c400d94d864234c49d9fd8b7143d4
|
|
| MD5 |
f533ebe991db626e67413cbb2c398ac5
|
|
| BLAKE2b-256 |
eba74d1fe19b8b249b4ad20459ae7dd875bc7233027c61da97b01e4f26875bfb
|
File details
Details for the file glimpse_applet_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: glimpse_applet_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.10 {"installer":{"name":"uv","version":"0.11.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f06aae06d33c8cb07cee5ae898293c69289acac23d0533a1e35af4a6b554a49b
|
|
| MD5 |
a7255e48cada436f53886057d83e7903
|
|
| BLAKE2b-256 |
454e89f5a469b030def872785744e88db40f4a8b50bd30af1dbe5186b0b73e24
|