正方系统 Python SDK。
Usage
$ pip install School-Api
from school_api import SchoolClient
# 先实例化一个学校,再实例化用户
school = SchoolClient(url='http://210.38.137.126:8016')
user = school.user_login('2014xxxx', 'xxxx')
schedule_data = user.get_schedule()
print(schedule_data)
Api Function
| Api | Description | Argument |
|---|---|---|
| user_login | 登陆函数 | account, password, user_type=1, use_cookie_login=True |
| get_schedule | 课表查询 | schedule_year=None, schedule_term=None, schedule_type=None |
| get_score | 成绩查询 | score_year=None, score_term=None, use_api=0 |
| get_info | 用户信息查询 | |
| get_place_schedule | 教学场地课表查询(可用于空教室查询) | campus_list=None, building_list=None, classroom_type_list=None, classroom_name_list=None, filter_campus_list=None, filter_building_list=None, filter_classroom_type_list=None |
School-Api Options
| Option | Default | Description |
|---|---|---|
| url | 不存在默认值 | 教务系统地址(必填) |
| name | NULL | 学校名称 |
| code | NULL | 学校英文缩写 |
| login_url_path | /default2.aspx | 登录地址路径 |
| lan_url | None | 内网地址 |
| exist_verify | True | 是否存在验证码 |
| use_ex_handle | True | 是否使用异常处理 |
| priority_proxy | False | 是否优先使用代理 |
| proxies | None | 代理地址 |
| url_path_list | 略 |
学校接口地址列表 |
| class_time_list | 略 |
上课时间列表 |
| timeout | 10 | 全局请求延时 |
| session | MemoryStorage | 缓存工具(推荐使用redis) |
Metadata
Release files for School-Api 1.5.7
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 |
|---|---|---|---|---|
| School-Api-1.5.7.tar.gz | 153.8 kB | Without provenance | Details for School-Api-1.5.7.tar.gz |
Release files / School-Api-1.5.7.tar.gz
| Download URL | School-Api-1.5.7.tar.gz |
|---|---|
| Size | 153.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7dca877ace95b12d28054401a7802a79e3abfb757c4f177415d6fc99d214d724
|
|
BLAKE2b-256 checksum How to use checksums |
a26a34d13a16c0c83113982014ee5370fbc1c7c299a553ad8ac6f73add1687dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5
|
Security for School-Api 1.5.7
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.