deepxl-python-sdk 1.0.0__tar.gz → 1.0.1__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.
- {deepxl_python_sdk-1.0.0/src/deepxl_python_sdk.egg-info → deepxl_python_sdk-1.0.1}/PKG-INFO +1 -1
- {deepxl_python_sdk-1.0.0 → deepxl_python_sdk-1.0.1}/pyproject.toml +1 -1
- {deepxl_python_sdk-1.0.0 → deepxl_python_sdk-1.0.1}/src/deepxl_python_sdk/client.py +21 -0
- {deepxl_python_sdk-1.0.0 → deepxl_python_sdk-1.0.1/src/deepxl_python_sdk.egg-info}/PKG-INFO +1 -1
- {deepxl_python_sdk-1.0.0 → deepxl_python_sdk-1.0.1}/LICENSE +0 -0
- {deepxl_python_sdk-1.0.0 → deepxl_python_sdk-1.0.1}/README.md +0 -0
- {deepxl_python_sdk-1.0.0 → deepxl_python_sdk-1.0.1}/setup.cfg +0 -0
- {deepxl_python_sdk-1.0.0 → deepxl_python_sdk-1.0.1}/src/deepxl_python_sdk/__init__.py +0 -0
- {deepxl_python_sdk-1.0.0 → deepxl_python_sdk-1.0.1}/src/deepxl_python_sdk/error.py +0 -0
- {deepxl_python_sdk-1.0.0 → deepxl_python_sdk-1.0.1}/src/deepxl_python_sdk/mimetypes.py +0 -0
- {deepxl_python_sdk-1.0.0 → deepxl_python_sdk-1.0.1}/src/deepxl_python_sdk.egg-info/SOURCES.txt +0 -0
- {deepxl_python_sdk-1.0.0 → deepxl_python_sdk-1.0.1}/src/deepxl_python_sdk.egg-info/dependency_links.txt +0 -0
- {deepxl_python_sdk-1.0.0 → deepxl_python_sdk-1.0.1}/src/deepxl_python_sdk.egg-info/top_level.txt +0 -0
- {deepxl_python_sdk-1.0.0 → deepxl_python_sdk-1.0.1}/test/test_client.py +0 -0
|
@@ -57,10 +57,15 @@ def handle_http_error(res):
|
|
|
57
57
|
|
|
58
58
|
class DeepXLClient:
|
|
59
59
|
def __init__(self, api_key):
|
|
60
|
+
"""Initialize the DeepXL client with the given API key.
|
|
61
|
+
args:
|
|
62
|
+
api_key (str): The API key to use for authentication.
|
|
63
|
+
"""
|
|
60
64
|
self.api_key = api_key
|
|
61
65
|
|
|
62
66
|
|
|
63
67
|
def check_usage(self):
|
|
68
|
+
"""Return the usage and limits of the account."""
|
|
64
69
|
res = requests.get(
|
|
65
70
|
URL + "v1/account/",
|
|
66
71
|
headers={ "x-api-key": self.api_key },
|
|
@@ -86,6 +91,15 @@ class DeepXLClient:
|
|
|
86
91
|
|
|
87
92
|
|
|
88
93
|
def analyze(self, model_name: str, file_name: str, file_data: bytes):
|
|
94
|
+
"""Analyze file data with the given model and return the result.
|
|
95
|
+
|
|
96
|
+
args:
|
|
97
|
+
model_name (str): The name of the model to use for analysis.
|
|
98
|
+
file_name (str): The name of the file to analyze.
|
|
99
|
+
file_data (bytes): The file data to analyze.
|
|
100
|
+
returns:
|
|
101
|
+
AnalysisResponse: The analysis result.
|
|
102
|
+
"""
|
|
89
103
|
if (len(file_data) == 0):
|
|
90
104
|
raise DeepXLError("File data is missing or invalid.")
|
|
91
105
|
try:
|
|
@@ -119,6 +133,13 @@ class DeepXLClient:
|
|
|
119
133
|
|
|
120
134
|
|
|
121
135
|
def analyze_file(self, model_name: str, file: str):
|
|
136
|
+
"""Analyze a file witht the given model and return the result.
|
|
137
|
+
args:
|
|
138
|
+
model_name (str): The name of the model to use for analysis.
|
|
139
|
+
file (str): The path to the file to analyze.
|
|
140
|
+
returns:
|
|
141
|
+
AnalysisResponse: The analysis result.
|
|
142
|
+
"""
|
|
122
143
|
f = None
|
|
123
144
|
try:
|
|
124
145
|
f = open(file, "rb")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{deepxl_python_sdk-1.0.0 → deepxl_python_sdk-1.0.1}/src/deepxl_python_sdk.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{deepxl_python_sdk-1.0.0 → deepxl_python_sdk-1.0.1}/src/deepxl_python_sdk.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|