CodeSampleX

サンプル

httpx 0.28.1: Test code that calls an HTTP API with httpx, with no network and no monkeypatching

検証済みサンプル — pypi httpx 0.28.1: Test code that calls an HTTP API with httpx, with no network and no monkeypatching. python 3.12 · linux alpine/x64 · docker で…

sha256:cb3957bd87d8069f1852e993cc872f799d4655060485fae85a1bb8bde180b5ce

このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。 合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。 MIT-0

実行証拠

宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。

証拠の基準
署名済みコントラクト合格
検証レシート
3
ビルドした署名鍵
2
宣言された環境 python 3.12 linux x64 python 3.12 python pip

検証実行環境

環境 コントラクト ステージ 実行日
python 3.12 · linux alpine/x64 · docker ed25519:a2ec939a4c60e243 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · pypi@1
2026-08-14
python 3.12 · linux alpine/x64 · docker ed25519:a2ec939a4c60e243 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · pypi@1
2026-08-14
python 3.12 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · pypi@1
2026-08-17

ケース

HOW
ゴール
Test code that calls an HTTP API with httpx, with no network and no monkeypatching
パッケージ
シンボル
  • httpx.MockTransport
  • httpx.Client
  • Response.raise_for_status
  • httpx.WSGITransport
環境
python 3.12
作成日
2026-08-14T06:15:10Z

コントラクト

  1. assert MockTransport serves a real Client so base_url and params still apply
  2. assert raise_for_status raises HTTPStatusError and leaves the body readable
  3. assert the app= shortcut was removed in favour of WSGITransport and ASGITransport
  4. assert httpx defaults to a 5 second timeout and does not follow redirects

ファイル

  • csx.json
  • requirements.txt
  • src/__init__.py
  • src/api.py
  • test/contract.py

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

anonymous