이 파이썬 래퍼는 NEIS OpenAPI를 위하여 제작된 라이브러리 입니다.
Project description
korean_school_py
A python wrapper for NEIS OpenAPI
이 파이썬 래퍼는 NEIS OpenAPI 를 위하여 제작된 라이브러리 입니다.
설치(Installation)
# Windows
py -3 -m pip install korean_school
# Linux / MacOS
python3 -m pip install korean_school
예제(Samples)
- Sample
급식 정보 불러오기
import korean_school
import asyncio
async def main():
client = korean_school.Client()
school = await client.school(name="<학교명>")
meal = await school[0].meal()
print(meal[0].Meal)
print(meal[0].allergy)
print(meal[0].type)
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
# > ['칼슘수수밥k', '감자수제비국s', '메추리알곤약조림k', '애느타리깨소스무침k', '수제코다리살강정', '배추겉절이(입찰)k', '키위']
# > [[], ['아황산염', '밀', '대두'], ['아황산염', '밀', '대두', '난류'], ['아황산염', '밀', '대두'], ['아황산염', '토마토', '밀', '대두', '난류'], ['아황산염', '새우'], []]
# > 중식
# 본 정보는 가락고등학교의 2021년 3월 19일 기준 중식 자료 입니다.
시간표 정보 불러오기
import korean_school
import asyncio
async def main():
client = korean_school.Client()
school = await client.school(name="<학교명>")
# 학년과 반은 int형이나, str으로 작성해도 문제 없음.
timetable = await school[0].timetable(grade="학년", class_nm="반")
print("{}시간: {}".format(timetable[0].time, timetable[0].title))
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
# > 1시간: 자율활동
# 본 정보는 가락고등학교 2학년 1반의 2021년 3월 2일 기준 자료 입니다.
학원 정보 불러오기
import korean_school
import asyncio
async def main():
client = korean_school.Client()
# 학원 정보를 불러 올때에는 무조건 시/도 지역을 지정해주셔야합니다.
academy = await client.academy(provincial_code=korean_school.Location.Seoul, name="<학원명>")
print(academy[0].name)
print(academy[0].address1)
print(academy[0].address2)
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
사용권(License)
- MIT License
Copyright (c) 2021 gunyu1019
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
korean_school-1.0.tar.gz
(12.5 kB
view details)
Built Distribution
File details
Details for the file korean_school-1.0.tar.gz
.
File metadata
- Download URL: korean_school-1.0.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.23.0 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ad3491fce98c3e7906a1e0f8ba01d4a296cb4878b2dd9853fddaa8175918b55 |
|
MD5 | 17535c3201c4d6e3da9785d854a182b2 |
|
BLAKE2b-256 | a0dbc1b950c49474c328141710eda62a770aa9e080ecb36bf1edad2b961a6aa7 |
File details
Details for the file korean_school-1.0-py3-none-any.whl
.
File metadata
- Download URL: korean_school-1.0-py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.23.0 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6abfcb4645dbb169792b798cc2f865592c68b0d0c5aff0acfd15a80086cbecc |
|
MD5 | 114db44d4c4f51e2baee6e2b2ad7d935 |
|
BLAKE2b-256 | ca9311ffa6453800a19ec9cf87d87290105098fa55dacf232083e401a698ea84 |