Nanohub - UIDL
UIDL Stats
| Latest Release |
|
| PyPI Downloads |
|
A set of tools to create Javascript apps to consume nanohub WS
Installation
pip install nanohub-uidl
Usage
from nanohubuidl.teleport import TeleportProject, TeleportElement
from nanohubuidl.material import MaterialContent
from nanohubuidl.auth import AUTH
Project = TeleportProject("My App")
Component = Project.root
Component.addStateVariable("myvariable", {"type":"boolean", "defaultValue": True})
STATE_LOADER_STATUS = "loader_status"
STATE_LOADER_OPEN = "loader_open"
STATE_ERROR_STATUS = "error_status"
STATE_ERROR_OPEN = "error_open"
Login, CLogin = Auth.Login(
Project,
Component,
client_id = "MYAPPID",
client_secret = "MYAPPSECRET",
url = "https://nanohub.org/api/developer/oauth/token",
open_state = STATE_LOGIN_OPEN
)
Login.content.events["onError"]=[
{ "type": "stateChange", "modifies": STATE_ERROR_OPEN, "newState": True},
{ "type": "stateChange", "modifies": STATE_ERROR_STATUS, "newState": '$e'},
]
Login.content.events["onAuth"] = [
{ "type": "stateChange", "modifies": STATE_ERROR_OPEN, "newState": False},
{ "type": "stateChange", "modifies": STATE_LOADER_OPEN, "newState": False},
]
Grid = t.TeleportElement(MaterialContent(elementType="Grid"))
Button= MaterialBuilder.Button(
title = "Reset Setting",
variant = "text",
onClickButton=[{ "type": "stateChange", "modifies": "parameters","newState": resetSettings}]
)
Grid.addContent(Button)
Component.addNode(Grid)
Project.buildReact("Myapp.html");
Metadata
Release files for nanohub-uidl 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nanohub_uidl-0.2.0.tar.gz | 66.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nanohub_uidl-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 141.7 kB
Release files / nanohub_uidl-0.2.0.tar.gz
| Download URL | nanohub_uidl-0.2.0.tar.gz |
|---|---|
| Size | 66.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52e0064563cb2671d0e866194b615f76767b19efc42b9c402a11bfb7027d3d85
|
|
BLAKE2b-256 checksum How to use checksums |
167a4b852fd5b93b37f31078683e4af30ce50f0db46ea0c5084c6ce3d29ce471
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / nanohub_uidl-0.2.0-py3-none-any.whl
| Download URL | nanohub_uidl-0.2.0-py3-none-any.whl |
|---|---|
| Size | 75.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cb37e3482b669a3c9cd052e38db701d09c088b1d2554ffe8b3aae146db29f918
|
|
BLAKE2b-256 checksum How to use checksums |
56b2f9a662177447bb1565c5efc8e11891862442f897441ffd2e0279371c73ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|