Skip to main content

KPubData SDK

한국 공공데이터를 위한 Python SDK.

English

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

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

  • spec 기반 데이터셋 25종 — make verify 4단계 기계 검증 통과 (24종은 실API 검증 날짜까지 기록)
  • catalogue 기반 데이터셋 131종 (bok 4, datago 25, fds 1, kipris 1, korean 1, kosis 2, krx 3, law 3, localdata 56, 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 에 없는 기능을 만들어내지 않습니다
  • 데이터 게시·배포와 파이프라인 운영은 SDK의 제공 범위에 포함하지 않습니다

설치

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.items[0])

API 키 발급과 환경 변수 설정은 빠른 시작, 실제로 사용하는 변수 이름과 우선순위는 환경변수 안내, 기관별 절차는 제공기관 문서를 참고하세요.

지원 범위

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

문서

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

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

라이선스

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

Metadata

Release files for kpubdata 0.11.1

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.11.1
File Size Uploaded Provenance Actions
kpubdata-0.11.1.tar.gz 1.7 MB With provenance Details for kpubdata-0.11.1.tar.gz

Built distribution (wheel)

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

Total release size: 2.0 MB

Release files / kpubdata-0.11.1.tar.gz

Download URL kpubdata-0.11.1.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
8f81a91c9a3a78a64695c0172d7586bfdfd0fbc17bbc529f894a55ff6210bcd3
BLAKE2b-256 checksum
How to use checksums
6d5185ed8148dfe14fd6e1fc1519179c6f83faf36fa87610d8dc3cee58be0bce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 28, 2026.

Transparency log

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

Download URL kpubdata-0.11.1-py3-none-any.whl
Size 277.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b1c179d980d7a120ac5c0334d12df3b7b2b3272d2820d6c4fe398dc3f56b459
BLAKE2b-256 checksum
How to use checksums
b467c749d3eff592f7a6661e09f966dd6e51636d07a619bbd4d69391a5ccf23d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 28, 2026.

Transparency log

Security for kpubdata 0.11.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kpubdata-0.11.1.tar.gz

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 Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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