Tsinghua University Network (tunet) login and logout tools
Project description
# TUNET
TUNET is a python tool to login and logout Tsinghua University Network (tunet).
To use this do as below:
```python
# 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': '192.168.1.1' # 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.
```
TUNET is a python tool to login and logout Tsinghua University Network (tunet).
To use this do as below:
```python
# 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': '192.168.1.1' # 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.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for tunet-2.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 376fd00f3e6956f36fddf17b2bf09595dbe17cd84f4b636ceb650e2fa906b809 |
|
MD5 | 1a33bb44b20c096ace1d21da3d62ebef |
|
BLAKE2b-256 | 0ae9d2d5c4aa95b7ef71b1c5d015f397102f929006f1ec359e14cf44cf3c57c7 |