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 2.0.2

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 2.0.2
File Size Uploaded Provenance Actions
nanohub_uidl-2.0.2.tar.gz 78.6 kB Without provenance Details for nanohub_uidl-2.0.2.tar.gz

Built distribution (wheel)

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

Total release size: 166.4 kB

Release files / nanohub_uidl-2.0.2.tar.gz

Download URL nanohub_uidl-2.0.2.tar.gz
Size 78.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ffa0f2177597847dd9646b8a1b790a040f9078a2e77b4de36f80311f58540b0e
BLAKE2b-256 checksum
How to use checksums
478a51074ed39faec0a4419587969edb95d709342ac8330b3781331c022ea92a
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-2.0.2-py3-none-any.whl

Download URL nanohub_uidl-2.0.2-py3-none-any.whl
Size 87.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c662725b60c60c9976b9b628acaf6d9cc54a29649fa05adee6e5f4f5febc9e4
BLAKE2b-256 checksum
How to use checksums
dcd850e01a0722fa03ee26f0071352fe08ec13bf60820e1b71b8573a82f4e5ba
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 2.0.2

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