ustc jwxt api, for study only
Project description
ustcjwxt-python-lib
ustc jwxt api, for study only
Installation
pip install ustcjwxt
Structure
- log
实现了一个简单的日志系统 - request_info
记录了一些 requests 需要使用的信息 - score
可以获取学生的成绩
当前功能: 获取成绩列表,计算 GPA / 加权平均分 / 算术平均分 - session 可以登录到教务系统,并提供 StudentSession 类,用于存储登录信息
Usage
simple sample
from ustcjwxt import log
from ustcjwxt.session import StudentSession
from ustcjwxt.score import *
log.set_logger_level('DEBUG')
# login
s = StudentSession()
s.login_with_password(sys.argv[1], sys.argv[2])
print(s.get_cookies())
# get basic info
print(s.get_student_info())
with open('avator.jpg', 'wb') as f:
f.write(s.get_student_avator())
# get score
gradeList = get_gradeList_all(s)
print(grade_calcGpa(gradeList))
print(grade_calcWeightedScore(gradeList))
print(grade_calcArithmeticScore(gradeList))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ustcjwxt-0.0.1.tar.gz
(6.4 kB
view details)
Built Distribution
File details
Details for the file ustcjwxt-0.0.1.tar.gz
.
File metadata
- Download URL: ustcjwxt-0.0.1.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8035a23d572a5796524f509187c6fd091a41687ef59db451ddd6ab747e64ba68 |
|
MD5 | ba1e86c41d9c2312737c4a01f9af8d80 |
|
BLAKE2b-256 | 4b7384ae751a72b11200029eddbf8981066d771cd7e6e51b152a3eefbf08d11e |
File details
Details for the file ustcjwxt-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: ustcjwxt-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e3e4d7f06e1e0540a42062854af83a1fecb6a215c7dd03297d92947f6c6cf67 |
|
MD5 | f3eddfaaaac04e796bce457528adcf79 |
|
BLAKE2b-256 | fecc8705234ba45afa0e0d8e3716cceec7da5cdf08427958306716a5518c93ee |