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.3.0.tar.gz (8.3 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.3.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ntu_student_id-1.3.0.tar.gz
  • Upload date:
  • Size: 8.3 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.3.0.tar.gz
Algorithm Hash digest
SHA256 6532b1166dc4473354039b8a7c7c255d3ce28a6f183546834383dc639858bc6c
MD5 4183553c7dcb4b694eee7e0553062dfa
BLAKE2b-256 914cf4fc23fe808bd88e80253ede3ce07160ed978753dfb3805f6a674cff2d50

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ntu_student_id-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 12.1 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df0c38fad821acaa4d1a1f2a704343bdbde15aaa4b2acc6bf1513ef0a73db34e
MD5 a6a691f7567bc1b25b0aac8fd4c6007b
BLAKE2b-256 b1cb8e4c68d468b59e848877cb9d6c32804a97d6f1030c950bc26c1535e3b098

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