Python: [Purview] Add Caching and background processing in Python Purview Middleware (#1844)

* [PythonPurview] Add Caching and background processing

* [PythonPurview] Updates based on comments
This commit is contained in:
Rishabh Chawla
2025-11-07 07:43:22 +00:00
committed by GitHub
parent 820c6afe09
commit 64826b8f56
21 changed files with 1657 additions and 124 deletions
@@ -4,6 +4,7 @@
from agent_framework_purview import (
PurviewAuthenticationError,
PurviewPaymentRequiredError,
PurviewRateLimitError,
PurviewRequestError,
PurviewServiceError,
@@ -25,6 +26,12 @@ class TestPurviewExceptions:
assert str(error) == "Authentication failed"
assert isinstance(error, PurviewServiceError)
def test_purview_payment_required_error(self) -> None:
"""Test PurviewPaymentRequiredError exception."""
error = PurviewPaymentRequiredError("Payment required")
assert str(error) == "Payment required"
assert isinstance(error, PurviewServiceError)
def test_purview_rate_limit_error(self) -> None:
"""Test PurviewRateLimitError exception."""
error = PurviewRateLimitError("Rate limit exceeded")