Robot Framework keyword library for validating data with Pydantic models and creating model instances dynamically.
Project description
robotframework-pydantic
Robot Framework keyword library for validating data with Pydantic models and creating model objects dynamically.
Usage
*** Settings ***
Library PydanticLibrary models=${CURDIR}/models.py
*** Test Cases ***
Validate Model
&{item}= Create Dictionary product_id=101 name=Apple quantity=3 unit_price=0.50
@{items}= Create List ${item}
&{data}= Create Dictionary cart_id=1 customer_name=Alice items=${items}
${cart}= Validate ShoppingCart ${data}
Create Object
${obj}= Create ShoppingCart cart_id=1 customer_name=Alice items=${items}
Log ${obj}
Model source
models can be either:
- a path to a Python file (
/path/to/models.py) - a Python module import path (
my_project.models)
All classes in that module inheriting from pydantic.BaseModel are exposed as dynamic Validate <ModelName> and Create <ModelName> keywords.
Run tests
# Unit/integration tests
uv run pytest
# Robot acceptance tests
uv run robot --pythonpath src tests/acceptance
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 robotframework_pydantic-0.1.0.tar.gz.
File metadata
- Download URL: robotframework_pydantic-0.1.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e23935f87908c8f83190d3867ab4e6da663ef9f92f0527630980bf0646e6f4fe
|
|
| MD5 |
8da18a07fa607545c8eec2ad1aa302ad
|
|
| BLAKE2b-256 |
a21716f043b540fb8a224da255c47d081f1f639435d94bac6b211cc8291ca10e
|
Provenance
The following attestation bundles were made for robotframework_pydantic-0.1.0.tar.gz:
Publisher:
publish.yml on DudeNr33/robotframework-pydantic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
robotframework_pydantic-0.1.0.tar.gz -
Subject digest:
e23935f87908c8f83190d3867ab4e6da663ef9f92f0527630980bf0646e6f4fe - Sigstore transparency entry: 1684411805
- Sigstore integration time:
-
Permalink:
DudeNr33/robotframework-pydantic@6da24c79b5a0d14dc08e7585b04855ed090e577d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/DudeNr33
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6da24c79b5a0d14dc08e7585b04855ed090e577d -
Trigger Event:
push
-
Statement type:
File details
Details for the file robotframework_pydantic-0.1.0-py3-none-any.whl.
File metadata
- Download URL: robotframework_pydantic-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11458246bd73bea5595c6e488f347ce52906841e8c0ed625fca2d247c29f5bbb
|
|
| MD5 |
77aaaf9518227a388b1342292803d4e5
|
|
| BLAKE2b-256 |
dd848fc500b672b9833a4aebb5cc7c547bb4ebdb2665ad7badb198dd0516e3ed
|
Provenance
The following attestation bundles were made for robotframework_pydantic-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on DudeNr33/robotframework-pydantic
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
robotframework_pydantic-0.1.0-py3-none-any.whl -
Subject digest:
11458246bd73bea5595c6e488f347ce52906841e8c0ed625fca2d247c29f5bbb - Sigstore transparency entry: 1684412321
- Sigstore integration time:
-
Permalink:
DudeNr33/robotframework-pydantic@6da24c79b5a0d14dc08e7585b04855ed090e577d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/DudeNr33
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6da24c79b5a0d14dc08e7585b04855ed090e577d -
Trigger Event:
push
-
Statement type: