Package: tlnetcard-python
tlnetcard_pythonWelcome to tlnetcard_python! tlnetcard_python is a Python 3 API for the TLNET Supervisor web interface which is used with Tripp Lite'sTLNETCARD, and aims to provide similar functionality in a scriptable format. This API makes frequent use of therequestsmodule, and I recommend it for use in any projects which involve making HTML requests in Python. A second thank you goes to the people behind theseleniumandPySNMPmodules respectively, of which this API makes intermittent use.InstallationThis package is installed using pip. If you do not have pip installed on your system, you can install it by downloadingget-pip.pyand running that python file (Windows/MacOS/Linux/BSD), or you can run the following command in terminal (Linux/BSD):sudoaptinstallpython3-pipIf you're using brew for MacOS, you can install pip (along with the rest of Python 3) using brew:brewinstallpython3Note: The creator of this software does not recommend the installation of python or pip using brew, and instead recommends that pip be installed usingget-pip.py, or that Python 3.5+ be installed using the installation candidates found onpython.org, which include pip by default.Using Pip to install from PyPiFetching this repository from PyPi is the recommended way to install this package. From your terminal, run the following command:pip3installtlnetcard-pythonAnd that's it! Now you can go right ahead to the quick-start guide!Installing from SourceInstalling this package from source is the only way to guarantee you're getting the latest, bleeding-edge code. If you're installing from source, I assume you already know the risks (stability is not guaranteed, stability isnotguaranteed, etc.). Assuming you have git installed, installation from source can be accomplished easily (MacOS/Linux/BSD):gitclonehttps://github.com/EGuthrieWasTaken/tlnetcard_python.gitcdtlnetcard_python/
pip3install.If, for whatever reason, you have your heart set on not installing git on your system (who installs from source but won't use git?), you can also install bydownloading the zip filefor this project, unzipping it, and starting a terminal/cmd session in the unzipped directory. Then, run the following command (Windows/MacOS/Linux/BSD):pip3install.Of course, there is no need to use pip to install. In lieu ofpip3 install .for either of the above methods, you could substitutepython3 setup.py install.And that's it! Now you can go right ahead to the quick-start guide!Quick-Start GuideAfter installation, you can get started with using the module immediately! You will first need to create a login object to initiate an authenticated session with TLNET Supervisor, and then you may run any other commands you wish, but understand that every action object must be initialized with the login session. An example is below:importtlnetcard_python# Creating authenticated session.card=tlnetcard_python.Login("admin","password","10.0.0.100")# Do whatever configuration is needed here.batch_config=tlnetcard_python.system.administration.BatchConfiguration(card)batch_config.upload_system_configuration("/home/sampleUser/sys_config.txt")# Closing session.card.logout()Note that this process could be placed into a loop to configure multiple systems. Additionally, using theset_host()method allows for the same login object to be used with multiple hosts. The password will still need to be provided for each host change unless thesave_passwdflag was set toTruewhen the object was initialized. See example below:fromtlnetcard_pythonimportLoginfromtlnetcard_python.system.administrationimportBatchConfigurationhosts=['10.0.0.100','10.0.0.101','10.0.0.103',...]card=Login("admin","password",save_passwd=True)forhostinhosts:card.set_host(host)batch_config=BatchConfiguration(card)batch_config.upload_system_configuration("/home/sampleUser/sys_config.txt")card.logout()Note: the creator(s) of this software will not be liable for any unintended results from using any tlnetcard_python software, including lost or stolen passwords. Please use options such assave_passwdwith caution. For complete information regarding liability, see theLicense.DocumentationDocumentation for this project can be found in the GitHub Repository. Each folder has it's own documentation for the class files it contains. The documentation tree is below:tlnetcard_pythonMonitorInformationUPS PropertiesBattery ParametersIn/Out ParametersIdentificationStatus IndicationShutdown AgentHistoryEvent LogData LogConfigureEnvironmentInformationConfigurationAboutInformationDeviceManagementReactionConfigureControlWeekly ScheduleSpecific ScheduleEvent LevelSystemAdministrationUser ManagerTCP/IPWebConsoleFTPTime ServerSyslogBatch ConfigurationUpgradeNotificationSNMP AccessSNMPv3 USMSNMP TrapMail ServerWake On LANModbus TCP