Package: uglypty
UglyPTYUglyPTY is an extensible graphical terminal emulator built with Python and PyQt6. It provides a user-friendly interface for managing and establishing SSH connections, with some great productivity of features. This is the base product of many Network Engineering automation tools currently in development. A plugin based system for adding features to the application is included in this release, along with some basic plugin examples. The best network automation tools are in python ... UglyPTY now has many built in tools from Desktop TFTP & SFTP Servers built in for code upgrades, to highly concurrent data collection automation.Why?The whole point of the UglyPTY project is not to solve every problem, but to provide a platform based on the tool network engineers use most - an SSH Terminal. Developers like text editors with add-on capabilites, this is just the equivilent for CLI focused engineers. Nothing in these plugins is supper special, I just wanted to provide enough example plugins that others could create there own tools. Both the usable .whl files, as well as original source code are included in the repo. And hopefully you enjoy using the base SSH application if thats all you need. You don't have to load any plugins to use UglyPTY, but remember, these are all beta tools, be careful ;)Python needed a native SSH GUI TerminalThis application does NOT wrap a backend web server like Webssh. It DOES use xterm.js for terminal emulation.Note: This is a VERY beta release with a lot of functionality.Latest Changes: I am still adding capabilitiesExpanded FTP/SFTP support. Much better performance across a WAN for those network OS upgrades/backupsNew SNMP Interface Monitoring, on demand! v2 and v3 supportFeaturesSession ManagerLeverage the sessions you use in your Terminal environment in your automation scripts (examples included).Create, edit, or delete sessions with specific settings.Supports password and key based authentication.You can have as many device tree (i.e. session) files to organize as you like. Files are basic YAML.Credentials ManagerSafely manage your user credentials.Passwords are encrypted.Fetch all credentials or a specific credential by ID from a SQLite database (settings.sqlite).Builtin TFTP and SFTP serversFor device firmware upgrades, config backups etc.When your in the field and you need to upgrade that box now.TCP Port scanner liteFor quick tests of ACL's, check for unwanted network device services like telnet or httpIP Subnet CalculatorFor the obviousLDAP Test ToolFor authentication testsIncludes searchFull O,OU tree view (Container objects only), just to help you find your way around the treeNetbox ExporterTo quickly populate your sessions.yaml file with data from NetboxDiff ToolTo quickly compare configuration or output differencesGrep GUIA friendly grep tool for all the data you collectNetmiko Concurrent CLI CollectorQuickly issue show commands against 100's of network devices. I've hit over 1000 in less than 10 minutes.The data will be saved in both raw text (see the grep tool), and a structured yaml file with additional device meta data for processing laterGreat for audits, or just searching for ckt id'sYAML BrowserAll those structured yaml files with collected data? This will search, browse and view them for youThemed ViewsMultiple theme modes - light, dark, light-dark, and dark-light.Network Maps!Based on CDP, but soon for LLDP as well. Tool crawls the network via cdp and then maps it to a graphml file.Uses N2G (Need to Graph), from the creator of TTP!Filters to support setting bounds on the crawling. (an issue if you have point-to-point WAN ckts)Built-in ToolsInstallationTested with Python 3.9.13 for Windows in venv, and Ubuntu 22.04 with Python 3.10. Other versions might work.Use PyPi unless you want to contribute.Usepipwith an activated venv:pipinstalluglyptyTo start the application, navigate to the activated virtual directory, local keys, your session database, and log files will be here:python or pythonw -m uglypty
python -m uglypty  --plugins-enabledUglyPTY PluginsSome plugins have been moved to the main application under "Tools". To use a plugin, download its.whlfile and save it in a./wheelsdirectory where your UglyPTY application is installed. You will have to create this folder. Here is a list of just some of the plugins:1. Ace Code Editor:  uglyplugin_ace-0.1.0-py3-none-any.whl
2. Dynamic Front End for Click based scripts: uglyplugin_click-0.1.0-py3-none-any.whl
7. CMD, Powershell and WSL2 Tabbed terminals: uglyplugin_terminal-0.1.0-py3-none-any.whlDownload More PluginsYou can find more about UglyPTY's wheel based plugins fromgithub.
You can download more.whlplugins fromwheels.catalog.yamlExplainedOnly 2 example plugins are pre-entered in the pluging catalog. Thecatalog.yamlfile contains metadata for all available plugins. UglyPTY's Plugin Manager reads this file, so if you download additional plugins, you will have to edit this file to get them installed and registered with the application. Each plugin has its entry defined by the following keys:name: The human-readable name of the plugin.package_name: The name used to register the plugin as a Python package. This is the name you would use if you were to install the plugin using pip.description: A brief description of what the plugin does.import_name: The Python import statement that would be used to load the plugin's main class or function.version: The version number of the plugin.source_type: The type of installation source, currently only supports "wheel".wheel_url: The path to the.whlfile for the plugin, relative to the./wheelsdirectory.Example entry:-name:"UglyAceEditor"package_name:"ugly_ace_editor"description:"AnAcebasededitorwithsomeuniquefeatures."import_name:"uglyplugin_ace.ugly_ace.QtAceWidget"version:"0.1.0"source_type:"wheel"wheel_url:"./wheels/uglyplugin_ace-0.1.0-py3-none-any.whl"A Note about Xterm.jsXterm.js is a front-end component written in TypeScript that lets applications bring fully-featured terminals to their users in the browser. It's used by popular projects such as VS Code, Hyper and Theia.In PyQt6, xterm.js is implemented in QT's WebEngine, and chromium based widget. There is of course overhead associated with this approach. If you are interested in how something like UglyPTY could be implemented more natively using a graphics approach, take a look at the early development being done on "UglierPTY" here:https://github.com/scottpeterman/UglierPTYFeaturesTerminal apps just work: Xterm.js works with most terminal apps such asbash,vim, andtmux, including support for curses-based apps and mouse events.Performant: Xterm.js isreallyfast, it even includes a GPU-accelerated renderer.Rich Unicode support: Supports CJK, emojis, and IMEs.Self-contained: Requires zero dependencies to work.Accessible: Screen reader and minimum contrast ratio support can be turned on.A special thanks to those whose efforts this tool is built on (shoulders of giants and all that)Qthttps://www.qt.io/PyQt6https://www.riverbankcomputing.com/software/pyqt/Yes I could have used PySide6, and maybe will add that. I've used PyQt to fix my own problems for years, and I just love it!Netmiko  Kirk - you are awesome! (Network Engineers - his classes are awesome as well)Paramiko  Most don't know just how much automation has been enabled by this project (Ansible, looking at you over the years)TTP  Very few outside the network automation space know of this, but it transformed the ability to automate legacy network equipment, much of which still wont do a simple "show blah | json". I have literally worked with it since ver 0.0.1 - this guy is amazing:https://github.com/dmulyalin/ttpScreenshotsHere are some snapshots of UglyPTY in action:Here are some snapshots of UglyPTY-Plugins in action:Enjoy using UglyPTY!Package Distribution# Create a source distribution and a wheelpythonsetup.pysdistbdist_wheel# Set up a new virtual environmentpython-mvenvtest_env# Activate the virtual environmentsourcetest_env/bin/activate# On Linux/Mactest_env\Scripts\activate# On Windows# Install the wheelpipinstalldist/uglypty-0.1-py3-none-any.whl# Test your scriptpythonorpythonw-muglypty# Use `twine` to upload your package to PyPI:twineuploaddist/*