pyrestkit 1.2.0__tar.gz → 1.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyrestkit-1.2.2/.github/workflows/ci.yml +43 -0
- pyrestkit-1.2.2/.github/workflows/release.yml +97 -0
- pyrestkit-1.2.2/.gitignore +49 -0
- pyrestkit-1.2.2/CHANGELOG.md +360 -0
- pyrestkit-1.2.2/CONTRIBUTING.md +425 -0
- pyrestkit-1.2.2/Makefile +72 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/PKG-INFO +3 -4
- pyrestkit-1.2.2/Pipfile +22 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/README.md +1 -1
- pyrestkit-1.2.2/docs/ai.md +445 -0
- pyrestkit-1.2.2/docs/architecture.md +506 -0
- pyrestkit-1.2.2/docs/authentication.md +394 -0
- pyrestkit-1.2.2/docs/configuration.md +351 -0
- pyrestkit-1.2.2/docs/examples.md +484 -0
- pyrestkit-1.2.2/docs/providers.md +559 -0
- pyrestkit-1.2.2/docs/validation.md +449 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyproject.toml +49 -24
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/__init__.py +9 -1
- pyrestkit-1.2.2/pyrestkit/_version.py +24 -0
- pyrestkit-1.2.2/pyrestkit/config/dev.json +9 -0
- pyrestkit-1.2.2/pyrestkit/config/prod.json +9 -0
- pyrestkit-1.2.2/pyrestkit/config/qa.json +9 -0
- pyrestkit-1.2.2/pyrestkit/config/uat.json +9 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit.egg-info/PKG-INFO +3 -4
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit.egg-info/SOURCES.txt +68 -1
- pyrestkit-1.2.2/pyrestkit.egg-info/scm_file_list.json +187 -0
- pyrestkit-1.2.2/pyrestkit.egg-info/scm_version.json +8 -0
- pyrestkit-1.2.2/pytest.ini +15 -0
- pyrestkit-1.2.2/requirements-dev.txt +9 -0
- pyrestkit-1.2.2/requirements.txt +8 -0
- pyrestkit-1.2.2/schemas/create_user.json +20 -0
- pyrestkit-1.2.2/schemas/error_response.json +12 -0
- pyrestkit-1.2.2/schemas/get_user.json +24 -0
- pyrestkit-1.2.2/testdata/order.json +0 -0
- pyrestkit-1.2.2/testdata/payment.json +0 -0
- pyrestkit-1.2.2/testdata/user.json +4 -0
- pyrestkit-1.2.2/tests/__init__.py +0 -0
- pyrestkit-1.2.2/tests/ai/test_ai_client.py +87 -0
- pyrestkit-1.2.2/tests/ai/test_ai_config.py +112 -0
- pyrestkit-1.2.2/tests/ai/test_failure_analyzer.py +80 -0
- pyrestkit-1.2.2/tests/ai/test_openai_provider.py +137 -0
- pyrestkit-1.2.2/tests/ai/test_prompt_loader.py +36 -0
- pyrestkit-1.2.2/tests/ai/test_provider_error_paths.py +131 -0
- pyrestkit-1.2.2/tests/ai/test_provider_implementations.py +144 -0
- pyrestkit-1.2.2/tests/assertions/test_json_assertion.py +62 -0
- pyrestkit-1.2.2/tests/assertions/test_json_contains_assertion.py +97 -0
- pyrestkit-1.2.2/tests/assertions/test_json_count_assertion.py +71 -0
- pyrestkit-1.2.2/tests/assertions/test_response_assertions.py +29 -0
- pyrestkit-1.2.2/tests/assertions/test_response_time_assertions.py +28 -0
- pyrestkit-1.2.2/tests/assertions/test_schema_assertions.py +83 -0
- pyrestkit-1.2.2/tests/auth/test_api_key_auth.py +9 -0
- pyrestkit-1.2.2/tests/auth/test_authentication_manager.py +20 -0
- pyrestkit-1.2.2/tests/auth/test_basic_auth.py +13 -0
- pyrestkit-1.2.2/tests/auth/test_bearer_auth.py +27 -0
- pyrestkit-1.2.2/tests/auth/test_token_cache.py +38 -0
- pyrestkit-1.2.2/tests/auth/test_token_manager.py +22 -0
- pyrestkit-1.2.2/tests/builder/test_fluent_request_builder.py +135 -0
- pyrestkit-1.2.2/tests/clients/test_user_client.py +143 -0
- pyrestkit-1.2.2/tests/clients/test_user_endpoints.py +21 -0
- pyrestkit-1.2.2/tests/conftest.py +64 -0
- pyrestkit-1.2.2/tests/core/test_api_client.py +22 -0
- pyrestkit-1.2.2/tests/core/test_session_manager.py +19 -0
- pyrestkit-1.2.2/tests/factories/test_user_factory.py +22 -0
- pyrestkit-1.2.2/tests/fake_token_provider.py +16 -0
- pyrestkit-1.2.2/tests/pipeline/test_pipeline.py +15 -0
- pyrestkit-1.2.2/tests/response/test_framework_response_models.py +318 -0
- pyrestkit-1.2.2/tests/response/test_list_serialization.py +58 -0
- pyrestkit-1.2.2/tests/response/test_model_serialization.py +46 -0
- pyrestkit-1.2.2/tests/response/test_response_body.py +84 -0
- pyrestkit-1.2.2/tests/retry/test_retry_handler.py +96 -0
- pyrestkit-1.2.2/tests/retry/test_retry_policy.py +142 -0
- pyrestkit-1.2.2/tests/validators/test_response_validator.py +43 -0
- pyrestkit-1.2.2/tests/validators/test_schema_validator.py +29 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/analyzer.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/client.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/config/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/config/ai_config.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/exceptions.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/generators/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/models.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/parsers/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/prompts/failure_analysis.md +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/provider.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/providers/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/providers/anthropic.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/providers/azure_openai.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/providers/base.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/providers/bedrock.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/providers/cohere.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/providers/gemini.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/providers/groq.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/providers/mistral.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/providers/ollama.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/providers/openai.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/utils/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/ai/utils/prompt_loader.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/assertions/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/assertions/assertion_exception.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/assertions/response_assertions.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/auth/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/auth/auth_strategy.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/auth/authentication_manager.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/auth/strategies/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/auth/strategies/api_key_auth.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/auth/strategies/basic_auth.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/auth/strategies/bearer_auth.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/auth/token_cache.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/auth/token_manager.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/auth/token_provider.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/auth/token_response.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/builder/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/builder/fluent_request_builder.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/clients/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/clients/base_client.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/clients/user_client.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/config/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/config/config.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/constants/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/constants/content_types.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/constants/headers.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/constants/status_codes.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/core/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/core/api_client.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/core/logger.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/core/request_builder.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/core/request_executor.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/core/request_logger.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/core/response_logger.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/core/session_manager.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/database/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/endpoints/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/endpoints/base_endpoints.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/endpoints/order_endpoints.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/endpoints/payment_endpoints.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/endpoints/user_endpoints.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/exceptions/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/exceptions/api_exception.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/exceptions/authentication_exception.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/exceptions/configuration_exception.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/exceptions/exception_mapper.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/exceptions/network_exception.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/exceptions/response_exception.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/exceptions/serialization_exception.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/exceptions/validation_exception.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/factories/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/factories/base_factory.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/factories/user_factory.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/hooks/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/hooks/hook.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/hooks/hook_manager.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/hooks/request_hook.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/hooks/response_hook.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/hooks/timing_hook.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/models/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/models/base_response.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/models/request/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/models/request/create_user_request.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/models/request/update_user_request.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/models/response/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/models/response/create_user_response.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/models/response/get_user_response.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/models/response/user_response.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/pipeline/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/pipeline/middleware.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/pipeline/middleware_chain.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/pipeline/pipeline.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/pipeline/request_context.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/response/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/response/framework_response.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/response/response_body.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/retry/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/retry/backoff.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/retry/retry_handler.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/retry/retry_policy.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/serializers/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/serializers/response_mapper.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/types/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/types/model_protocol.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/utils/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/validators/__init__.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/validators/response_validator.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit/validators/schema_validator.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit.egg-info/dependency_links.txt +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit.egg-info/requires.txt +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/pyrestkit.egg-info/top_level.txt +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/setup.cfg +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/tests/test_config.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/tests/test_endpoints_and_clients.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/tests/test_exception_mapper.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/tests/test_logger.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/tests/test_pipeline_and_hooks.py +0 -0
- {pyrestkit-1.2.0 → pyrestkit-1.2.2}/tests/test_response_mapping.py +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: PyRestKit CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- develop
|
|
8
|
+
|
|
9
|
+
pull_request:
|
|
10
|
+
branches:
|
|
11
|
+
- main
|
|
12
|
+
- develop
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
quality-checks:
|
|
16
|
+
name: Quality Checks
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
strategy:
|
|
20
|
+
matrix:
|
|
21
|
+
python-version:
|
|
22
|
+
- "3.13"
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- name: Checkout Repository
|
|
26
|
+
uses: actions/checkout@v4
|
|
27
|
+
|
|
28
|
+
- name: Setup Python
|
|
29
|
+
uses: actions/setup-python@v5
|
|
30
|
+
with:
|
|
31
|
+
python-version: ${{ matrix.python-version }}
|
|
32
|
+
|
|
33
|
+
- name: Upgrade pip
|
|
34
|
+
run: |
|
|
35
|
+
python -m pip install --upgrade pip
|
|
36
|
+
|
|
37
|
+
- name: Install Dependencies
|
|
38
|
+
run: |
|
|
39
|
+
pip install -r requirements-dev.txt
|
|
40
|
+
|
|
41
|
+
- name: Run Quality Checks
|
|
42
|
+
run: |
|
|
43
|
+
make check
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
name: Release Pipeline
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Set up Python
|
|
19
|
+
uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: ${{ matrix.python-version }}
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install --upgrade pip
|
|
26
|
+
pip install -r requirements.txt
|
|
27
|
+
pip install -r requirements-dev.txt
|
|
28
|
+
pip install pytest
|
|
29
|
+
|
|
30
|
+
- name: Run tests
|
|
31
|
+
run: pytest -q
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
build:
|
|
35
|
+
needs: test
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
|
|
38
|
+
steps:
|
|
39
|
+
- uses: actions/checkout@v4
|
|
40
|
+
with:
|
|
41
|
+
fetch-depth: 0 # IMPORTANT for setuptools-scm
|
|
42
|
+
|
|
43
|
+
- name: Set up Python
|
|
44
|
+
uses: actions/setup-python@v5
|
|
45
|
+
with:
|
|
46
|
+
python-version: "3.11"
|
|
47
|
+
|
|
48
|
+
- name: Install build tools
|
|
49
|
+
run: |
|
|
50
|
+
python -m pip install --upgrade pip
|
|
51
|
+
pip install build setuptools-scm
|
|
52
|
+
|
|
53
|
+
- name: Build package
|
|
54
|
+
run: python -m build
|
|
55
|
+
|
|
56
|
+
- name: Upload dist
|
|
57
|
+
uses: actions/upload-artifact@v4
|
|
58
|
+
with:
|
|
59
|
+
name: dist
|
|
60
|
+
path: dist/
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
pypi:
|
|
64
|
+
needs: build
|
|
65
|
+
runs-on: ubuntu-latest
|
|
66
|
+
|
|
67
|
+
environment:
|
|
68
|
+
name: pypi
|
|
69
|
+
|
|
70
|
+
permissions:
|
|
71
|
+
id-token: write
|
|
72
|
+
contents: read
|
|
73
|
+
|
|
74
|
+
steps:
|
|
75
|
+
- uses: actions/download-artifact@v4
|
|
76
|
+
with:
|
|
77
|
+
name: dist
|
|
78
|
+
path: dist/
|
|
79
|
+
|
|
80
|
+
- name: Publish to PyPI
|
|
81
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
release:
|
|
85
|
+
needs: pypi
|
|
86
|
+
runs-on: ubuntu-latest
|
|
87
|
+
|
|
88
|
+
permissions:
|
|
89
|
+
contents: write
|
|
90
|
+
|
|
91
|
+
steps:
|
|
92
|
+
- uses: actions/checkout@v4
|
|
93
|
+
|
|
94
|
+
- name: Generate Release Notes
|
|
95
|
+
uses: softprops/action-gh-release@v2
|
|
96
|
+
with:
|
|
97
|
+
generate_release_notes: true
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.pyo
|
|
5
|
+
*.egg-info/
|
|
6
|
+
|
|
7
|
+
# Virtual Environment
|
|
8
|
+
.venv/
|
|
9
|
+
venv/
|
|
10
|
+
|
|
11
|
+
# Pytest
|
|
12
|
+
.pytest_cache/
|
|
13
|
+
.mypy_cache/
|
|
14
|
+
.ruff_cache/
|
|
15
|
+
|
|
16
|
+
# Coverage
|
|
17
|
+
.coverage
|
|
18
|
+
htmlcov/
|
|
19
|
+
coverage.xml
|
|
20
|
+
|
|
21
|
+
# Logs
|
|
22
|
+
logs/
|
|
23
|
+
*.log
|
|
24
|
+
|
|
25
|
+
# Reports
|
|
26
|
+
reports/
|
|
27
|
+
.coverage.*
|
|
28
|
+
|
|
29
|
+
# macOS
|
|
30
|
+
.DS_Store
|
|
31
|
+
|
|
32
|
+
# IDE
|
|
33
|
+
.idea/
|
|
34
|
+
.vscode/
|
|
35
|
+
|
|
36
|
+
# Environment Variables
|
|
37
|
+
.env
|
|
38
|
+
|
|
39
|
+
# Build
|
|
40
|
+
build/
|
|
41
|
+
dist/
|
|
42
|
+
*.egg-info/
|
|
43
|
+
|
|
44
|
+
# Type checking
|
|
45
|
+
.mypy_cache/
|
|
46
|
+
.pyright/
|
|
47
|
+
.ruff_cache/
|
|
48
|
+
|
|
49
|
+
pyrestkit/_version.py
|
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to **PyRestKit** will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/) and this project follows [Semantic Versioning](https://semver.org/).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# [Unreleased]
|
|
10
|
+
|
|
11
|
+
## Added
|
|
12
|
+
|
|
13
|
+
* Placeholder for upcoming features.
|
|
14
|
+
|
|
15
|
+
## Changed
|
|
16
|
+
|
|
17
|
+
* Placeholder for improvements.
|
|
18
|
+
|
|
19
|
+
## Fixed
|
|
20
|
+
|
|
21
|
+
* Placeholder for bug fixes.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# [1.2.0] - 2026-07-05
|
|
26
|
+
|
|
27
|
+
## 🚀 Highlights
|
|
28
|
+
|
|
29
|
+
PyRestKit 1.2.0 introduces **AI-powered API failure analysis**, enabling developers to receive intelligent explanations for failed API validations using multiple Large Language Model (LLM) providers.
|
|
30
|
+
|
|
31
|
+
This release adds a provider-independent AI layer while maintaining full backward compatibility with existing PyRestKit users.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Added
|
|
36
|
+
|
|
37
|
+
### AI-Assisted Failure Analysis
|
|
38
|
+
|
|
39
|
+
* Added AI-powered failure analysis.
|
|
40
|
+
* Added provider-independent AI architecture.
|
|
41
|
+
* Added reusable AI analysis pipeline.
|
|
42
|
+
* Added prompt templating system.
|
|
43
|
+
* Added prompt loader with secure template rendering.
|
|
44
|
+
* Added AI configuration model.
|
|
45
|
+
* Added environment variable support for AI configuration.
|
|
46
|
+
* Added YAML-based AI configuration.
|
|
47
|
+
* Added configurable AI provider registry.
|
|
48
|
+
|
|
49
|
+
### Supported AI Providers
|
|
50
|
+
|
|
51
|
+
Added built-in support for:
|
|
52
|
+
|
|
53
|
+
* OpenAI
|
|
54
|
+
* Azure OpenAI
|
|
55
|
+
* Anthropic Claude
|
|
56
|
+
* Google Gemini
|
|
57
|
+
* Groq
|
|
58
|
+
* Mistral AI
|
|
59
|
+
* Cohere
|
|
60
|
+
* Ollama
|
|
61
|
+
* Amazon Bedrock
|
|
62
|
+
|
|
63
|
+
### AI Configuration
|
|
64
|
+
|
|
65
|
+
Added support for:
|
|
66
|
+
|
|
67
|
+
* Provider selection
|
|
68
|
+
* Model selection
|
|
69
|
+
* API keys
|
|
70
|
+
* Base URLs
|
|
71
|
+
* Organization identifiers
|
|
72
|
+
* Custom HTTP headers
|
|
73
|
+
* Temperature
|
|
74
|
+
* Maximum output tokens
|
|
75
|
+
* Request timeout
|
|
76
|
+
* Environment variable loading
|
|
77
|
+
* Mapping/YAML configuration loading
|
|
78
|
+
|
|
79
|
+
### AI Infrastructure
|
|
80
|
+
|
|
81
|
+
Added:
|
|
82
|
+
|
|
83
|
+
* `AIConfig`
|
|
84
|
+
* `BaseAIProvider`
|
|
85
|
+
* Provider abstraction layer
|
|
86
|
+
* Prompt loader
|
|
87
|
+
* Prompt templates
|
|
88
|
+
* Failure analyzer
|
|
89
|
+
* AI-specific exceptions
|
|
90
|
+
* Provider registry
|
|
91
|
+
|
|
92
|
+
### Testing
|
|
93
|
+
|
|
94
|
+
Added comprehensive unit tests covering:
|
|
95
|
+
|
|
96
|
+
* AI configuration
|
|
97
|
+
* Prompt loading
|
|
98
|
+
* Provider implementations
|
|
99
|
+
* Provider error handling
|
|
100
|
+
* HTTP failures
|
|
101
|
+
* Invalid responses
|
|
102
|
+
* Environment configuration
|
|
103
|
+
* Mapping configuration
|
|
104
|
+
* AI integration
|
|
105
|
+
|
|
106
|
+
### Documentation
|
|
107
|
+
|
|
108
|
+
Added:
|
|
109
|
+
|
|
110
|
+
* AI Guide
|
|
111
|
+
* AI Provider Guide
|
|
112
|
+
* Configuration Guide
|
|
113
|
+
* Examples
|
|
114
|
+
* Architecture documentation
|
|
115
|
+
* Authentication Guide
|
|
116
|
+
* Validation Guide
|
|
117
|
+
* Contributor Guide
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Changed
|
|
122
|
+
|
|
123
|
+
### Architecture
|
|
124
|
+
|
|
125
|
+
* Introduced modular AI provider architecture.
|
|
126
|
+
* Standardized provider interfaces.
|
|
127
|
+
* Unified provider response parsing.
|
|
128
|
+
* Improved internal extensibility.
|
|
129
|
+
|
|
130
|
+
### Developer Experience
|
|
131
|
+
|
|
132
|
+
* Improved error messages.
|
|
133
|
+
* Improved configuration validation.
|
|
134
|
+
* Improved type safety.
|
|
135
|
+
* Better provider customization.
|
|
136
|
+
* Cleaner AI integration API.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Fixed
|
|
141
|
+
|
|
142
|
+
* Configuration validation edge cases.
|
|
143
|
+
* Optional header handling.
|
|
144
|
+
* Provider response parsing inconsistencies.
|
|
145
|
+
* MyPy typing issues.
|
|
146
|
+
* Ruff lint violations.
|
|
147
|
+
* Prompt rendering validation.
|
|
148
|
+
* JSON parsing edge cases.
|
|
149
|
+
* Session injection for testing.
|
|
150
|
+
* Provider-specific validation issues.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
# [1.1.0] - 2026-07-04
|
|
155
|
+
|
|
156
|
+
## 🚀 Highlights
|
|
157
|
+
|
|
158
|
+
PyRestKit 1.1.0 focused on improving the core API automation experience through enhanced validation, configuration, documentation, and overall framework stability.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Added
|
|
163
|
+
|
|
164
|
+
### Core HTTP Client
|
|
165
|
+
|
|
166
|
+
* Improved HTTP request handling.
|
|
167
|
+
* Enhanced request configuration.
|
|
168
|
+
* Better response object usability.
|
|
169
|
+
|
|
170
|
+
### Authentication
|
|
171
|
+
|
|
172
|
+
Support for:
|
|
173
|
+
|
|
174
|
+
* Bearer Token Authentication
|
|
175
|
+
* Basic Authentication
|
|
176
|
+
* API Key Authentication
|
|
177
|
+
|
|
178
|
+
### Validation
|
|
179
|
+
|
|
180
|
+
Added and improved:
|
|
181
|
+
|
|
182
|
+
* Status code validation
|
|
183
|
+
* Response header validation
|
|
184
|
+
* JSON validation
|
|
185
|
+
* JSON Schema validation
|
|
186
|
+
* Response time validation
|
|
187
|
+
|
|
188
|
+
### Configuration
|
|
189
|
+
|
|
190
|
+
Added support for:
|
|
191
|
+
|
|
192
|
+
* YAML configuration
|
|
193
|
+
* Environment variables
|
|
194
|
+
* Default request headers
|
|
195
|
+
* Configurable timeouts
|
|
196
|
+
|
|
197
|
+
### Documentation
|
|
198
|
+
|
|
199
|
+
Added comprehensive project documentation including:
|
|
200
|
+
|
|
201
|
+
* Installation Guide
|
|
202
|
+
* Quick Start Guide
|
|
203
|
+
* Authentication Guide
|
|
204
|
+
* Validation Guide
|
|
205
|
+
* Examples
|
|
206
|
+
* Architecture documentation
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## Changed
|
|
211
|
+
|
|
212
|
+
* Improved validation API.
|
|
213
|
+
* Improved exception messages.
|
|
214
|
+
* Improved project structure.
|
|
215
|
+
* Improved documentation quality.
|
|
216
|
+
* Refactored internal validation modules.
|
|
217
|
+
* Better developer experience.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Fixed
|
|
222
|
+
|
|
223
|
+
* Validation edge cases.
|
|
224
|
+
* Response parsing improvements.
|
|
225
|
+
* Minor documentation corrections.
|
|
226
|
+
* Internal refactoring and stability improvements.
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
# [1.0.0] - Initial Release
|
|
231
|
+
|
|
232
|
+
## 🎉 Initial Public Release
|
|
233
|
+
|
|
234
|
+
### Added
|
|
235
|
+
|
|
236
|
+
Core framework functionality including:
|
|
237
|
+
|
|
238
|
+
### HTTP Methods
|
|
239
|
+
|
|
240
|
+
* GET
|
|
241
|
+
* POST
|
|
242
|
+
* PUT
|
|
243
|
+
* PATCH
|
|
244
|
+
* DELETE
|
|
245
|
+
|
|
246
|
+
### Authentication
|
|
247
|
+
|
|
248
|
+
* Bearer Authentication
|
|
249
|
+
* Basic Authentication
|
|
250
|
+
* API Key Authentication
|
|
251
|
+
|
|
252
|
+
### Validation
|
|
253
|
+
|
|
254
|
+
* Status Code Validation
|
|
255
|
+
* Header Validation
|
|
256
|
+
* JSON Validation
|
|
257
|
+
* JSON Schema Validation
|
|
258
|
+
* Response Time Validation
|
|
259
|
+
|
|
260
|
+
### Configuration
|
|
261
|
+
|
|
262
|
+
* Environment Variable Support
|
|
263
|
+
* YAML Configuration
|
|
264
|
+
* Default Headers
|
|
265
|
+
|
|
266
|
+
### Testing Support
|
|
267
|
+
|
|
268
|
+
* Pytest Integration
|
|
269
|
+
* Validation Helpers
|
|
270
|
+
* Response Utilities
|
|
271
|
+
|
|
272
|
+
### Documentation
|
|
273
|
+
|
|
274
|
+
* README
|
|
275
|
+
* Installation Guide
|
|
276
|
+
* Basic Usage Examples
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
# Upgrade Guide
|
|
281
|
+
|
|
282
|
+
## Upgrading from 1.0.x to 1.1.x
|
|
283
|
+
|
|
284
|
+
No breaking changes.
|
|
285
|
+
|
|
286
|
+
Upgrade normally:
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
pip install --upgrade pyrestkit
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Upgrading from 1.1.x to 1.2.x
|
|
295
|
+
|
|
296
|
+
No breaking changes.
|
|
297
|
+
|
|
298
|
+
AI functionality is completely optional.
|
|
299
|
+
|
|
300
|
+
Existing API automation projects continue to work without modification.
|
|
301
|
+
|
|
302
|
+
To enable AI features:
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
pip install "pyrestkit[ai]"
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Example:
|
|
309
|
+
|
|
310
|
+
```python
|
|
311
|
+
from pyrestkit.ai import AIConfig
|
|
312
|
+
|
|
313
|
+
config = AIConfig(
|
|
314
|
+
provider="openai",
|
|
315
|
+
model="gpt-4.1-mini",
|
|
316
|
+
api_key="YOUR_API_KEY",
|
|
317
|
+
)
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
AI analysis is enabled only when explicitly configured.
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
# Roadmap
|
|
325
|
+
|
|
326
|
+
Planned future enhancements include:
|
|
327
|
+
|
|
328
|
+
## v1.3.x
|
|
329
|
+
|
|
330
|
+
* Async HTTP client
|
|
331
|
+
* Retry and backoff strategies
|
|
332
|
+
* Request/response logging
|
|
333
|
+
* CLI utilities
|
|
334
|
+
|
|
335
|
+
## v1.4.x
|
|
336
|
+
|
|
337
|
+
* OpenAPI/Swagger import
|
|
338
|
+
* AI-powered test generation
|
|
339
|
+
* Plugin architecture
|
|
340
|
+
* HTML reporting
|
|
341
|
+
|
|
342
|
+
## Future
|
|
343
|
+
|
|
344
|
+
* GraphQL support
|
|
345
|
+
* WebSocket testing
|
|
346
|
+
* Performance testing utilities
|
|
347
|
+
* Mock server integration
|
|
348
|
+
* AI-generated API documentation
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
# Support
|
|
353
|
+
|
|
354
|
+
For bug reports, feature requests, or questions:
|
|
355
|
+
|
|
356
|
+
* Open a GitHub Issue
|
|
357
|
+
* Submit a Pull Request
|
|
358
|
+
* Start a GitHub Discussion
|
|
359
|
+
|
|
360
|
+
Community contributions are welcome.
|