Comci.net 시간표 API 비공식 클라이언트
Project description
Comci.net 시간표 API 클라이언트
컴시간(comci.net) 비공식 API를 사용하여 학교 검색 및 시간표 조회를 할 수 있는 Python 모듈입니다.
설치
pip install -r requirements.txt
사용법
1. 학교 검색 (지역, 학교명, 학교코드)
from comci import search_schools
# "신송" 검색
schools = search_schools("신송")
for s in schools:
print(s["region"], s["school_name"], s["school_code"])
# 인천 신송중학교 49654
# 인천 신송고등학교 51825
2. 특정 학년/반 시간표 조회
from comci import get_timetable
# 1학년 1반 시간표 (정리.md 반환 구조)
timetable = get_timetable(49654, grade=1, class_num=1)
# {"월": [...], "화": [...], "수": [...], "목": [...], "금": [...]}
3. 전체 학년/반 시간표 조회
# 학년, 반 미지정 시 전체
timetable = get_timetable(49654)
# {"1학년 1반": {...}, "1학년 2반": {...}, ...}
4. 검색 후 바로 시간표 조회
from comci import search_and_get_timetable
timetable = search_and_get_timetable("신송", school_index=0, grade=1, class_num=1)
프로젝트 구조
comci/
├── __init__.py # 패키지 진입점
├── config.py # API URL, 상수
├── school_search.py # 학교 검색
├── timetable.py # 시간표 API 및 파싱
└── client.py # 통합 클라이언트
예시 실행
python example_usage.py
시간표 데이터 구조
각 요일별 리스트는 교시(1~8) 순서이며, 각 항목은:
{
"period": 1, # 교시
"time": "08:40", # 시간
"subject": "국어", # 과목
"teacher": "김선생", # 교사
"room": "101", # 강의실
"changed": False # 변경 수업 여부
}
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
comci-0.2.0.tar.gz
(8.5 kB
view details)
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
comci-0.2.0-py3-none-any.whl
(11.2 kB
view details)
File details
Details for the file comci-0.2.0.tar.gz.
File metadata
- Download URL: comci-0.2.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7aac44b21c191b6329582409887ffac9c9d1add0f1bbd44b286ba6d9e029c9e
|
|
| MD5 |
43fc969875df5c889045445d1169a872
|
|
| BLAKE2b-256 |
1a8242e0fc7d6dda55a5548f5480f9c5c7edb60800d650c53df291eece0724bf
|
File details
Details for the file comci-0.2.0-py3-none-any.whl.
File metadata
- Download URL: comci-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
068bdfc83db0aa8f4cd944bb3ed7c72e650486f41faa014540376b870f1d6819
|
|
| MD5 |
0e9d9c34f919b2c0393d2cb6cfd62d05
|
|
| BLAKE2b-256 |
4f8288b78cf7a37dc1c5d751d7c316de88b3f94dfd491ea359fdee2d7360a717
|