Skip to main content

Official Python SDK for Kynode Korean Business Verification API

Project description

kynode

Official Python SDK for the Kynode Korean Business Verification API.

Verify Korean business registration numbers against NTS data with optional DART-verified English company names.

Requirements

  • Python 3.8+
  • httpx (installed automatically)

Installation

pip install kynode

Quick start

from kynode import Kynode

client = Kynode(api_key="sk_live_...")

result = client.verify(
    business_number="8090903407",
    start_date="20260513",
    owner_name="강민구",
    company_name="노드메트릭스",
    language="en",
)

print(result["isValid"], result.get("businessInfo", {}).get("companyName"))

Client options

Parameter Type Default Description
api_key str required Your Kynode API key
base_url str https://kynode-api.kynode.workers.dev API base URL
timeout float 30.0 Request timeout (sec)

Use as a context manager to close HTTP connections:

with Kynode(api_key="sk_live_...") as client:
    result = client.verify(...)

Single verification (sync)

result = client.verify(
    business_number="1234567890",
    start_date="20240101",
    owner_name="홍길동",
    language="en",  # optional: en | ko | both | code (default: en)
)

Calls POST /v1/verify with Bearer authentication.

Single verification (async)

import asyncio
from kynode import Kynode

async def main():
    client = Kynode(api_key="sk_live_...")
    try:
        result = await client.verify_async(
            business_number="1234567890",
            start_date="20240101",
            owner_name="홍길동",
        )
        print(result)
    finally:
        await client.aclose()

asyncio.run(main())

Batch verification (sync)

batch = client.batch_verify([
    {"business_number": "1234567890", "start_date": "20240101", "owner_name": "홍길동"},
    {"business_number": "9876543210", "start_date": "20240101", "owner_name": "김철수"},
])

print(batch["total"], batch["success"], batch["failed"])
for row in batch["results"]:
    if row["success"]:
        print(row["business_number"], row["data"])
    else:
        print(row["business_number"], row["error"])
  • If all items share the same start_date, owner_name, language, and company_name, the client calls POST /v1/batch/verify (Pro tier and above).
  • If fields differ per row, the client runs parallel single verifications and returns a batch-shaped response.

Batch verification (async)

batch = await client.batch_verify_async([...])

Error handling

from kynode import (
    Kynode,
    KynodeError,
    KynodeAuthError,
    KynodeQuotaError,
    KynodeValidationError,
    KynodeNotFoundError,
)

try:
    client.verify(...)
except KynodeAuthError:
    # 401 — invalid or missing API key
    pass
except KynodeQuotaError:
    # 429 — monthly quota exceeded
    pass
except KynodeValidationError:
    # 400 — invalid request
    pass
except KynodeNotFoundError:
    # 404 — endpoint not found
    pass
except KynodeError as exc:
    print(exc.status_code, exc.code, exc.message, exc.details)
Exception HTTP status Typical cause
KynodeAuthError 401 Invalid API key
KynodeValidationError 400 Missing or invalid parameters
KynodeNotFoundError 404 Unknown endpoint
KynodeQuotaError 429 Monthly quota exceeded
KynodeError other Server errors, timeouts

Timeouts raise KynodeError with code="timeout" and status_code=408.

Development

cd kynode
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
pytest

Build for PyPI

pip install build twine
python -m build
twine check dist/*
# twine upload dist/*

Links

License

MIT

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

kynode-0.1.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kynode-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file kynode-0.1.0.tar.gz.

File metadata

  • Download URL: kynode-0.1.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for kynode-0.1.0.tar.gz
Algorithm Hash digest
SHA256 67ca9c11fcaf414a583353762c0d745f8332b79f68ad96c0305f71500ff1d4ee
MD5 319db8f1753edde4f2eec183f4b4367c
BLAKE2b-256 337906c14375315d32180078702a813b6e1156b10c8141b25310965f066df7e6

See more details on using hashes here.

File details

Details for the file kynode-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: kynode-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for kynode-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b8ba1ee80bbc764f1af9bc8d522c402fa24dc95f4a4be719d7e91204d48eb7e2
MD5 e91d0fae045e0d54ea2b9647041b3f41
BLAKE2b-256 086cc36a3594234d89eecf9ab3290144de5d0962a85dc878c3fab7444f98a344

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page