# neispy
> [2020 공개SW 개발자 대회 조직위원장 특별상 수상 작품](https://www.oss.kr/dev_competition_activities/show/d8ce674e-1cf4-45de-b3c2-0365cdc5aabc?page=3)
> **동기와 비동기 전부 지원합니다.** **문제 발생시 이슈 넣어주세요!**
[![GitHub license](https://img.shields.io/github/license/SaidBySolo/neispy)](https://github.com/SaidBySolo/neispy/blob/master/LICENSE)
![Python package](https://github.com/SaidBySolo/neispy/workflows/Python%20package/badge.svg)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/neispy)](https://pypi.org/project/neispy/)
api키는 [이곳](https://open.neis.go.kr/portal/guide/actKeyPage.do)에서 받으실 수 있습니다.
[open neis api](https://open.neis.go.kr/)의 모든 엔드포인트가 래핑되어 있습니다.
```sh
pip install neispy
```
## 업데이트 방법
```sh
pip install --upgrade neispy
```
## 비슷한 프로젝트
* [neis.kt](https://github.com/kimcore/neis.kt)
* OPEN NEIS API를 코틀린으로 래핑한 라이브러리입니다.
* [neis.ts](https://github.com/star0202/neis.ts)
* TypeScript로 만들어진 NEIS Open API Wrapper
## 사용 예시(비동기)
```py
from neispy import Neispy
from asyncio.events import get_event_loop
async def main():
# 필수 인자가 들어가는 곳입니다. API키 등등..
# 아무런 값이 없으니 샘플 키로 요청합니다.
async with Neispy() as neis:
# 학교 이름으로 학교 정보를 요청하고 교육청 코드 와 학교 코드로 가져옵니다.
scinfo = await neis.schoolInfo(SCHUL_NM="인천동방초등학교")
row = scinfo.schoolInfo[1].row[0]
AE = row.ATPT_OFCDC_SC_CODE # 교육청 코드
SE = row.SD_SCHUL_CODE # 학교 코드
# 학교 코드와 교육청 코드로 2022년 5월 23일의 급식 정보 요청
scmeal = await neis.mealServiceDietInfo(
ATPT_OFCDC_SC_CODE=AE, SD_SCHUL_CODE=SE, MLSV_YMD="20220523"
)
row = scmeal.mealServiceDietInfo[1].row[0]
meal = row.DDISH_NM.replace("<br/>", "\n") # 줄바꿈으로 만든 뒤 출력
# 학교 코드와 교육청 코드로 2022년 6월 1일날 학사일정 요청
scschedule = await neis.SchoolSchedule(
ATPT_OFCDC_SC_CODE=AE, SD_SCHUL_CODE=SE, AA_YMD=20220601
)
row = scschedule.SchoolSchedule[1].row[0]
schedule = row.EVENT_NM # 학사일정명 가져옴
# 학교 코드와 교육청 코드로 초등학교의 2022년 5월 23일의 시간표가져옴
sctimetable = await neis.elsTimetable(
ATPT_OFCDC_SC_CODE=AE,
SD_SCHUL_CODE=SE,
AY="2022",
SEM="1",
ALL_TI_YMD=20220523,
GRADE="1",
PERIO=1,
)
timetable = [i.ITRT_CNTNT for i in sctimetable.elsTimetable[1].row] # 리스트로 만듦
academyinfo = await neis.acaInsTiInfo(
ATPT_OFCDC_SC_CODE=AE
) # 교육청 코드로 학원및 교습소 정보 요청
academy = academyinfo.acaInsTiInfo[1].row[0].ACA_NM # 학교이름 출력
scclass = await neis.classInfo(
ATPT_OFCDC_SC_CODE=AE, SD_SCHUL_CODE=SE, GRADE="1"
) # 학교 코드와 교육청 코드로 1학년의 모든 반 정보 요청
class_info = [i.CLASS_NM for i in scclass.classInfo[1].row] # 리스트로 만듦
hiscinfo = await neis.schoolInfo(SCHUL_NM="인천기계") # 다른 정보를 위해 공고로 가져옴
hirow = hiscinfo.schoolInfo[1].row[0]
hAE = hirow.ATPT_OFCDC_SC_CODE # 교육청 코드
hSE = hirow.SD_SCHUL_CODE # 학교 코드
scmajorinfo = await neis.schoolMajorinfo(
ATPT_OFCDC_SC_CODE=hAE, SD_SCHUL_CODE=hSE
) # 학과 정보 요청
majorinfo = [m.DDDEP_NM for m in scmajorinfo.schoolMajorinfo[1].row] # 리스트로 만듦
scAflcoinfo = await neis.schulAflcoinfo(
ATPT_OFCDC_SC_CODE=hAE, SD_SCHUL_CODE=hSE
) # 학교 계열 정보 요청
Aflco = [a.ORD_SC_NM for a in scAflcoinfo.schulAflcoinfo[1].row]
sctiClrm = await neis.tiClrminfo(
ATPT_OFCDC_SC_CODE=hAE, SD_SCHUL_CODE=hSE
) # 시간표 강의실 정보 요청
tiClem = [t.CLRM_NM for t in sctiClrm.tiClrminfo[1].row]
print(AE)
print(SE)
print(meal)
print(schedule)
print(academy)
print(class_info)
print(timetable)
print(majorinfo)
print(Aflco)
print(tiClem)
get_event_loop().run_until_complete(main())
# 출력값
# E10
# 7341025
# 보리밥c
# 감자국c (5.6.9.13.)
# 순대볶음c (5.6.10.13.)
# 고구마돈가스c (1.2.5.6.10.12.13.)
# 배추김치 (9.13.)
# 참외
# 지방선거일
# A+수학교습소
# ['1', '2', '3', '4', '1']
# ['국어', '수학', '즐거운생활', '즐거운생활', '봉사활동']
# ['공동실습소', '건축과', '건축디자인과', '금속과', '기계공작과']
# ['공동실습소', '공업계', '공업계']
# ['건축1-1', '건축1-2', '도시1-1', '도시1-2', '메카1-1']
```
## 사용 예시(동기)
```py
from neispy import Neispy
def main():
# 필수 인자가 들어가는 곳입니다. API키 등등..
# 아무런 값이 없으니 샘플 키로 요청합니다.
neis = Neispy.sync()
# 학교 이름으로 학교 정보를 요청하고 교육청 코드 와 학교 코드로 가져옵니다.
scinfo = neis.schoolInfo(SCHUL_NM="인천동방초등학교")
row = scinfo.schoolInfo[1].row[0]
AE = row.ATPT_OFCDC_SC_CODE # 교육청 코드
SE = row.SD_SCHUL_CODE # 학교 코드
# 학교 코드와 교육청 코드로 2022년 5월 23일의 급식 정보 요청
scmeal = neis.mealServiceDietInfo(
ATPT_OFCDC_SC_CODE=AE, SD_SCHUL_CODE=SE, MLSV_YMD="20220523"
)
row = scmeal.mealServiceDietInfo[1].row[0]
meal = row.DDISH_NM.replace("<br/>", "\n") # 줄바꿈으로 만든 뒤 출력
# 학교 코드와 교육청 코드로 2022년 6월 1일날 학사일정 요청
scschedule = neis.SchoolSchedule(
ATPT_OFCDC_SC_CODE=AE, SD_SCHUL_CODE=SE, AA_YMD=20220601
)
row = scschedule.SchoolSchedule[1].row[0]
schedule = row.EVENT_NM # 학사일정명 가져옴
# 학교 코드와 교육청 코드로 초등학교의 2022년 5월 23일의 시간표가져옴
sctimetable = neis.elsTimetable(
ATPT_OFCDC_SC_CODE=AE,
SD_SCHUL_CODE=SE,
AY="2022",
SEM="1",
ALL_TI_YMD=20220523,
GRADE="1",
PERIO=1,
)
timetable = [i.ITRT_CNTNT for i in sctimetable.elsTimetable[1].row] # 리스트로 만듦
academyinfo = neis.acaInsTiInfo(ATPT_OFCDC_SC_CODE=AE) # 교육청 코드로 학원및 교습소 정보 요청
academy = academyinfo.acaInsTiInfo[1].row[0].ACA_NM # 학교이름 출력
scclass = neis.classInfo(
ATPT_OFCDC_SC_CODE=AE, SD_SCHUL_CODE=SE, GRADE="1"
) # 학교 코드와 교육청 코드로 1학년의 모든 반 정보 요청
class_info = [i.CLASS_NM for i in scclass.classInfo[1].row] # 리스트로 만듦
hiscinfo = neis.schoolInfo(SCHUL_NM="인천기계") # 다른 정보를 위해 공고로 가져옴
hirow = hiscinfo.schoolInfo[1].row[0]
hAE = hirow.ATPT_OFCDC_SC_CODE # 교육청 코드
hSE = hirow.SD_SCHUL_CODE # 학교 코드
scmajorinfo = neis.schoolMajorinfo(
ATPT_OFCDC_SC_CODE=hAE, SD_SCHUL_CODE=hSE
) # 학과 정보 요청
majorinfo = [m.DDDEP_NM for m in scmajorinfo.schoolMajorinfo[1].row] # 리스트로 만듦
scAflcoinfo = neis.schulAflcoinfo(
ATPT_OFCDC_SC_CODE=hAE, SD_SCHUL_CODE=hSE
) # 학교 계열 정보 요청
Aflco = [a.ORD_SC_NM for a in scAflcoinfo.schulAflcoinfo[1].row]
sctiClrm = neis.tiClrminfo(
ATPT_OFCDC_SC_CODE=hAE, SD_SCHUL_CODE=hSE
) # 시간표 강의실 정보 요청
tiClem = [t.CLRM_NM for t in sctiClrm.tiClrminfo[1].row]
print(AE)
print(SE)
print(meal)
print(schedule)
print(academy)
print(class_info)
print(timetable)
print(majorinfo)
print(Aflco)
print(tiClem)
main()
# 출력값
# E10
# 7341025
# 보리밥c
# 감자국c (5.6.9.13.)
# 순대볶음c (5.6.10.13.)
# 고구마돈가스c (1.2.5.6.10.12.13.)
# 배추김치 (9.13.)
# 참외
# 지방선거일
# A+수학교습소
# ['1', '2', '3', '4', '1']
# ['국어', '수학', '즐거운생활', '즐거운생활', '봉사활동']
# ['공동실습소', '건축과', '건축디자인과', '금속과', '기계공작과']
# ['공동실습소', '공업계', '공업계']
# ['건축1-1', '건축1-2', '도시1-1', '도시1-2', '메카1-1']
```
## 요청 인자 및 반환 값
[데이터셋](https://open.neis.go.kr/portal/data/dataset/searchDatasetPage.do)을 참고해주세요.
반환되는 객체의 경우 docstring이 적용되어있어 vscode와 같은 텍스트 에디터나 IDE에서 속성을 확인할 수 있습니다.
위의 예제를 참고해주세요.
Raw data
{
"_id": null,
"home_page": "https://github.com/SaidBySolo/neispy",
"name": "neispy",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "Ryu ju heon",
"author_email": "SaidBySolo@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/31/8a/67069c994c9a5e59f981ea4c7dfdf91a52a52d3e3f5baea325c22f33a536/neispy-5.0.2.tar.gz",
"platform": null,
"description": "# neispy\n\n> [2020 \uacf5\uac1cSW \uac1c\ubc1c\uc790 \ub300\ud68c \uc870\uc9c1\uc704\uc6d0\uc7a5 \ud2b9\ubcc4\uc0c1 \uc218\uc0c1 \uc791\ud488](https://www.oss.kr/dev_competition_activities/show/d8ce674e-1cf4-45de-b3c2-0365cdc5aabc?page=3) \n> **\ub3d9\uae30\uc640 \ube44\ub3d9\uae30 \uc804\ubd80 \uc9c0\uc6d0\ud569\ub2c8\ub2e4.** **\ubb38\uc81c \ubc1c\uc0dd\uc2dc \uc774\uc288 \ub123\uc5b4\uc8fc\uc138\uc694!**\n\n[![GitHub license](https://img.shields.io/github/license/SaidBySolo/neispy)](https://github.com/SaidBySolo/neispy/blob/master/LICENSE)\n![Python package](https://github.com/SaidBySolo/neispy/workflows/Python%20package/badge.svg)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/neispy)](https://pypi.org/project/neispy/)\n\napi\ud0a4\ub294 [\uc774\uacf3](https://open.neis.go.kr/portal/guide/actKeyPage.do)\uc5d0\uc11c \ubc1b\uc73c\uc2e4 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\n[open neis api](https://open.neis.go.kr/)\uc758 \ubaa8\ub4e0 \uc5d4\ub4dc\ud3ec\uc778\ud2b8\uac00 \ub798\ud551\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4.\n\n```sh\npip install neispy\n```\n\n## \uc5c5\ub370\uc774\ud2b8 \ubc29\ubc95\n\n```sh\npip install --upgrade neispy\n```\n\n## \ube44\uc2b7\ud55c \ud504\ub85c\uc81d\ud2b8\n\n* [neis.kt](https://github.com/kimcore/neis.kt)\n * OPEN NEIS API\ub97c \ucf54\ud2c0\ub9b0\uc73c\ub85c \ub798\ud551\ud55c \ub77c\uc774\ube0c\ub7ec\ub9ac\uc785\ub2c8\ub2e4.\n* [neis.ts](https://github.com/star0202/neis.ts)\n * TypeScript\ub85c \ub9cc\ub4e4\uc5b4\uc9c4 NEIS Open API Wrapper\n\n## \uc0ac\uc6a9 \uc608\uc2dc(\ube44\ub3d9\uae30)\n\n```py\nfrom neispy import Neispy\nfrom asyncio.events import get_event_loop\n\nasync def main():\n # \ud544\uc218 \uc778\uc790\uac00 \ub4e4\uc5b4\uac00\ub294 \uacf3\uc785\ub2c8\ub2e4. API\ud0a4 \ub4f1\ub4f1..\n # \uc544\ubb34\ub7f0 \uac12\uc774 \uc5c6\uc73c\ub2c8 \uc0d8\ud50c \ud0a4\ub85c \uc694\uccad\ud569\ub2c8\ub2e4.\n async with Neispy() as neis:\n # \ud559\uad50 \uc774\ub984\uc73c\ub85c \ud559\uad50 \uc815\ubcf4\ub97c \uc694\uccad\ud558\uace0 \uad50\uc721\uccad \ucf54\ub4dc \uc640 \ud559\uad50 \ucf54\ub4dc\ub85c \uac00\uc838\uc635\ub2c8\ub2e4.\n scinfo = await neis.schoolInfo(SCHUL_NM=\"\uc778\ucc9c\ub3d9\ubc29\ucd08\ub4f1\ud559\uad50\")\n row = scinfo.schoolInfo[1].row[0]\n\n AE = row.ATPT_OFCDC_SC_CODE # \uad50\uc721\uccad \ucf54\ub4dc\n SE = row.SD_SCHUL_CODE # \ud559\uad50 \ucf54\ub4dc\n\n # \ud559\uad50 \ucf54\ub4dc\uc640 \uad50\uc721\uccad \ucf54\ub4dc\ub85c 2022\ub144 5\uc6d4 23\uc77c\uc758 \uae09\uc2dd \uc815\ubcf4 \uc694\uccad\n scmeal = await neis.mealServiceDietInfo(\n ATPT_OFCDC_SC_CODE=AE, SD_SCHUL_CODE=SE, MLSV_YMD=\"20220523\"\n )\n row = scmeal.mealServiceDietInfo[1].row[0]\n meal = row.DDISH_NM.replace(\"<br/>\", \"\\n\") # \uc904\ubc14\uafc8\uc73c\ub85c \ub9cc\ub4e0 \ub4a4 \ucd9c\ub825\n\n # \ud559\uad50 \ucf54\ub4dc\uc640 \uad50\uc721\uccad \ucf54\ub4dc\ub85c 2022\ub144 6\uc6d4 1\uc77c\ub0a0 \ud559\uc0ac\uc77c\uc815 \uc694\uccad\n scschedule = await neis.SchoolSchedule(\n ATPT_OFCDC_SC_CODE=AE, SD_SCHUL_CODE=SE, AA_YMD=20220601\n )\n row = scschedule.SchoolSchedule[1].row[0]\n schedule = row.EVENT_NM # \ud559\uc0ac\uc77c\uc815\uba85 \uac00\uc838\uc634\n\n # \ud559\uad50 \ucf54\ub4dc\uc640 \uad50\uc721\uccad \ucf54\ub4dc\ub85c \ucd08\ub4f1\ud559\uad50\uc758 2022\ub144 5\uc6d4 23\uc77c\uc758 \uc2dc\uac04\ud45c\uac00\uc838\uc634\n sctimetable = await neis.elsTimetable(\n ATPT_OFCDC_SC_CODE=AE,\n SD_SCHUL_CODE=SE,\n AY=\"2022\",\n SEM=\"1\",\n ALL_TI_YMD=20220523,\n GRADE=\"1\",\n PERIO=1,\n )\n timetable = [i.ITRT_CNTNT for i in sctimetable.elsTimetable[1].row] # \ub9ac\uc2a4\ud2b8\ub85c \ub9cc\ub4e6\n\n academyinfo = await neis.acaInsTiInfo(\n ATPT_OFCDC_SC_CODE=AE\n ) # \uad50\uc721\uccad \ucf54\ub4dc\ub85c \ud559\uc6d0\ubc0f \uad50\uc2b5\uc18c \uc815\ubcf4 \uc694\uccad\n academy = academyinfo.acaInsTiInfo[1].row[0].ACA_NM # \ud559\uad50\uc774\ub984 \ucd9c\ub825\n\n scclass = await neis.classInfo(\n ATPT_OFCDC_SC_CODE=AE, SD_SCHUL_CODE=SE, GRADE=\"1\"\n ) # \ud559\uad50 \ucf54\ub4dc\uc640 \uad50\uc721\uccad \ucf54\ub4dc\ub85c 1\ud559\ub144\uc758 \ubaa8\ub4e0 \ubc18 \uc815\ubcf4 \uc694\uccad\n class_info = [i.CLASS_NM for i in scclass.classInfo[1].row] # \ub9ac\uc2a4\ud2b8\ub85c \ub9cc\ub4e6\n\n hiscinfo = await neis.schoolInfo(SCHUL_NM=\"\uc778\ucc9c\uae30\uacc4\") # \ub2e4\ub978 \uc815\ubcf4\ub97c \uc704\ud574 \uacf5\uace0\ub85c \uac00\uc838\uc634\n hirow = hiscinfo.schoolInfo[1].row[0]\n hAE = hirow.ATPT_OFCDC_SC_CODE # \uad50\uc721\uccad \ucf54\ub4dc\n hSE = hirow.SD_SCHUL_CODE # \ud559\uad50 \ucf54\ub4dc\n\n scmajorinfo = await neis.schoolMajorinfo(\n ATPT_OFCDC_SC_CODE=hAE, SD_SCHUL_CODE=hSE\n ) # \ud559\uacfc \uc815\ubcf4 \uc694\uccad\n majorinfo = [m.DDDEP_NM for m in scmajorinfo.schoolMajorinfo[1].row] # \ub9ac\uc2a4\ud2b8\ub85c \ub9cc\ub4e6\n\n scAflcoinfo = await neis.schulAflcoinfo(\n ATPT_OFCDC_SC_CODE=hAE, SD_SCHUL_CODE=hSE\n ) # \ud559\uad50 \uacc4\uc5f4 \uc815\ubcf4 \uc694\uccad\n Aflco = [a.ORD_SC_NM for a in scAflcoinfo.schulAflcoinfo[1].row]\n\n sctiClrm = await neis.tiClrminfo(\n ATPT_OFCDC_SC_CODE=hAE, SD_SCHUL_CODE=hSE\n ) # \uc2dc\uac04\ud45c \uac15\uc758\uc2e4 \uc815\ubcf4 \uc694\uccad\n tiClem = [t.CLRM_NM for t in sctiClrm.tiClrminfo[1].row]\n print(AE)\n print(SE)\n print(meal)\n print(schedule)\n print(academy)\n print(class_info)\n print(timetable)\n print(majorinfo)\n print(Aflco)\n print(tiClem)\n\n\nget_event_loop().run_until_complete(main())\n\n# \ucd9c\ub825\uac12\n\n# E10\n# 7341025\n# \ubcf4\ub9ac\ubc25c\n# \uac10\uc790\uad6dc (5.6.9.13.)\n# \uc21c\ub300\ubcf6\uc74cc (5.6.10.13.)\n# \uace0\uad6c\ub9c8\ub3c8\uac00\uc2a4c (1.2.5.6.10.12.13.)\n# \ubc30\ucd94\uae40\uce58 (9.13.)\n# \ucc38\uc678\n# \uc9c0\ubc29\uc120\uac70\uc77c\n# A+\uc218\ud559\uad50\uc2b5\uc18c\n# ['1', '2', '3', '4', '1']\n# ['\uad6d\uc5b4', '\uc218\ud559', '\uc990\uac70\uc6b4\uc0dd\ud65c', '\uc990\uac70\uc6b4\uc0dd\ud65c', '\ubd09\uc0ac\ud65c\ub3d9']\n# ['\uacf5\ub3d9\uc2e4\uc2b5\uc18c', '\uac74\ucd95\uacfc', '\uac74\ucd95\ub514\uc790\uc778\uacfc', '\uae08\uc18d\uacfc', '\uae30\uacc4\uacf5\uc791\uacfc']\n# ['\uacf5\ub3d9\uc2e4\uc2b5\uc18c', '\uacf5\uc5c5\uacc4', '\uacf5\uc5c5\uacc4']\n# ['\uac74\ucd951-1', '\uac74\ucd951-2', '\ub3c4\uc2dc1-1', '\ub3c4\uc2dc1-2', '\uba54\uce741-1']\n```\n\n## \uc0ac\uc6a9 \uc608\uc2dc(\ub3d9\uae30)\n\n```py\nfrom neispy import Neispy\n\n\ndef main():\n # \ud544\uc218 \uc778\uc790\uac00 \ub4e4\uc5b4\uac00\ub294 \uacf3\uc785\ub2c8\ub2e4. API\ud0a4 \ub4f1\ub4f1..\n # \uc544\ubb34\ub7f0 \uac12\uc774 \uc5c6\uc73c\ub2c8 \uc0d8\ud50c \ud0a4\ub85c \uc694\uccad\ud569\ub2c8\ub2e4.\n neis = Neispy.sync()\n\n # \ud559\uad50 \uc774\ub984\uc73c\ub85c \ud559\uad50 \uc815\ubcf4\ub97c \uc694\uccad\ud558\uace0 \uad50\uc721\uccad \ucf54\ub4dc \uc640 \ud559\uad50 \ucf54\ub4dc\ub85c \uac00\uc838\uc635\ub2c8\ub2e4.\n scinfo = neis.schoolInfo(SCHUL_NM=\"\uc778\ucc9c\ub3d9\ubc29\ucd08\ub4f1\ud559\uad50\")\n row = scinfo.schoolInfo[1].row[0]\n\n AE = row.ATPT_OFCDC_SC_CODE # \uad50\uc721\uccad \ucf54\ub4dc\n SE = row.SD_SCHUL_CODE # \ud559\uad50 \ucf54\ub4dc\n\n # \ud559\uad50 \ucf54\ub4dc\uc640 \uad50\uc721\uccad \ucf54\ub4dc\ub85c 2022\ub144 5\uc6d4 23\uc77c\uc758 \uae09\uc2dd \uc815\ubcf4 \uc694\uccad\n scmeal = neis.mealServiceDietInfo(\n ATPT_OFCDC_SC_CODE=AE, SD_SCHUL_CODE=SE, MLSV_YMD=\"20220523\"\n )\n row = scmeal.mealServiceDietInfo[1].row[0]\n meal = row.DDISH_NM.replace(\"<br/>\", \"\\n\") # \uc904\ubc14\uafc8\uc73c\ub85c \ub9cc\ub4e0 \ub4a4 \ucd9c\ub825\n\n # \ud559\uad50 \ucf54\ub4dc\uc640 \uad50\uc721\uccad \ucf54\ub4dc\ub85c 2022\ub144 6\uc6d4 1\uc77c\ub0a0 \ud559\uc0ac\uc77c\uc815 \uc694\uccad\n scschedule = neis.SchoolSchedule(\n ATPT_OFCDC_SC_CODE=AE, SD_SCHUL_CODE=SE, AA_YMD=20220601\n )\n row = scschedule.SchoolSchedule[1].row[0]\n schedule = row.EVENT_NM # \ud559\uc0ac\uc77c\uc815\uba85 \uac00\uc838\uc634\n\n # \ud559\uad50 \ucf54\ub4dc\uc640 \uad50\uc721\uccad \ucf54\ub4dc\ub85c \ucd08\ub4f1\ud559\uad50\uc758 2022\ub144 5\uc6d4 23\uc77c\uc758 \uc2dc\uac04\ud45c\uac00\uc838\uc634\n sctimetable = neis.elsTimetable(\n ATPT_OFCDC_SC_CODE=AE,\n SD_SCHUL_CODE=SE,\n AY=\"2022\",\n SEM=\"1\",\n ALL_TI_YMD=20220523,\n GRADE=\"1\",\n PERIO=1,\n )\n timetable = [i.ITRT_CNTNT for i in sctimetable.elsTimetable[1].row] # \ub9ac\uc2a4\ud2b8\ub85c \ub9cc\ub4e6\n\n academyinfo = neis.acaInsTiInfo(ATPT_OFCDC_SC_CODE=AE) # \uad50\uc721\uccad \ucf54\ub4dc\ub85c \ud559\uc6d0\ubc0f \uad50\uc2b5\uc18c \uc815\ubcf4 \uc694\uccad\n academy = academyinfo.acaInsTiInfo[1].row[0].ACA_NM # \ud559\uad50\uc774\ub984 \ucd9c\ub825\n\n scclass = neis.classInfo(\n ATPT_OFCDC_SC_CODE=AE, SD_SCHUL_CODE=SE, GRADE=\"1\"\n ) # \ud559\uad50 \ucf54\ub4dc\uc640 \uad50\uc721\uccad \ucf54\ub4dc\ub85c 1\ud559\ub144\uc758 \ubaa8\ub4e0 \ubc18 \uc815\ubcf4 \uc694\uccad\n class_info = [i.CLASS_NM for i in scclass.classInfo[1].row] # \ub9ac\uc2a4\ud2b8\ub85c \ub9cc\ub4e6\n\n hiscinfo = neis.schoolInfo(SCHUL_NM=\"\uc778\ucc9c\uae30\uacc4\") # \ub2e4\ub978 \uc815\ubcf4\ub97c \uc704\ud574 \uacf5\uace0\ub85c \uac00\uc838\uc634\n hirow = hiscinfo.schoolInfo[1].row[0]\n hAE = hirow.ATPT_OFCDC_SC_CODE # \uad50\uc721\uccad \ucf54\ub4dc\n hSE = hirow.SD_SCHUL_CODE # \ud559\uad50 \ucf54\ub4dc\n\n scmajorinfo = neis.schoolMajorinfo(\n ATPT_OFCDC_SC_CODE=hAE, SD_SCHUL_CODE=hSE\n ) # \ud559\uacfc \uc815\ubcf4 \uc694\uccad\n majorinfo = [m.DDDEP_NM for m in scmajorinfo.schoolMajorinfo[1].row] # \ub9ac\uc2a4\ud2b8\ub85c \ub9cc\ub4e6\n\n scAflcoinfo = neis.schulAflcoinfo(\n ATPT_OFCDC_SC_CODE=hAE, SD_SCHUL_CODE=hSE\n ) # \ud559\uad50 \uacc4\uc5f4 \uc815\ubcf4 \uc694\uccad\n Aflco = [a.ORD_SC_NM for a in scAflcoinfo.schulAflcoinfo[1].row]\n\n sctiClrm = neis.tiClrminfo(\n ATPT_OFCDC_SC_CODE=hAE, SD_SCHUL_CODE=hSE\n ) # \uc2dc\uac04\ud45c \uac15\uc758\uc2e4 \uc815\ubcf4 \uc694\uccad\n tiClem = [t.CLRM_NM for t in sctiClrm.tiClrminfo[1].row]\n\n print(AE)\n print(SE)\n print(meal)\n print(schedule)\n print(academy)\n print(class_info)\n print(timetable)\n print(majorinfo)\n print(Aflco)\n print(tiClem)\n\n\nmain()\n\n\n# \ucd9c\ub825\uac12\n\n# E10\n# 7341025\n# \ubcf4\ub9ac\ubc25c \n# \uac10\uc790\uad6dc (5.6.9.13.)\n# \uc21c\ub300\ubcf6\uc74cc (5.6.10.13.)\n# \uace0\uad6c\ub9c8\ub3c8\uac00\uc2a4c (1.2.5.6.10.12.13.)\n# \ubc30\ucd94\uae40\uce58 (9.13.)\n# \ucc38\uc678 \n# \uc9c0\ubc29\uc120\uac70\uc77c\n# A+\uc218\ud559\uad50\uc2b5\uc18c\n# ['1', '2', '3', '4', '1']\n# ['\uad6d\uc5b4', '\uc218\ud559', '\uc990\uac70\uc6b4\uc0dd\ud65c', '\uc990\uac70\uc6b4\uc0dd\ud65c', '\ubd09\uc0ac\ud65c\ub3d9']\n# ['\uacf5\ub3d9\uc2e4\uc2b5\uc18c', '\uac74\ucd95\uacfc', '\uac74\ucd95\ub514\uc790\uc778\uacfc', '\uae08\uc18d\uacfc', '\uae30\uacc4\uacf5\uc791\uacfc']\n# ['\uacf5\ub3d9\uc2e4\uc2b5\uc18c', '\uacf5\uc5c5\uacc4', '\uacf5\uc5c5\uacc4']\n# ['\uac74\ucd951-1', '\uac74\ucd951-2', '\ub3c4\uc2dc1-1', '\ub3c4\uc2dc1-2', '\uba54\uce741-1']\n```\n\n## \uc694\uccad \uc778\uc790 \ubc0f \ubc18\ud658 \uac12\n\n[\ub370\uc774\ud130\uc14b](https://open.neis.go.kr/portal/data/dataset/searchDatasetPage.do)\uc744 \ucc38\uace0\ud574\uc8fc\uc138\uc694.\n\n\ubc18\ud658\ub418\ub294 \uac1d\uccb4\uc758 \uacbd\uc6b0 docstring\uc774 \uc801\uc6a9\ub418\uc5b4\uc788\uc5b4 vscode\uc640 \uac19\uc740 \ud14d\uc2a4\ud2b8 \uc5d0\ub514\ud130\ub098 IDE\uc5d0\uc11c \uc18d\uc131\uc744 \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n\n\uc704\uc758 \uc608\uc81c\ub97c \ucc38\uace0\ud574\uc8fc\uc138\uc694.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "open-neis-api wrapping with aiohttp",
"version": "5.0.2",
"project_urls": {
"Homepage": "https://github.com/SaidBySolo/neispy"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a0d23d30d29e4b2eadaa61f591df2be5b08cb8eff31bcf3c2a14ff9fd61a5cf1",
"md5": "bcee792ba8c52286442ba7b03704b6ce",
"sha256": "1f7d2895d1882aeb7468005814ce9dfe93aade9b477c64584a99264429dde4ce"
},
"downloads": -1,
"filename": "neispy-5.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bcee792ba8c52286442ba7b03704b6ce",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 29726,
"upload_time": "2023-11-30T13:48:38",
"upload_time_iso_8601": "2023-11-30T13:48:38.819916Z",
"url": "https://files.pythonhosted.org/packages/a0/d2/3d30d29e4b2eadaa61f591df2be5b08cb8eff31bcf3c2a14ff9fd61a5cf1/neispy-5.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "318a67069c994c9a5e59f981ea4c7dfdf91a52a52d3e3f5baea325c22f33a536",
"md5": "c5e385d44bbe5dd3676ceab2da6c73a0",
"sha256": "5ba049d70011531249ab57f06b5209e7aff47bbcb619f785c7342a186fbb37a5"
},
"downloads": -1,
"filename": "neispy-5.0.2.tar.gz",
"has_sig": false,
"md5_digest": "c5e385d44bbe5dd3676ceab2da6c73a0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 18243,
"upload_time": "2023-11-30T13:48:42",
"upload_time_iso_8601": "2023-11-30T13:48:42.901526Z",
"url": "https://files.pythonhosted.org/packages/31/8a/67069c994c9a5e59f981ea4c7dfdf91a52a52d3e3f5baea325c22f33a536/neispy-5.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-30 13:48:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "SaidBySolo",
"github_project": "neispy",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "neispy"
}