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.2.0.tar.gz (8.0 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.2.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ntu_student_id-1.2.0.tar.gz
  • Upload date:
  • Size: 8.0 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.2.0.tar.gz
Algorithm Hash digest
SHA256 5447354068270cd7c5be46768b2b87059b411cab49b978a1a613ef2fce88f2fb
MD5 44d593a8405b97eebe1b133a4c878997
BLAKE2b-256 1c728cb3882b3c1f0d689edba0ac8d8524329d47dc75cdc88008f6040edc5da7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ntu_student_id-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c1d64396c03a69c1c75582c6b17a4f041647d1451ca14605159390fae1ec3381
MD5 6e5b17757e5f2492dfef9131d9cf252f
BLAKE2b-256 35e50eb04b571b3b480f850ea26f499944ed89a6a5ac5e95c3ef494b6f3d60ba

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