Difference between revisions of "Nicegui widgets"

From BITPlan Wiki
Jump to navigation Jump to search
Line 29: Line 29:
 
* remote debugging support
 
* remote debugging support
  
 +
== remote debugging support ==
 +
[https://pypi.org/project/pydevd/pydevd] remote debugging is supported
 +
=== relevant command line arguments ===
 +
<source lang='bash'>
 +
--debugServer DEBUGSERVER
 +
                        remote debug Server
 +
  --debugPort DEBUGPORT
 +
                        remote debug Port
 +
  --debugRemotePath DEBUGREMOTEPATH
 +
                        remote debug Server path mapping - remotePath - path
 +
                        on debug server
 +
  --debugLocalPath DEBUGLOCALPATH
 +
                        remote debug Server path mapping - localPath - path on
 +
                        machine where python runs
 +
 +
</source>
 +
=== example remote debug session start ===
 +
using https://github.com/BITPlan/diagrams project as an example
 +
 +
The remote IDE environment is an Eclipse workspace on a Mac in this example so /Users/wf/Documents/pyworkspace is the root of the source code tree remotely
 +
The local environment is an Ubuntu server machine where the code resides in /home/wf/source/python
 +
 +
<source lang='bash'>
 +
# tunnel port 5678
 +
ssh -R 5678:localhost:5678 server
 +
cd source/python/diagrams
 +
git pull
 +
pip install .
 +
# check that the remote debugging command line arguments are available
 +
diagrams -h
 +
# start your remote debugging in the IDE first
 +
diagrams -s --debugServer localhost --debugRemotePath=/Users/wf/Documents/pyworkspace/ --debugLocalPath=/home/wf/source/python/ --debug
 
= Links =
 
= Links =
 
https://nicegui.io/
 
https://nicegui.io/

Revision as of 08:30, 20 October 2023

OsProject

OsProject
id  nicegui_widgets
state  active
owner  WolfgangFahl
title  nicegui_widgets
url  https://github.com/WolfgangFahl/nicegui_widgets
version  0.0.22
description  nicegui widgets, tools and base classes
date  2023-09-22
since  2023-09-12
until  


Installation

pip install ngwidgets
# alternatively if your pip is not a python3 pip
pip3 install ngwidgets 
# local install from source directory of ngwidgets 
pip install .

upgrade

pip install ngwidgets  -U
# alternatively if your pip is not a python3 pip
pip3 install ngwidgets -U


Motivation

Standarize nicegui App appearance and add utilities and widgets

Features

  • background: BackgroundTaskHandler class to allow running long running tasks in a different thread with async/await
  • cmd: WebserverCmd class - makes a command line for single input webservers simpler
  • color_schema: ColorSchema class - allows to define color schemas by name e.g. "indigo()"
  • file_selector: FileSelector class - for selecting files from a tree structure such as a directory
  • input_webserver: InputWebserver skeleton class for a single input webserver
  • leaflet: leaflete class wraps https://leafletjs.com/ as a component
  • profiler: Profiler class measures time - especially when running tests
  • progress: Progressbar subclasses NiceguiProgressbar and TqdmProgressbar allow to use a tdqm or nicegui ui_linear_progress in an exchangeable/compatible way
  • webserver: NiceGuiWebserver class for a default webserver with header/menu/footer and some utility functions WebserverConfig to configure copyright/version links and default_port
  • users: Users class for user authentication/credential handling
  • remote debugging support

remote debugging support

[1] remote debugging is supported

relevant command line arguments

 --debugServer DEBUGSERVER
                        remote debug Server
  --debugPort DEBUGPORT
                        remote debug Port
  --debugRemotePath DEBUGREMOTEPATH
                        remote debug Server path mapping - remotePath - path
                        on debug server
  --debugLocalPath DEBUGLOCALPATH
                        remote debug Server path mapping - localPath - path on
                        machine where python runs

example remote debug session start

using https://github.com/BITPlan/diagrams project as an example

The remote IDE environment is an Eclipse workspace on a Mac in this example so /Users/wf/Documents/pyworkspace is the root of the source code tree remotely The local environment is an Ubuntu server machine where the code resides in /home/wf/source/python

<source lang='bash'>

  1. tunnel port 5678

ssh -R 5678:localhost:5678 server cd source/python/diagrams git pull pip install .

  1. check that the remote debugging command line arguments are available

diagrams -h

  1. start your remote debugging in the IDE first

diagrams -s --debugServer localhost --debugRemotePath=/Users/wf/Documents/pyworkspace/ --debugLocalPath=/home/wf/source/python/ --debug

Links

https://nicegui.io/