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

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.2.0
File Size Uploaded
nanohub_uidl-0.2.0.tar.gz 66.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nanohub-uidl 0.2.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.9

2 release files

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.12

1 release file

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

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