scic-webgui
Generic, ready-to-use web application for scic-framework.
scic-webgui discovers the SCIC tree, renders contexts and executables, generates parameter forms, executes functions and presents validated results. It ships as a Python package with a self-contained SPA: no Node.js build is required by applications consuming it.
Features
- Generic navigation generated from
SCIC.export_tree(). - One independent
SCICSessionper browser session. - Dynamic forms from
Executable.parametersschemas. - Structured execution through
/invokeand textual execution through/execute. - Built-in responsive light and dark themes.
- Theme packages discovered through Python entry points.
- JSON-safe result serialization.
- Embeddable FastAPI application.
- Generic command-line launcher.
- No frontend framework or npm dependency required at runtime.
Install
pip install scic-webgui
Basic use
from scic_webgui import SCICWebGUI, WebGUIConfig
webgui = SCICWebGUI(
scic,
WebGUIConfig(
application_name="OpenShell Manager",
application_description="OSAM administrative interface",
host="127.0.0.1",
port=8080,
default_variant="system",
open_browser=True,
),
)
webgui.run()
The FastAPI application can also be mounted or served by an existing process:
webgui = SCICWebGUI(scic)
app = webgui.app
Generic launcher
Expose a SCIC instance or a zero-argument factory:
# application.py
application = build_scic()
Run:
scic-webgui application:application --name "My application" --port 8080 --open-browser
Equivalent:
python -m scic_webgui application:application
HTTP API
| Method | Endpoint | Purpose |
|---|---|---|
| GET | /api/scic/v1/tree |
Export complete SCIC tree |
| GET | /api/scic/v1/context |
Current browser session context |
| GET | /api/scic/v1/describe?path=... |
Describe a resource |
| POST | /api/scic/v1/invoke |
Invoke an executable with textual arguments |
| POST | /api/scic/v1/execute |
Execute a complete textual instruction |
| POST | /api/scic/v1/navigate |
Navigate to a context |
| POST | /api/scic/v1/back |
Move to the parent context |
| POST | /api/scic/v1/reset |
Return to root |
| GET | /api/scic/v1/themes |
Discover theme packages |
The browser stores the X-SCIC-Session identifier returned by the server. The registry remains shared while navigation state stays isolated.
Theme packages
A theme package is installed like any other Python dependency and exports a ThemePackage through an entry point:
[project.entry-points."scic_webgui.themes"]
openshell = "scic_webgui_theme_openshell:theme_package"
from scic_webgui import Theme, ThemePackage
light = Theme(
identifier="openshell-light",
name="OpenShell Light",
variant="light",
tokens={
"background": "#f4f6f9",
"surface": "#ffffff",
"text": "#152033",
"primary": "#3f51e8",
# Include the complete token set for best results.
},
)
theme_package = ThemePackage(
identifier="openshell",
name="OpenShell",
themes=(light, dark),
)
A package can provide light, dark, or both variants. Themes only define visual tokens; they do not alter application logic.
Development
chmod +x check.sh publish.sh
./check.sh
Publish to TestPyPI:
./publish.sh --test
Publish to PyPI:
./publish.sh
Current scope
Version 0.1.0 is intentionally focused on the generic application shell. Authentication, authorization, remote SCIC clients, streaming progress, specialized views and custom widget entry points are extension points for later versions.
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 scic_webgui-0.1.0.tar.gz.
File metadata
- Download URL: scic_webgui-0.1.0.tar.gz
- Upload date:
- Size: 16.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98396895ec0f23e3ab9c20eb33ba6c453b022b13299259d42ff009b29f78e2cd
|
|
| MD5 |
14fe4aee815d85f862768ea2da90c242
|
|
| BLAKE2b-256 |
a5bb4e822bd82c601caa1a62b0e9bdf2bae42c09b8350e639db327828fad7bbb
|
File details
Details for the file scic_webgui-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scic_webgui-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdb007b6e95232d7f672e267fdd9fb8005b5cab90796a425d623fc058f99abf8
|
|
| MD5 |
1466a337a2bb2e32989b1a18334ac987
|
|
| BLAKE2b-256 |
9d41ac6c379416888731711a55ba30e89605b3fe2840be74270bdcb794690dc5
|