Skip to main content

郑州大学移动校园的 Python API 封装 / An API wrapper for Zhengzhou University Mobile Campus written in Python.

Project description

ZZU.Py

郑州大学移动校园的 Python API 封装

安装

pip install zzupy --upgrade

Done & To Do

  • API
    • 登录
      • 帐密登录
      • Cookie 登录
  • Supwisdom
    • 获取课表
      • 获取当日课表
      • 获取当周课表
      • 获取自定义周数课表
    • 获取空教室
  • Network
    • 校园网认证
      • 校园网
      • 移动宽带
    • 获取在线设备数据
    • 获取消耗流量
    • 获取使用时长
    • 注销设备
  • eCard
    • 充值电费
    • 获取校园卡余额
    • 获取剩余电费

前往 ZZU.Py Completion Plan 查看 To Do

文档

文档

Note

Note

Example

from zzupy import ZZUPy
from http.cookies import SimpleCookie
cookie = SimpleCookie()
cookie["userToken"] = "Your userToken"
cookie["userToken"]["domain"] = ".zzu.edu.cn"
cookie["userToken"]["path"] = "/"
me = ZZUPy("usercode","password", cookie)
info = me.login()
print(f"{info["usercode"]} {info["name"]} 登录成功")
print("校园卡余额:", str(me.eCard.get_balance()))
print("剩余电费:", str(me.eCard.get_remaining_energy()))
print("课表JSON:", me.Supwisdom.get_current_week_courses("172").dump_json())
me.Network.login()
print(me.Network.get_online_devices().dump_json())

致谢

  • ZZU-API 提供了部分接口的参考 (其实是我懒得抓包)

许可

MIT license

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

zzupy-4.1.0.tar.gz (30.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zzupy-4.1.0-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file zzupy-4.1.0.tar.gz.

File metadata

  • Download URL: zzupy-4.1.0.tar.gz
  • Upload date:
  • Size: 30.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.7

File hashes

Hashes for zzupy-4.1.0.tar.gz
Algorithm Hash digest
SHA256 e2d1ce10e600aa582e7eb1ebf3ed281e95a191fca90b2ca675760075d561a9a1
MD5 74640ac1cc5f746e67002e0b46d8dbb2
BLAKE2b-256 658bd49ce2e7b54b1cb46cb2b85800d130a03db49e05e26bc0578254a4a30397

See more details on using hashes here.

File details

Details for the file zzupy-4.1.0-py3-none-any.whl.

File metadata

  • Download URL: zzupy-4.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.7

File hashes

Hashes for zzupy-4.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 991e7fd0dae235f70fbf1b7df38a1b794e9d0dc2b1fdf45e2bdadcde6c95ba67
MD5 cf1741436dc5c7314c25a3f591df41d5
BLAKE2b-256 dfc39e739e61ad3f2a07b1a9a8de3c25ad8f012b17a3f2f9c24fef306ae49ba2

See more details on using hashes here.

Supported by

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