Skip to main content

正方系统 Python SDK。

Build Status Scrutinizer Code Quality Coverage Status Downloads

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)

线上测试接口

【阅读文档】 使用示例参见 examples

Api Function

Api Description Argument
user_login 登陆函数 account, password, user_type=1, use_login_cookie=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_endpoint 略 学校接口地址列表
class_time_list 略 上课时间列表
timeout 10 全局请求延时
session MemoryStorage 缓存工具(推荐使用redis)

Metadata

Release files for testu 0.0.7.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for testu 0.0.7.5
File Size Uploaded
testu-0.0.7.5.tar.gz 2.4 kB Details

Release files / testu-0.0.7.5.tar.gz

Download URL testu-0.0.7.5.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8fe0080c34dc547a469fe3cd300297cbc489c83b8c5a0b3e3d184053fd17e333
BLAKE2b-256 checksum
How to use checksums
54c41a8d4833e8103c3fcf6ace0df626d1357f79943dcffbfb80f3a43844ced0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/3.6.4

Release history Release notifications | RSS feed

This release

0.0.7.5 This release

1 release file

0.0.7.4

1 release file

0.0.7.3

1 release file

0.0.7.2

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page