Get department information by NTU student ID
Project description
This Python module provides a simple parser for getting department information by parsing a student ID. The module is designed to be used with the student ID format used by National Taiwan University (NTU, 台灣大學).
Installation
pip install ntu_student_id
Usage
from ntu_student_id import Parser
# Create a parser instance with a valid student ID
parser = Parser(student_id="T09902345")
# Get department information
print("Full Department Name:", parser.full()) # 資訊工程學系
print("Short Department Name:", parser.short()) # 資工系
print("Additional Information:", parser.additional()) # ""
Methods
init(self, student_id: str)
The constructor takes a student ID as a parameter, initializes the parser, and sets the student ID, department list, and department code.
all(self) -> dict
Returns a dictionary containing all information about the department based on the parsed student ID.
short(self) -> str
Returns the short name of the department based on the parsed student ID.
full(self) -> str
Returns the full name of the department based on the parsed student ID.
additional(self) -> str
Returns additional information about the department based on the parsed student ID.
Data Source
The department information is loaded from a JSON file located at ./src/data/departments.json. Ensure that the file exists and contains valid JSON data.
Project details
Release history Release notifications | RSS feed
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 ntu_student_id-1.0.2.tar.gz.
File metadata
- Download URL: ntu_student_id-1.0.2.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c2ef6adb4aa9a8e514b5f574c8877f25c9fdd7f2fab4630b1bc0cf4b9262f74
|
|
| MD5 |
8016a53773a3b8edc23984de4f732ffa
|
|
| BLAKE2b-256 |
0ffb25392267a54a73989fafed29aae31ce318a7dd6eaf2cc86c230933410b49
|
File details
Details for the file ntu_student_id-1.0.2-py3-none-any.whl.
File metadata
- Download URL: ntu_student_id-1.0.2-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb7d3abc2d875487f3fd1796050966ab4becb2eab2a27a08f12004bd19a9ce50
|
|
| MD5 |
09eacc48fdcb8c711226aa91b6080c9c
|
|
| BLAKE2b-256 |
14a94ba1c1e536dcd79bdb6f02d0799867a390265a15bb3f3fd3b3676f4866c5
|