Skip to content

전국 학교의 급식 정보에 관한 Python 모듈입니다. (비동기, 동기)

License

Notifications You must be signed in to change notification settings

EGGnmad/K-SchoolMeal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🍞 K-School Meal

k-급식


다운

python3 -m pip install k-SchoolMeal

함수


School code

# ex-1
KSchoolMeal.school_code('분당중학교')

# ex-2
KSchoolMeal.school_code('광문고등학교', '서울특별시')
param type description
school_name str school name
region_name optional<str> add region in parameters will increase more accuracy

School_meal

# ex
KSchoolMeal.school_meal('B10', '123456', '2021.12.01')
param type description
region_code str region code
school_code str school code
date str the day of you want to get data

예시


#분당중학교

#async
async def main():
    school_info = await KSchoolMeal.school_code('분당중학교')
    meal = await KSchoolMeal.school_meal(school_info.region_code, school_info.school_code, '2021.11.01') #-> List[SchoolMealInfo] 

#sync
def main():
    school_info = KSchoolMeal.sync.school_code('분당중학교')
    
    meal = KSchoolMeal.sync.school_meal(school_info.region_code, school_info.school_code, '2021.11.01') #-> List[SchoolMealInfo]
    
#sync [detail]
def main():
    school_info = KSchoolMeal.sync.school_code('광문고', '서울특별시') # add region in parameters will increase more accuracy
    
    meal = KSchoolMeal.sync.school_meal(school_info.region_code, school_info.school_code, '2021.11.01') #-> List[SchoolMealInfo]

정보


응답 정보

class SchoolMealInfo:               # 급식 정보
    region_code : str               #시도교육청코드
    region_office_name : str        #시도교육청명
    school_code : str               #표준학교코드
    school_name : str               #학교명
    meal_code : str                 #식사코드
    meal_type : str                 #식사명
    date : str                      #급식일자
    person_number: int              #급식인원수
    dish : list[str]                #요리명
    origin_info : list[str]         #원산지정보
    calorie : str                   #칼로리정보
    nutrients : dict[str, float]    #영양정보
#예시
nutrients = {
        '탄수화물(g)': 104.3,
        '단백질(g)': 35.8,
        '지방(g)': 18.7,
        '비타민A(R.E)': 285.8,
        '티아민(mg)': 0.4,
        '리보플라빈(mg)': 0.6,
        '비타민C(mg)': 22.5,
        '칼슘(mg)': 220.0,
        '철분(mg)': 3.9
    }
class SchoolInfo:                   # 학교 정보
    region_code : str               #시도교육청코드
    region_office_name : str        #시도교육청명
    school_code : str               #표준학교코드
    school_name : str               #학교명
    school_level: str               #학교종류명
    location_name : str             #소재지명
    foundation_type : str           #설립명(ex: 사립, 공립)
    address : str                   #도로명주소
    tel: str                        #전화번호
    homepage: str                   #홈페이지주소
    coeducation: str                #남녀공학구분명
    school_type : str               #고등학교구분명
    school_anniversary : str        #개교기념일

About

전국 학교의 급식 정보에 관한 Python 모듈입니다. (비동기, 동기)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages