A library for KSA
Project description
KSA library
A library enabling developers to easily build simple and complicated programs for use in KSA
currently under construction
Authorization
Authorization expires after a few dozen minutes. Refresh Login Every few minutes to avoid errors.
This library supports lms, student site, and gaonnuri. For more support, create an issue.
To Authorize
user=Auth()
user.gaonnuri_auth('id','pwd')
user.student_auth('id','pwd')
user.lms_auth('id','pwd')
Post Class
The Post class is a class that represents an individual gaonnuri post. In takes an authorization class as an input. You can use it in the following way.
post=Post(user, link of post)
There are many attributes of a Post class
post.title
post.time
post.author
post.views
You can print the article in two forms in the following way. The html form, and markdown ( just text ) form.
post.html()
post.text()
both return a string.
Sugang Class
Sugang class is a class that represents your 수강상태. It takes an authorization class as an input. You can use it in the following way.
sugang=Sugang(user)
It has three methods.
sugang.table returns your classes as a list
sugang.timetable returns your classes as a list
sugang.info returns information about you (ex : your grade, number, et cetra)
Exploit Class
Exploit class is a class that enables users to do actions that are supposed to be blocked. It takes an authorization class as an input. You can use it in the following way
exploit=Exploit(user)
It currently has three methods.
exploit.outing() 외출 외박 신청이 되있을때 외출 체크를 할 수 있게 해줌
exploit.lmsview(number) takes integer as a input. enables users to see other people's posts corresponding to the integer on lms.
exploit.lmsfile(number,path) takes integer and download path as input. enables user to download other people's posts corresponding to the integer on lms.
Methods
Acessing the Board
There are two main ways to access a board. One returns a list of Post classes, and the other returns only basic informaion about each post.
1. To get a list of Post classes, use
get_gaonnuri_board_post(user,board="board name")
2. To access the basic information about a post, use
get_gaonnuri_board(user,board="board name")
The "board name" has to be one on gaonnuri, for example "board_notice" or "board_SuQZ12".
This will return each notice in the following json format.
{
'no':no,
'title':title,
'link':link,
'author':author,
'time':time,
'views':views
}
All posts will be appended to a list.
To access the one-line post, use
get_gaonnuri_oneline(user)
This method will return a list of all gaonnuri one-line posts
Acessing 상점, 벌점
To access 상점, 벌점, use the following method.
get_student_points(user)
The method takes an authorization class as an input. It returns the 상점, 벌점 as a dictionary.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ksalib-0.1.0.tar.gz.
File metadata
- Download URL: ksalib-0.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1bb9e68611cc5a71b9cf739ad77ee18a5321e89a88ccf296584e6584e669b10a
|
|
| MD5 |
e8854ca1ecce97793ef19ec6cae3da7d
|
|
| BLAKE2b-256 |
5aab8a1c048851ad7fea3b31d49d187504ea331324bebe7a9e63a375c90441ff
|
File details
Details for the file ksalib-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ksalib-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a36abf22dcb91038996f4388b720954e60111edfa20f2404e9dce73c0ab3705
|
|
| MD5 |
b6ab9231f9a64097f522cce678e4fe77
|
|
| BLAKE2b-256 |
ef8dbf10a6fe334548f7b67fcaa78e68f562cae39369d3320d39db8313ff2398
|