Skip to main content

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


Download files

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

Source Distribution

ntu_student_id-1.0.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

ntu_student_id-1.0.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file ntu_student_id-1.0.1.tar.gz.

File metadata

  • Download URL: ntu_student_id-1.0.1.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

Hashes for ntu_student_id-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9419a5fa21a82762e45945cd5e589bcc892cf7a8df15bf9c0bb8df075f52459f
MD5 47b706ab60664252370d009a3e60fdce
BLAKE2b-256 fd2e0c38e1863f2ebc7cb65c1521309b1d8280b38640c16db0e13a4e0ee60cce

See more details on using hashes here.

File details

Details for the file ntu_student_id-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ntu_student_id-1.0.1-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

Hashes for ntu_student_id-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e21120d03bc427127bbb35113c0d4446c77c170ba7d7c7294dd159b3f6b44c15
MD5 ec02ff53a43946c56adae38eeafa5399
BLAKE2b-256 e2d0f73659719757207dcf6aba2e6a6d55f75a3d7e51960ef596a423c4c8155c

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