Skip to main content

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.

Requires Python 3.14+.

Install

pip install glimpse-applet-sdk
# or with uv:
uv add glimpse-applet-sdk

The distribution is named glimpse-applet-sdk on PyPI; the import name is glimpse_sdk.

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

from glimpse_sdk import (
    Applet,
    AppletState,
    Box,
    Button,
    Hero,
    Icon,
    Label,
    RenderResult,
    StatusItem,
    click,
)


@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,
                )
            ],
            tree=Box.vertical(
                [
                    Hero(
                        icon=Icon.name("software-update-available-symbolic"),
                        title="Deploy",
                        subtitle=self.state.version,
                    ),
                    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

glimpse_applet_sdk-0.2.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

glimpse_applet_sdk-0.2.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file glimpse_applet_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: glimpse_applet_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for glimpse_applet_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fa8ade3f81bd6b2d09f67adbc098fbc6ce7aede1f3c32cd02fc6257d75cc13a9
MD5 986e5b91304dbe0a5135a298b68747a2
BLAKE2b-256 142d5c16cc27416b6558f1d87bc26f844cdaef72217b11ed854941be776a48b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for glimpse_applet_sdk-0.2.0.tar.gz:

Publisher: release-sdk-py.yml on alex-oleshkevich/glimpse

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file glimpse_applet_sdk-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for glimpse_applet_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fefcaf2af68c882a086cdddd278914bb08f5593f63a2cc667a5ce29b6f22d27b
MD5 a8bf00e087f014677963163984bfc016
BLAKE2b-256 3bd7fe8d98b0236b158d1078b676f5f52c8b78ac73f4c527e8880b2b29e325a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for glimpse_applet_sdk-0.2.0-py3-none-any.whl:

Publisher: release-sdk-py.yml on alex-oleshkevich/glimpse

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page