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.2.0.tar.gz (19.0 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.2.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for buptmw-0.2.0.tar.gz
Algorithm Hash digest
SHA256 22534a38ed49f1b08296af471755f5bd449394c443cd29c6638b41e7b48c8891
MD5 91925feb54ef47727ea04578f9412ba1
BLAKE2b-256 d8be83dbe58347b325f421ef63f703e7bb9eb92bbe858ca43711893bfb0729e6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for buptmw-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99d3b67d71accc0791e100bb6c1834b56cd049bac38234e36bc6074cfbd713c6
MD5 745c047693914c64bb4e54502e09cffd
BLAKE2b-256 523d6a1156fbea8924e05dca2ee0c9f8597d3723b58552674cef5869f0bf6dac

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