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

Uploaded Python 3

File details

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

File metadata

  • Download URL: just_kit-0.2.1.tar.gz
  • Upload date:
  • Size: 10.8 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.1.tar.gz
Algorithm Hash digest
SHA256 5eaac261a3113b3e70a98e0696132474b49c7589e5913149849bd300d4fc4897
MD5 eab21ad0de8becfbe9e3fc7319feec15
BLAKE2b-256 25999030d15a0817c6cf5b372b772a3513ccb445abe6c0a44867e61ced17f13f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: just_kit-0.2.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4afdfc9fa14893fa716276b6dcb71550e63b9c89efe61920ac73c54b53ff1270
MD5 c62031dab971300270f704df96199088
BLAKE2b-256 c070b06db4a2a0d9b69022acdabb66cc4220cc506f187fa821139e95e14870d6

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