Skip to main content

PyUSTC

pypi code size last commit commits since last release

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

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyustc-1.2.0.tar.gz (20.8 kB view details)

Uploaded Source

Built Distribution

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

pyustc-1.2.0-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

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

Hashes for pyustc-1.2.0.tar.gz
Algorithm Hash digest
SHA256 bbeb91ab52e3cae99c4a17d1e1979248cddb3862f269f23ffb1968e204e91d90
MD5 d9d3ee28751998a95ef87d48d344c4b3
BLAKE2b-256 7755e0e259469824b81518c019a376f48dddcc43afd372eac23490c2e52e8c66

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyustc-1.2.0.tar.gz:

Publisher: release.yml on USTC-XeF2/pyustc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pyustc-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73e0b1b9ee08ef58b225c0042a239e9ca5bb01b27a0fcbec61724721bd2a3551
MD5 f73288481d59d502ad843212ef30f572
BLAKE2b-256 6ddc156ce315df941e494ec824c4c0d6f7e11afd18f7cd44e4e330e3fc6ed8c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyustc-1.2.0-py3-none-any.whl:

Publisher: release.yml on USTC-XeF2/pyustc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

1.2.1

2 files

This release

1.2.0 This release

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page