Skip to main content

A set of tools to run create Javascript Apps, using Teleporthq UIDL schema

Project description

Nanohub - UIDL

A set of tools to create Javascript apps to consume nanohub WS


pip install nanohub-uidl


from nanohub.uidl.teleport import TeleportProject, TeleportElement
from nanohub.uidl.material import MaterialContent
from nanohub.uidl.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(
    client_id = "MYAPPID",
    client_secret = "MYAPPSECRET",
    url = "",   
    open_state = STATE_LOGIN_OPEN
    { "type": "stateChange", "modifies": STATE_ERROR_OPEN, "newState": True},
    { "type": "stateChange", "modifies": STATE_ERROR_STATUS, "newState": '$e'},
]["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}]


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for nanohub-uidl, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size nanohub_uidl-0.0.2-py3-none-any.whl (50.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size nanohub-uidl-0.0.2.tar.gz (47.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page