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

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

Built distribution (wheel)

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

Total release size: 148.3 kB

Release files / nanohub_uidl-0.1.14.tar.gz

Download URL nanohub_uidl-0.1.14.tar.gz
Size 69.5 kB
Tags Source
SHA-256 checksum
How to use checksums
10de5bb460e1ee842936158189865e3c3e10ae1389f3099efe23a47358e84da0
BLAKE2b-256 checksum
How to use checksums
80596350e85ed9cc805c5791fcc953e0f569669382f1d2204320d0c1ef6ba147
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.14-py3-none-any.whl

Download URL nanohub_uidl-0.1.14-py3-none-any.whl
Size 78.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01976cd8d37c765a1d35daa05345fa70f449081230bb60950654b3902ff6ebb8
BLAKE2b-256 checksum
How to use checksums
d0e622dc67d5c59403f2b5a8a2ad189a473cb18ddfeb95d18553ee110c3d157c
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.14

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