PyUSTC
A Python package that allows for quick use of USTC network services.
Features
- Central Authentication Service: Simplifies login and session management.
- Educational Administration Management System: Access course table, grades, and course planning tools.
- Young Platform: Manage Second Classes.
- Venue Booking (sport): Explore venues, query availability, and manage own orders.
Installation and Usage
Install PyUSTC via pip:
pip install pyustc
For examples and detailed documentation, see Examples.
Quick venue-booking example (see examples/venue_booking.py for details):
import asyncio
from pyustc.venue_booking.core.auth import cas_login, login_with_token
from pyustc.venue_booking.personal import profile
from pyustc.venue_booking.venue.query import sport_index, venue_daily
async def main() -> None:
client = login_with_token(token="...", open_id="...")
await profile.my_current(client)
await sport_index(client)
await venue_daily(client, "tennis")
await client.aclose()
# 或 CAS 账密登录: client = await cas_login(username="...", password="...")
asyncio.run(main())
Booking and check-in writes are not included: those endpoints require a client-side generated verification field that cannot be reliably constructed from Python.
Contributing
We welcome contributions of all types! Submit issues, code, or suggestions via GitHub.
License
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 pyustc-1.2.0.tar.gz.
File metadata
- Download URL: pyustc-1.2.0.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbeb91ab52e3cae99c4a17d1e1979248cddb3862f269f23ffb1968e204e91d90
|
|
| MD5 |
d9d3ee28751998a95ef87d48d344c4b3
|
|
| BLAKE2b-256 |
7755e0e259469824b81518c019a376f48dddcc43afd372eac23490c2e52e8c66
|
Provenance
The following attestation bundles were made for pyustc-1.2.0.tar.gz:
Publisher:
release.yml on USTC-XeF2/pyustc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyustc-1.2.0.tar.gz -
Subject digest:
bbeb91ab52e3cae99c4a17d1e1979248cddb3862f269f23ffb1968e204e91d90 - Sigstore transparency entry: 2697617526
- Sigstore integration time:
-
Permalink:
USTC-XeF2/pyustc@8272b419dd8130d0bd0c7751387d9b685d6da9d8 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/USTC-XeF2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8272b419dd8130d0bd0c7751387d9b685d6da9d8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyustc-1.2.0-py3-none-any.whl.
File metadata
- Download URL: pyustc-1.2.0-py3-none-any.whl
- Upload date:
- Size: 30.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73e0b1b9ee08ef58b225c0042a239e9ca5bb01b27a0fcbec61724721bd2a3551
|
|
| MD5 |
f73288481d59d502ad843212ef30f572
|
|
| BLAKE2b-256 |
6ddc156ce315df941e494ec824c4c0d6f7e11afd18f7cd44e4e330e3fc6ed8c0
|
Provenance
The following attestation bundles were made for pyustc-1.2.0-py3-none-any.whl:
Publisher:
release.yml on USTC-XeF2/pyustc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyustc-1.2.0-py3-none-any.whl -
Subject digest:
73e0b1b9ee08ef58b225c0042a239e9ca5bb01b27a0fcbec61724721bd2a3551 - Sigstore transparency entry: 2697617582
- Sigstore integration time:
-
Permalink:
USTC-XeF2/pyustc@8272b419dd8130d0bd0c7751387d9b685d6da9d8 -
Branch / Tag:
refs/tags/v1.2.0 - Owner: https://github.com/USTC-XeF2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@8272b419dd8130d0bd0c7751387d9b685d6da9d8 -
Trigger Event:
push
-
Statement type: