Skip to main content

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.1.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nanohub-uidl 0.1.15
File Size Uploaded Provenance Actions
nanohub_uidl-0.1.15.tar.gz 69.5 kB Without provenance Details for nanohub_uidl-0.1.15.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nanohub-uidl 0.1.15
File Interpreter ABI Platform Actions
nanohub_uidl-0.1.15-py3-none-any.whl Python 3 none any Details for nanohub_uidl-0.1.15-py3-none-any.whl

Total release size: 148.3 kB

Release files / nanohub_uidl-0.1.15.tar.gz

Download URL nanohub_uidl-0.1.15.tar.gz
Size 69.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2cf2f786a22b4dee2a21161ecf7557c80d73d20e914c693f9e947f8791ad23d0
BLAKE2b-256 checksum
How to use checksums
572562090176cdf8d478828252c647f24c30813b5123c65dc9272747644b4fe4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.11

Release files / nanohub_uidl-0.1.15-py3-none-any.whl

Download URL nanohub_uidl-0.1.15-py3-none-any.whl
Size 78.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f4f524fe60b056c580a5f87e53cdf607b6082607044bfe688d2fa7b8a534ae2
BLAKE2b-256 checksum
How to use checksums
0743f0cdd83c1732cb8b1f3967344612e43181e4b695f5c84a96a86434e39f78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.11

Security for nanohub-uidl 0.1.15

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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