SrunTool
深澜校园网操作类,本软件包内容仅在 NCWU 经过测试。
支持
- 登录
- 退出
- 查询当前用户信息
- 查询当前用户姓名
安装
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple sruntool
使用
from sruntool import SrunOperator, get_explain
if __name__ == '__main__':
account = '16612345678' # 账号
so = SrunOperator('192.168.0.170') # 创建operator
r = so.current_info() # 获取当前登录账号信息
if r['error'] == 'ok': # 已登录
print(r['user_name'], '已经在线')
exit(0)
r = so.login(account, '123456') # 登录
if r['ecode'] == 0:
print('登录成功', so.get_name(account))
# 不延时容易造成请求频繁
from time import sleep
sleep(1)
r = so.logout(account)
if r['ecode'] == 0:
print('下线成功')
else:
print('登录失败', get_explain(r['ecode']))
更新日志
感谢
Metadata
Release files for sruntool 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sruntool-0.1.4.tar.gz | 11.3 kB | Without provenance | Details for sruntool-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sruntool-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for sruntool-0.1.4-py3-none-any.whl |
Total release size: 22.9 kB
Release files / sruntool-0.1.4.tar.gz
| Download URL | sruntool-0.1.4.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1280aef073400f80bfe28a9884e0269e1f9904d77ed75e17006c03c7cb6967a3
|
|
BLAKE2b-256 checksum How to use checksums |
7960be78b00789160142edd7fd52f6548fde2d07cc6dd5250e08e83ba12adc94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / sruntool-0.1.4-py3-none-any.whl
| Download URL | sruntool-0.1.4-py3-none-any.whl |
|---|---|
| Size | 11.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
425fd33002735040d6b5efe7bbf9c790001f77abf15d694cab1b8861413109fe
|
|
BLAKE2b-256 checksum How to use checksums |
d3a731b6a91f5edb89892a6ca788c9a6faf7e6d8eaa07d76cfec1a2320da79b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for sruntool 0.1.4
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.