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.2.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.2-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ntu_student_id-1.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 44209040039c947b3402cce255c3f26bcc838faa8ec8abaf3067bbc680f4ab4a
MD5 7bd3679271a403f066038143240b2116
BLAKE2b-256 e61ad42c6e21c1f61b454967eb266bfffb247c4e8cc5a2cd62809076e4e6ab06

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ntu_student_id-1.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 862b1be52f100e3bc69dbd3fffbb7be11475d0bc869e8accfab2d2e66e4df4a1
MD5 89302acb0784b33f8fb4ba3e59472e4a
BLAKE2b-256 f1f5c97469de8718dc37ebdc5e77e4a6c4a18b67f249e806c7ca42535da2d6da

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