Skip to main content

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

Project description

just-kit

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

功能特性

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

安装

pip install just-kit

使用方法

登入

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

from just_kit.auth import Authenticator
import os
from dotenv import load_dotenv
# 读取.env
load_dotenv()
# 读取账户以及密码
username = os.getenv('USER')
password = os.getenv('PASSWORD')
# 初始化认证器
authenticator = Authenticator()
authenticator.login(username,password)

服务:Epay

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

from just_kit.services import *
# 认证器作为构造参数
epay = EpayServiceProvider(authenticator)
# 通过oauth登入epay的服务
epay.login()
# 获取本账户校园卡余额与浴室专款
epay.query_account_bill()

服务:HealthCheck

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

import os
from just_kit.auth import Authenticator

import dotenv
dotenv.load_dotenv()

auther = Authenticator(vpn=True) #开启VPN模式

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

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.2.tar.gz (10.9 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.2-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: just_kit-0.2.2.tar.gz
  • Upload date:
  • Size: 10.9 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.2.tar.gz
Algorithm Hash digest
SHA256 02001c61d9e313919ea3e78e902d4294b1c1e0bde50fcb7d21797e827cee463d
MD5 dc8dc604175278db32d3f283d1fffc7c
BLAKE2b-256 2555d66bf1b607bdeb29ef76a75ebc33cb13218b9a0ac0fedf15a8cffc772173

See more details on using hashes here.

File details

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

File metadata

  • Download URL: just_kit-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 13.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cb4fa5d0aa2ad35ae723eb00bb345235fe12f74e756520495a2ac9283e403ee8
MD5 ec5ead20149613ca37659046f07f9e33
BLAKE2b-256 df1a59ae62860738f440870ad87c1cba02b23325a9ef9866f36974eaf4843c0f

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