Skip to main content

江苏科技大学信息门户工具包

Project description

just-kit

江苏科技大学信息门户工具包,用于获取和操作学校信息门户上的各种数据。

功能特性

  • 宿舍电量查询
  • 校园卡余额查询
  • 校车信息查询
  • 更多功能开发中...

安装

pip install just-kit

使用方法

登入

默认使用信息门户作为登入服务

import os
from just_kit.auth import Authenticator

import dotenv
dotenv.load_dotenv()

auther = Authenticator(vpn=True,auto_login=False,debug=True)

auther.login(
    account=os.getenv("USER"),
    password=os.getenv("PASSWORD"))

过期与重新登入

auther.expire()
if not auther.check():
    print("重新登入:",auther.relogin()==0)
else:
    print("已登录")   

服务:Epay

epay服务用于获取宿舍电费、用户校园卡余额和浴室专款

from just_kit.services import EpayServiceProvider
epay = EpayServiceProvider(auther)
epay.login()
epay.query_electric_bill()
epay.query_account_bill()

服务:HealthCheck

宿舍卫生检查分数查询服务

from just_kit.services import HealthCheckService
service = HealthCheckService(auther)
service.login()
# 获取最近宿舍卫生检查分数
service.get_health_check_data()
# 获取 [HealthCheckData]
# 包含socre和date属性

开发说明

本项目使用Python 3.11开发,主要依赖:

  • requests:用于发送HTTP请求
  • beautifulsoup4:用于解析HTML

许可证

本项目采用MIT许可证。

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

just_kit-0.2.3.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

just_kit-0.2.3-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file just_kit-0.2.3.tar.gz.

File metadata

  • Download URL: just_kit-0.2.3.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for just_kit-0.2.3.tar.gz
Algorithm Hash digest
SHA256 9ba5506d51119fd8ae48cd26941c478c5728ea4e74be2cabdecdaab40ea6e688
MD5 93f1fd433832b2e4c87776d165ecdd5c
BLAKE2b-256 51c44e37d853c4fa7583678862d6c5b3657f134100eb3688d50903b6665d5882

See more details on using hashes here.

File details

Details for the file just_kit-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: just_kit-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for just_kit-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e64a29bb83a1fad84ee03716264cc6170cbe53ecdf399a86d7413835fbbd726e
MD5 1ae55550a3db762c3e1f7892c1cdf02e
BLAKE2b-256 c622e8514d1436625e73d1c5af2f6ecef96abd27f8557997cbf497c88a9ebcc6

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