Skip to main content

KPubData

한국 공공데이터를, 바로 분석할 수 있는 테이블로.

English

한국 공공데이터 접근을 위한 독립 Python SDK. KPubData 는 다른 프로젝트 없이 단독으로 설치하고 사용합니다.

관련 프로젝트:

  • KPubData Builder — KPubData를 활용해 재현 가능한 데이터셋·테이블을 생성하고 관리
  • KPubData Studio — KPubData Builder를 위한 시각적 작업공간
  • KPubData Watch — 공공데이터 API 를 지속 관측해 지금 믿고 쓸 수 있는지 근거와 함께 공개

공공데이터 API 는 기관마다 인증 방식·응답 형식·페이지 처리가 제각각입니다. KPubData 는 그 차이를 어댑터가 흡수해, 하나의 Python 인터페이스로 탐색하고 수집하게 합니다. 사용자의 공식 API 키를 그대로 쓰는 SDK 구조이므로 데이터를 소유하거나 재배포하지 않습니다.

  • spec 기반 데이터셋 25종 — make verify 4단계 기계 검증 통과 (24종은 실API 검증 날짜까지 기록)
  • catalogue 기반 데이터셋 148종 (bok 4, datago 39, fds 1, kipris 1, korean 1, kosis 2, krx 3, law 3, localdata 59, lofin 6, neis 2, semas 17, seoul 7, sgis 3)

이 수치는 scripts/gen_readme_datasets.py로 생성했다 — 직접 편집 금지. 데이터셋별 상태는 SUPPORTED_DATA.md.

검증 수준 (#498): SUPPORTED_DATA.md의 "지원"은 meta.json이 있는 record 완료본(실API 검증)에만 씁니다. 그 열은 scripts/sync_supported_data.py가 fixture에서 계산해 dataset_metadata.json에 쓰고 거기서 표를 씁니다. 스키마만/활용신청 대기도 거기서 확인하세요.

무엇을 해결하나

  • 인증·페이지네이션·응답 형식의 차이 — 어댑터 안에 머무릅니다
  • "지원한다"는 말의 근거 — fixture·unit·contract 테스트가 통과해야 지원이라고 적고, 실API 검증은 날짜까지 기록합니다
  • 기관 고유 기능 — 가짜 범용 의미론으로 바꾸지 않고, call_raw 비상구를 남깁니다

무엇을 하지 않나

  • 데이터를 보관하거나 재배포하지 않습니다 — 키는 사용자 것이고 호출도 사용자 것입니다
  • 기관 API 에 없는 기능을 만들어내지 않습니다
  • 게시·배포는 kpubdata-builder 가 합니다

설치

pip install kpubdata

빠른 시작

from kpubdata import Client

client = Client()  # KPUBDATA_DATAGO_API_KEY 를 읽는다
batch = client.dataset("datago.apt_trade").list(LAWD_CD="11110", DEAL_YMD="202501")
print(batch.records[0])

API 키 발급과 환경 변수 설정은 빠른 시작, 기관별 절차는 제공기관 문서에 있습니다.

지원 범위

제공기관 datago bok kosis krx law localdata lofin semas seoul sgis kipris korean neis fds
Python 3.10 이상
데이터셋별 상태·검증 수준 SUPPORTED_DATA.md

문서

빠른 시작 설치부터 첫 조회까지
CLI kpubdata 명령
제공기관 기관별 키 발급과 특이사항
데이터셋 예제 실행 가능한 예제
아키텍처 설계와 계층
API 명세 공개 Python API
어댑터 계약 제공기관 어댑터 구현 규약
기여 가이드 개발 환경과 검증
보안 정책 취약점 보고와 알려진 한계

프로젝트 운영은 POLICY.md 와 VERIFICATION.md 를 따릅니다.

제품군

저장소 역할
kpubdata 수집과 정규화 — 이 저장소
kpubdata-builder 파이프라인과 게시
kpubdata-studio 화면과 워크플로
kpubdata-watch 공공데이터 신뢰성 관측 — KPubData 에만 의존

라이선스

MIT. 수집한 데이터의 이용 조건은 각 기관의 공공누리 유형을 따릅니다 — 이 라이선스는 코드에만 적용됩니다.

Metadata

Release files for kpubdata 0.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kpubdata 0.10.0
File Size Uploaded
kpubdata-0.10.0.tar.gz 1.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for kpubdata 0.10.0
File Interpreter ABI Platform
kpubdata-0.10.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.8 MB

Release files / kpubdata-0.10.0.tar.gz

Download URL kpubdata-0.10.0.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
4edffefd4d7d19348d55695e312b5ad01e682cfa060a279d4c8553e52b15f292
BLAKE2b-256 checksum
How to use checksums
6e876413804adfa6bb3db7b73d9e213a8af0a45b9eb34f9565c4e213b863b858
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / kpubdata-0.10.0-py3-none-any.whl

Download URL kpubdata-0.10.0-py3-none-any.whl
Size 249.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
05ede180dc6fbb076742eb731755c35e5128cf25c48297bcd06bff710684efa5
BLAKE2b-256 checksum
How to use checksums
2f7cdffb8257b0879056318a8ee3d68d69689849dd88a88d566333cc6c5f5d42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.10.0 This release

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page