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_xxxmethods directly, because the cookies will expired but this entity can't detect it timely.Use the
get_xxxmethods 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf5d7d50caa12b01ac403f9a4510a02b583e06ea2f17bc5ffdc1848dde512a30
|
|
| MD5 |
b16f20b3a80026e04bdb211c9999ef5a
|
|
| BLAKE2b-256 |
8afccfc9123532aaea590279c66a4c7af47a45046e9af2224ca3964f5e3ab56b
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b9e118eb0fadd6cd2f3d8e19aca1d6aac689fabb9e306c6a9d1155fea670731
|
|
| MD5 |
3f3b1ae9433e83fcc39293fece86c626
|
|
| BLAKE2b-256 |
bb66ca66629d2380ac0f66082b97f69403d0bb08ea7dab3b7d13b5106fa1988e
|