Metadata-Version: 2.4
Name: wonderfish-cp-sdk
Version: 10.0.1
License-Expression: Apache-2.0
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: azure-identity<2,>=1.25.3
Requires-Dist: httpx<1,>=0.28
Requires-Dist: pydantic<3,>=2.13.4
Requires-Dist: pyjwt[crypto]<3,>=2.15.0
Provides-Extra: dev
Requires-Dist: build==1.6.1; extra == "dev"
Requires-Dist: jeepney==0.9.0; sys_platform == "linux" and extra == "dev"
Requires-Dist: jsonschema==4.26.0; extra == "dev"
Requires-Dist: pip-audit==2.10.1; extra == "dev"
Requires-Dist: python-multipart<1,>=0.0.20; extra == "dev"
Requires-Dist: pytest<10,>=9.1.1; extra == "dev"
Requires-Dist: ruff==0.16.7; extra == "dev"
Requires-Dist: setuptools==84.0.0; extra == "dev"
Requires-Dist: secretstorage==3.5.0; sys_platform == "linux" and extra == "dev"
Requires-Dist: twine==7.0.0; extra == "dev"
Dynamic: license-file

# wonderfish-cp-sdk

Product ServiceからMVP Control Planeを呼び出すPython SDK。型付きclient、Managed Identity認証、Catalog cache、顧客・Product Service間Token検証を提供する。公開仕様は[SDK仕様書](<docs/DetailDesign/Product Service SDK仕様書.md>)、HTTP契約は[contracts](contracts/README.md)を参照する。

## 取得

Python 3.12以上で、Public PyPIの正式versionを固定する。

```sh
pip install wonderfish-cp-sdk==10.0.1
```

公開前のlocal検証ではこのcommitからwheelをビルドし、そのwheelを検証環境へ導入する。正式配置では公開済みwheelを使う。

## ローカル検証

```sh
python -m pip install --require-hashes -r requirements-dev.lock
python -m pip install --require-hashes -r deployment/sample/requirements.lock
python -m ruff check src tests deployment .github/scripts
python -m compileall -q src tests deployment .github/scripts
python -m pytest
python -m build --wheel --no-isolation
python -m pip install --no-deps dist/*.whl
python deployment/sample/smoke.py
```

pytestとsmokeはネットワーク不要の開発検証。実CPとのHTTP結合試験とは区別する。sample Docker imageのlock同期はCIと同じ固定Python imageで`pip-compile`して確認する。

## 構成

| 場所 | 用途 |
| --- | --- |
| `src/wonderfish_cp` | 公開SDK・認証・HTTP境界 |
| `src/wonderfish_cp/external` | 受信Tokenと実行呼出元の検証 |
| `tests` | ネットワーク不要の契約・単体テスト |
| `contracts` | CP OpenAPIの写し |
| `docs` | SDK仕様と検証用sampleの仕様 |
| `deployment/sample` | 単一プロセスの疎通確認用Product Service。配布物に含めない |

SDKはApache License 2.0で提供する。脆弱性・秘密情報は公開Issueへ記載せず`support@happyhack.co.jp`へ連絡する。
