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.1.1.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.1.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: glimpse_applet_sdk-0.1.1.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.1.1.tar.gz
Algorithm Hash digest
SHA256 5cb873dd3f387dff648f5f8611e42e721d17a51f4d20667e49398d0991a95a9c
MD5 3824681ab7a50e55ded947489ab6e683
BLAKE2b-256 afca8a115a375d6be64a3edee7c4625886fb94b5d2fb2a1aee98b396a4f5eea8

See more details on using hashes here.

Provenance

The following attestation bundles were made for glimpse_applet_sdk-0.1.1.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.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for glimpse_applet_sdk-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aa42469114040ecfaba8fdc9d95320db10b40726e5990f16027f48a1d1360c43
MD5 d7a414f2693aa7a657758b75d4edca73
BLAKE2b-256 99e10fd51ddf8efc19c084d0cc3df518065adf6b8b8549bf996b2b0bab094497

See more details on using hashes here.

Provenance

The following attestation bundles were made for glimpse_applet_sdk-0.1.1-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