Skip to main content

Help BUPT students access school system with python.

Project description

BUPT_Middleware

This project aims to help BUPT students simply access school systems with python, without multifarious process.

Ability

Download

pip install buptmw

Usage

Before start, you need to pass your BUPT credential, which was used in CAS to the core class, e.g.

from buptmw import BUPT_Auth

auth = {
    "username": "yourUsername",
    "password": "yourPassword"
}
user = BUPT_Auth(cas=auth)

Then you can call several method to get a verified entity, which you can use it as a requests.Session, and any additional operation like tiresome authentication can be omitted for you. For example,

from buptmw import BUPT_Auth

auth = {
    "username": "yourUsername",
    "password": "yourPassword"
}
user = BUPT_Auth(cas=auth)
ucloud = user.get_Ucloud()
response = ucloud.get("https://someurl")
# do something with response

[!IMPORTANT]

DO NOT storage the entities which was obtained by get_xxx methods directly, because the cookies will expired but this entity can't detect it timely.

Use the get_xxx methods when you try to get a session.

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

buptmw-0.1.3.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

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

buptmw-0.1.3-py3-none-any.whl (19.4 kB view details)

Uploaded Python 3

File details

Details for the file buptmw-0.1.3.tar.gz.

File metadata

  • Download URL: buptmw-0.1.3.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for buptmw-0.1.3.tar.gz
Algorithm Hash digest
SHA256 bf5d7d50caa12b01ac403f9a4510a02b583e06ea2f17bc5ffdc1848dde512a30
MD5 b16f20b3a80026e04bdb211c9999ef5a
BLAKE2b-256 8afccfc9123532aaea590279c66a4c7af47a45046e9af2224ca3964f5e3ab56b

See more details on using hashes here.

File details

Details for the file buptmw-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: buptmw-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 19.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for buptmw-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2b9e118eb0fadd6cd2f3d8e19aca1d6aac689fabb9e306c6a9d1155fea670731
MD5 3f3b1ae9433e83fcc39293fece86c626
BLAKE2b-256 bb66ca66629d2380ac0f66082b97f69403d0bb08ea7dab3b7d13b5106fa1988e

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