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.1.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.1.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ntu_student_id-1.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 c285752ef296ec0b4e490909cfab021d057bedac694fa85acd479868da2da395
MD5 83850f15a18fb0120be9de8d5b39616b
BLAKE2b-256 e79e5d1d278ae6a3d759894f99eca322ed89e2cbeeb95847db2e14103dd4eaf4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ntu_student_id-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cdcf460208832a7b1d43295e0c42b4db45db648eb95466a8c9c84bc0e8a5f56d
MD5 1428dbbf07ffd4a9cd781bc58b983a20
BLAKE2b-256 3b6e6e0e06377c15c5eac810372716ed2f08fb66274c9c18a5690062a3cde122

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