Skip to content

Commit 7be83b9

Browse files
Add API key validation, enhance /up client methods
- Implemented UUID format validation for API keys. - Enhanced the `/up` client methods to accept additional headers, query parameters, and timeouts. - Raised `PdfRestAuthenticationError` for authentication failures. - Refactored request composition for improved reuse and readability. - Updated tests to cover new validations and functionalities.
1 parent da75861 commit 7be83b9

5 files changed

Lines changed: 423 additions & 114 deletions

File tree

src/pdfrest/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
from importlib import metadata
44

5-
from .client import AsyncPdfRestClient, PdfRestClient, RequestOptions, UpRequestOptions
5+
from .client import AsyncPdfRestClient, PdfRestClient
66
from .exceptions import (
77
PdfRestApiError,
8+
PdfRestAuthenticationError,
89
PdfRestConfigurationError,
910
PdfRestError,
1011
PdfRestRequestError,
@@ -17,14 +18,13 @@
1718
__all__ = (
1819
"AsyncPdfRestClient",
1920
"PdfRestApiError",
21+
"PdfRestAuthenticationError",
2022
"PdfRestClient",
2123
"PdfRestConfigurationError",
2224
"PdfRestError",
2325
"PdfRestRequestError",
2426
"PdfRestTimeoutError",
2527
"PdfRestTransportError",
26-
"RequestOptions",
27-
"UpRequestOptions",
2828
"UpResponse",
2929
"__version__",
3030
"translate_httpx_error",

0 commit comments

Comments
 (0)