Skip to main content

Tsinghua University Network (tunet) login and logout tools

Project description


TUNET is a python tool to login and logout Tsinghua University Network (tunet).

To use this do as below:

# install from pip
pip install tunet

# import tunet package
import tunet

# set login/logout options
options = {
'name': 'user_name', # required, 'user_name' and 'user_name@tsinghua' are for access public internet and tunet, respectively
'pwd': 'user_password', # required, password for tunet account 'user_name'
'ip': '' # optional, the ip you want to authenticate, and default is the client ip

# do login
tunet.login(options['name'], options['pwd'], options['ip'])
# Login is successful.

# do logout
tunet.logout(options['name'], options['ip'])
# Logout is successful.

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 tunet, version 2.0.2
Filename, size File type Python version Upload date Hashes
Filename, size tunet-2.0.2-py2.py3-none-any.whl (4.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page