Skip to main content

Python MyKU API Wrapper

Project description

pymyku

PyMyKU

Language: Python Request

An unofficial MyKU API wrapper and utilities for python.

Table of Contents

Notices

This project was developed by KU students and is not affiliated with the university. Please respect the API when using this project.

Documentation

All documentation is available here.

You can also use help() to see the docstrings of any modules in pymyku.

Examples

You can find some examples in the examples.

Installation

Prerequisites

From PyPI

python -m pip install pymyku

From source

git clone https://github.com/phusitsom/pymyku.git
cd pymyku
python -m pip install -r requirements.txt
python -m pip install -e .

Usage

You can use this library by importing the pymyku module to your script.

Methods

Assume that USERNAME is the username of your Nontri account and PASSWORD is the password of your Nontri account.

Client

import pymyku

ku_client = pymyku.Client('USERNAME', 'PASSWORD')

response = ku_client.fetch_gpax()

print(response)

Requests

from pymyku import requests, TokenAttr
from pymyku.utils import extract

login_res = requests.login('USERNAME', 'PASSWORD')

access_token = extract(login_res, TokenAttr.ACCESS_TOKEN)

response = requests.get_gpax(access_token).json()

print(response)

Output

{
    'code': 'success',
    'results': [
            {
                'std_id': '######',
                'std_code': '##########',
                'gpax': #.##,
                'total_credit': ##
            }
    ]
}

Notes

The only goal of this project is to make it simpler to send API requests to MyKU. There's no need to be concerned about the user's personal data being saved or shared.

References

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

pymyku-0.3.0.tar.gz (16.0 kB view hashes)

Uploaded Source

Built Distribution

pymyku-0.3.0-py3-none-any.whl (16.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page