datagokr — 한국천문연구원 특일 정보
Fetch a solar year's special days -- the clean columns are date, name, is_holiday
(Y/N), kind_code, sequence. Five operations, one shape:
| operation | 특일 |
|---|---|
holidays (default) |
관공서 공휴일 (대체공휴일 포함) |
national_holidays |
국경일 |
anniversaries |
기념일 |
solar_terms |
24절기 |
sundry_days |
잡절 |
Prerequisite
pipx install pydatagokr # or: pip install pydatagokr
Never print the key value (the DATAGOKR_API_KEY env var or credentials.json) to output, logs, or a summary -- if you need to check which form it is (encoding vs decoding), ask the user.
A data.go.kr decoding key must be configured (env DATAGOKR_API_KEY or
~/.config/pydatagokr/credentials.json), and the 특일 정보 dataset (service B090041)
applied for (활용신청) on that account.
Running
datagokr holidays [operation] --year YYYY [--month M] [--json]
operation defaults to holidays. --month (1-12) narrows to one month; omit it for the
whole year.
Procedure
- Identify what the user wants. "올해 공휴일" ->
holidays --year <this year>; "24절기" ->solar_terms; a specific month -> add--month. - Run.
Adddatagokr holidays --year 2026 datagokr holidays solar_terms --year 2026--jsonwhen the user wants machine-readable data. - Relay the result. Show the CLI's stdout (clean columns). The
is_holidaycolumn is the one that answers "is this a day off" -- a 기념일/절기 is usuallyN. - Error handling. A one-line
datagokr: <message>on stderr:- a
[30]/[20]auth error -> the key is wrong, is the encoding form by mistake, or service B090041 is not applied for yet. - a
[22]/[23]rate limit -> wait and retry.
- a
What this skill does not do
- It does not re-implement fetching or parsing (the package does); it always calls the CLI.
- It does not compute business days -- it returns the special days; a caller derives
workdays from
is_holidayplus weekends.