Skip to main content

zf School SDK for Python

Project description

新版正方系统 Python SDK。(支持自动识别、处理滑块验证码与常规验证码,如果觉得还不错,给个小星星趴~⭐)

Downloads python3 license stars forks

在线文档

测试环境

  • Python == 3.8
  • 默认验证码识别方式: CPU

Usage

$ pip install school-sdk
# or
$ pip install zf-school-sdk

如果机器内存不足,可以使用 pip --no-cache-dir 选项来安装 e.g: pip --no-cache-dir install 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 地址配置

相关项目

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

zf-school-sdk-1.6.0.tar.gz (27.0 kB view details)

Uploaded Source

Built Distribution

zf_school_sdk-1.6.0-py3-none-any.whl (38.0 MB view details)

Uploaded Python 3

File details

Details for the file zf-school-sdk-1.6.0.tar.gz.

File metadata

  • Download URL: zf-school-sdk-1.6.0.tar.gz
  • Upload date:
  • Size: 27.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for zf-school-sdk-1.6.0.tar.gz
Algorithm Hash digest
SHA256 e6fa6756e4584778a36e3073745020e58b3c7f0fe77ef7bcfeab656c50a8f383
MD5 e9725b803793ed8f6466d7ff22f2f9d4
BLAKE2b-256 2ee4439039f75f4c0dea25cf2117d9531d33c63747b3901a32c8a0e9acb02172

See more details on using hashes here.

File details

Details for the file zf_school_sdk-1.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for zf_school_sdk-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 82849974a825973f4f7e96b39d99f89093b4f7586b4d851c90bc25b74e98e683
MD5 dca8271a448e6796da0b0cbde1e7b4e7
BLAKE2b-256 293573497502bf30cae8fe5b9e5206de8bd36e068c550c232bd6999224e25627

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page