Skip to main content

tlnetcard_python Build Status PyPI PyPI - License PyPI - Status

Welcome to tlnetcard_python! tlnetcard_python is a Python 3 API for the TLNET Supervisor web interface which is used with Tripp Lite's TLNETCARD, and aims to provide similar functionality in a scriptable format. This API makes frequent use of the requests module, 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 the selenium and PySNMP modules respectively, of which this API makes intermittent use.

Installation Downloads PyPI - Python Version PyPI - Format

This package is installed using pip. If you do not have pip installed on your system, you can install it by downloading get-pip.py and running that python file (Windows/MacOS/Linux/BSD), or you can run the following command in terminal (Linux/BSD):

sudo apt install python3-pip

If you're using brew for MacOS, you can install pip (along with the rest of Python 3) using brew:

brew install python3

Note: The creator of this software does not recommend the installation of python or pip using brew, and instead recommends that pip be installed using get-pip.py, or that Python 3.5+ be installed using the installation candidates found on python.org, which include pip by default.

Using Pip to install from PyPi

Fetching this repository from PyPi is the recommended way to install this package. From your terminal, run the following command:

pip3 install tlnetcard-python

And that's it! Now you can go right ahead to the quick-start guide!

Installing from Source

Installing 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 is not guaranteed, etc.). Assuming you have git installed, installation from source can be accomplished easily (MacOS/Linux/BSD):

git clone https://github.com/EGuthrieWasTaken/tlnetcard_python.git
cd tlnetcard_python/
pip3 install .

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 by downloading the zip file for this project, unzipping it, and starting a terminal/cmd session in the unzipped directory. Then, run the following command (Windows/MacOS/Linux/BSD):

pip3 install .

Of course, there is no need to use pip to install. In lieu of pip3 install . for either of the above methods, you could substitute python3 setup.py install.
And that's it! Now you can go right ahead to the quick-start guide!

Quick-Start Guide

After 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:

import tlnetcard_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 the set_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 the save_passwd flag was set to True when the object was initialized. See example below:

from tlnetcard_python import Login
from tlnetcard_python.system.administration import BatchConfiguration
hosts = ['10.0.0.100', '10.0.0.101', '10.0.0.103', ...]

card = Login("admin", "password", save_passwd=True)
for host in hosts:
    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 as save_passwd with caution. For complete information regarding liability, see the License.

Documentation

Documentation 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:

Metadata

Release files for tlnetcard-python 0.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tlnetcard-python 0.3.3
File Size Uploaded Provenance Actions
tlnetcard_python-0.3.3.tar.gz 26.6 kB Without provenance Details for tlnetcard_python-0.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tlnetcard-python 0.3.3
File Interpreter ABI Platform Actions
tlnetcard_python-0.3.3-py2-none-any.whl Python 2 none any Details for tlnetcard_python-0.3.3-py2-none-any.whl

Total release size: 91.2 kB

Release files / tlnetcard_python-0.3.3.tar.gz

Download URL tlnetcard_python-0.3.3.tar.gz
Size 26.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e10b550fd7647072c1bd249119a3b67e591457995d33ef2c0789951cb8693db8
BLAKE2b-256 checksum
How to use checksums
a4a65ef71b6b260d06cf0d7a2d04ce93f172bdcf4b429d82b3d328e4f70a1441
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.6

Release files / tlnetcard_python-0.3.3-py2-none-any.whl

Download URL tlnetcard_python-0.3.3-py2-none-any.whl
Size 64.6 kB
Tags Python 2
SHA-256 checksum
How to use checksums
6c3e22c765026d191ea907b50f6c3971fff7a50b6ea3152e7fb55231b734c7e7
BLAKE2b-256 checksum
How to use checksums
2dbfdbcff694eeaf40f206fccfa0601a72460428ac60a1c5f50cda9b85b41631
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.6

Security for tlnetcard-python 0.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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