CAFE-API
CAFEX-API is a Python package that provides tools and utilities for API testing. It is part of the CAFE (Core Automation Framework Enhancements) monorepo.
Features
CAFEX-API offers the following features:
- Request building: Simplifies the creation of API requests with various methods and parameters.
- Response parsing: Provides methods to parse JSON and XML responses and extract relevant data.
- Assertions: Includes assertion methods specifically designed for API testing, allowing for efficient validation of response data.
- Data-driven testing: Supports data-driven testing approaches to execute tests with different data sets.
- Reporting: Integrates with CAFE's reporting capabilities to generate comprehensive test reports.
Getting Started
Prerequisites
- Python 3.12 or later
- pip (Python package manager)
Installation
-
Install CAFEX-API using pip:
pip install cafex-api
Usage
CAFE-API provides a set of intuitive methods and classes to facilitate API testing. Here's a basic example:
from cafex_api import request_builder
from cafex_api import response_parser_json
# Build an API request
request = request_builder.RequestBuilder().get(url="https://api.example.com/users")
# Send the request and get the response
response = request.send()
# Parse the JSON response
parsed_response = response_parser_json.ParseJsonData().get_dict(response.text)
# Validate the response data
assert parsed_response["status"] == "success"
Metadata
Release files for cafex-api 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cafex_api-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for cafex_api-1.0.0-py3-none-any.whl |
Release files / cafex_api-1.0.0-py3-none-any.whl
| Download URL | cafex_api-1.0.0-py3-none-any.whl |
|---|---|
| Size | 20.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a9c3e23ebd42da272f7d6b78ceaa55ee4d2b8bf159f84de769bbf63d2c47c6e
|
|
BLAKE2b-256 checksum How to use checksums |
f7e2b648c78f9d167351014c32e32934d51fd00d39a15ea3006ae3fa8fcdeb0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.10
|
Security for cafex-api 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.