Skip to main content

scic-webgui 0.2.0

Adaptive and extensible WebGUI for scic-framework.

The library provides a complete application shell automatically, while allowing applications to replace individual input controls, result renderers, or complete resource views without changing SCIC or business services.

Capabilities

  • Responsive desktop/mobile application shell.
  • Navigation generated from the SCIC resource tree.
  • Adaptive forms for text, numbers, booleans, secrets, selections, JSON, and files.
  • Drag-and-drop JSON/text files.
  • Structured results: tables, property grids, lists, primitive values, and optional raw JSON.
  • Confirmation for destructive operations through SCIC metadata.
  • Light/dark theme packages.
  • Browser extension API for specialized interfaces.
  • FastAPI application ready to mount or serve.

Basic use

from scic_webgui import SCICWebGUI, WebGUIConfig

webgui = SCICWebGUI(
    scic,
    WebGUIConfig(
        application_name="OpenShell Manager",
        application_description="OSAM administrative interface",
        default_variant="dark",
    ),
)

app = webgui.app

Semantic metadata

metadata={
    "title": "Import Root Authority",
    "category": "Trust",
    "icon": "◈",
    "submit_label": "Import",
}

Parameter:

metadata={
    "label": "Public profile",
    "input_kind": "json-file",
    "accepted_extensions": [".json"],
}

Destructive operation:

metadata={
    "danger": "destructive",
    "confirmation_required": True,
}

Specialized extensions

Configure ES modules:

WebGUIConfig(
    extension_scripts=("/static/osam-webgui.js",),
)

Register a result renderer:

SCICWebGUI.registerResultRenderer(
  ({ resource, value }) =>
    resource?.path.endsWith("/services/list") && Array.isArray(value),
  ({ value }) => `<div class="service-list">...</div>`,
  100,
);

Register an input renderer:

SCICWebGUI.registerInputRenderer(
  ({ metadata }) => metadata.format === "uuid",
  ({ index }) => `<input class="control" name="arg-${index}" pattern="[0-9a-f-]+">`,
  100,
);

Replace a complete command view:

SCICWebGUI.registerView(
  "/osam/root-authority/list",
  async ({ resource, api, mount }) => {
    const response = await api("/invoke", {
      method: "POST",
      body: JSON.stringify({ path: resource.path, arguments: [] }),
    });
    mount.innerHTML = `<section>...</section>`;
  },
);

The generic renderer remains available as a fallback for every uncustomized resource.

Development

./check.sh

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scic_webgui-0.2.0.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

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

scic_webgui-0.2.0-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scic_webgui-0.2.0.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for scic_webgui-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3680f97442acb9b7d006b3d8ca0d0990628a7829affb597b363907d38cb56210
MD5 862602edf7661486c60a5aa7886ed5a6
BLAKE2b-256 15430f653b72f8ea2a66d48c0841871a1b18bb04a7da4530c3254d9d1ffb9bb4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scic_webgui-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for scic_webgui-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13dd7984f89058e18fcbc5d6ba0de1284cf6de1465adbcdfa5147ca05fbdceaf
MD5 9bd590391adbec7cdc8ac576e1cdc3f0
BLAKE2b-256 51ba392c71bdef2adf8e3f602952953e9fe4eb0ec37b37b2b57b40e8e8890442

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.0

2 files

This release

0.2.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page