zf School SDK for Python
Project description
新版正方系统 Python SDK。(支持滑块验证码与常规验证码,如果觉得还不错,给个小星星趴~⭐)
测试环境
- Python == 3.8
- 默认验证码识别方式: CPU
Usage
$ pip install school-sdk
# or
$ pip install zf-school-sdk
from school_sdk import SchoolClient
# 先实例化一个学校,再实例化用户
school = SchoolClient("172.16.254.1")
user:UserClient = school.user_login("2018xxxxx", "xxxxxxxx")
course = user.get_schedule(year=2020, term=2)
print(course)
使用示例参见 examples
Api Function
Api | Description | Argument |
---|---|---|
user_login | 登陆函数 | account, password |
get_schedule | 课表查询 | year, term |
get_score | 成绩查询 | year, term |
get_info | 获取个人信息 | None |
refresh_info | 刷新个人信息 | None |
check_session | 检查session并其失效后重登录 | None |
School-SDK Options
Option | Default | Description |
---|---|---|
host | 不存在默认值 | 教务系统地址(必填 ) |
port | 80 | 端口号 |
ssl | False | 教务系统是否使用https |
name | None | 学校名称 |
exist_verify | False | 是否存在验证码 |
captcha_type | captcha | 验证码类型(常规 或 滑块) |
retry | 10 | 登录重试次数 |
lan_host | None | 内网地址 |
lan_port | 80 | 内网地址端口 |
timeout | 10 | 全局请求延时 |
url_endpoints | None | 地址配置 |
相关项目
- 新版正方教务系统: https://github.com/Farmer-chong/new-school-sdk
- 旧版正方教务系统: https://github.com/dairoot/school-api
- SDK的Flask扩展: https://github.com/Farmer-chong/flask-school
Project details
Release history Release notifications | RSS feed
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 zf_school_sdk-1.4.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf2fe73ff9528b7e45277e9ac1b4ac7e04c8a70e46caea6c577d073c5a359f47 |
|
MD5 | 362eecae889c99f84a5a15b5986778eb |
|
BLAKE2b-256 | 2025cb48c9961afce6163b4b533bd1d02e1607e0c6ff5459f0add54e6c9fae41 |