Pydantic models for pytest-httpchain
Project description
pytest-httpchain-models
The Pydantic models that define and validate pytest-httpchain test scenarios.
This package is the typed schema for a scenario file. It models the whole
structure — Scenario, Stage, Request, the discriminated body types (JSON,
XML, form, text, base64, binary, files, GraphQL), variable substitutions,
response verification and save steps, parametrization, and parallel execution
configs. Every model derives from a strict base (extra="forbid"), so a
misspelled field is rejected at validation time instead of silently changing a
request. Validation runs in two phases: first with {{ }} template strings
treated as opaque, then again on the concrete values after the templates engine
renders them, so the rendered value is checked against its real type. The
package also generates the editor-facing JSON Schema published with the project.
Role in the workspace
After pytest-httpchain-jsonref
inlines a scenario's $ref directives, the plugin validates the resulting
document against Scenario here. These models are the single source of truth
for what a scenario may contain — both at pytest collection time and for the
JSON Schema editors consume.
Usage
from pytest_httpchain_models.entities import Scenario
scenario = Scenario.model_validate(
{
"stages": [
{
"name": "health",
"request": {"url": "https://api.example.com/health"},
"response": [{"verify": {"status": 200}}],
}
]
}
)
Links
- Documentation: https://aeresov.github.io/pytest-httpchain/
- Source and issues: https://github.com/aeresov/pytest-httpchain
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_httpchain_models-0.7.0.tar.gz.
File metadata
- Download URL: pytest_httpchain_models-0.7.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44a03c49d0918283f96928bfb31c47b1414b29ee87fc22f1ff6c6418ec913dac
|
|
| MD5 |
0ed85b2778a2022c9ba336182a2c3f15
|
|
| BLAKE2b-256 |
31de5b048dae39f69f7e41b6fb0b0163ddd8af8a41d02c412f45826e0aadade3
|
Provenance
The following attestation bundles were made for pytest_httpchain_models-0.7.0.tar.gz:
Publisher:
publish.yml on aeresov/pytest-httpchain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_httpchain_models-0.7.0.tar.gz -
Subject digest:
44a03c49d0918283f96928bfb31c47b1414b29ee87fc22f1ff6c6418ec913dac - Sigstore transparency entry: 1823975658
- Sigstore integration time:
-
Permalink:
aeresov/pytest-httpchain@0f61ddc029c040e81cc8cbaca94561586e04c716 -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/aeresov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0f61ddc029c040e81cc8cbaca94561586e04c716 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pytest_httpchain_models-0.7.0-py3-none-any.whl.
File metadata
- Download URL: pytest_httpchain_models-0.7.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6509c74ba7246f86cba76e8b7e8ba72df9521a5359f57fb12caf000870938556
|
|
| MD5 |
cf7f5bb1cd7ba59d1f04b9e53825d8f8
|
|
| BLAKE2b-256 |
c8a0155cdd4a5449a6b9fe3cef90578cf9dd97aac3b02eea834549d0ac3ec67b
|
Provenance
The following attestation bundles were made for pytest_httpchain_models-0.7.0-py3-none-any.whl:
Publisher:
publish.yml on aeresov/pytest-httpchain
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_httpchain_models-0.7.0-py3-none-any.whl -
Subject digest:
6509c74ba7246f86cba76e8b7e8ba72df9521a5359f57fb12caf000870938556 - Sigstore transparency entry: 1823977540
- Sigstore integration time:
-
Permalink:
aeresov/pytest-httpchain@0f61ddc029c040e81cc8cbaca94561586e04c716 -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/aeresov
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0f61ddc029c040e81cc8cbaca94561586e04c716 -
Trigger Event:
release
-
Statement type: