Skip to main content

zf School SDK for Python

Project description

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

Downloads python3 license stars forks

在线文档

支持的登录/验证码方式

  • 帐号密码登录
  • 滑块验证码登录
  • 图形验证码登录
  • cookie 登录(用于扫码登录等场景)

测试环境

  • 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

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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: 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 school-sdk-1.6.0.tar.gz
Algorithm Hash digest
SHA256 1a331bbcf3041cb84038283b1341f6d25613e886458a4c48373669c4ff47ecc7
MD5 5354595c473eb870c77ba2af615ec30f
BLAKE2b-256 a7025b1bafc67867b4433b0d0b7889e5bef4a418548a3763eb869598c7b65d03

See more details on using hashes here.

File details

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

File metadata

  • Download URL: school_sdk-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 38.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for school_sdk-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 61a14fff19a266670c1fcd099bd056f9acc2c553f0a73e0f9caa747d481efd92
MD5 f4562123acb0758892701f1cee77a547
BLAKE2b-256 98aa1cdd531f030b2003c8ebff7de1fe2d86c94e850565028f67093ed3fa7dc1

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