﻿# HK Data Atlas SDK

以 Python 或 TypeScript 使用香港公共 API。每種語言只需安裝一個 `hkdataatlas` 套件，按發布機構選用模組。

[GitHub](https://github.com/jackyor/hkdataatlas-sdks) · [npm](https://www.npmjs.com/package/hkdataatlas) · [PyPI](https://pypi.org/project/hkdataatlas/)

## TypeScript

```sh
npm install hkdataatlas
```

```ts
import { banksBranchLocator } from 'hkdataatlas/hkma';
const response = await banksBranchLocator.getBanksBranchLocator(
  { lang: 'en', pagesize: 1 },
  { signal: AbortSignal.timeout(15000) },
);
console.log(response.status, response.data);
```

## Python

```sh
uv add hkdataatlas
```

或使用 pip：`pip install hkdataatlas`。

```python
from hkdataatlas.hkma.banks_branch_locator import Client
from hkdataatlas.hkma.banks_branch_locator.api.default import get_banks_branch_locator

with Client(base_url="https://api.hkma.gov.hk/public/bank-svf-info") as client:
    response = get_banks_branch_locator.sync_detailed(client=client, lang="en", pagesize=1)
    print(response.status_code, response.parsed)
```

以上範例查詢香港金融管理局的銀行分行資料。

[查看模組及方法](https://github.com/jackyor/hkdataatlas-sdks/tree/main/packages)及[完整 README](https://github.com/jackyor/hkdataatlas-sdks#usage)，或[瀏覽 API 文件](/reference/)。API 的使用條款及供應情況以原發布機構為準。
