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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepxl-python-sdk
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: Python Software Development Kit for DeepXL AI Fraud Detection Services
5
5
  Author-email: deepxl <david@deepxl.ai>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "deepxl-python-sdk"
3
- version = "1.0.0"
3
+ version = "1.0.1"
4
4
  authors = [
5
5
  { name="deepxl", email="david@deepxl.ai" },
6
6
  ]
@@ -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")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepxl-python-sdk
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: Python Software Development Kit for DeepXL AI Fraud Detection Services
5
5
  Author-email: deepxl <david@deepxl.ai>
6
6
  License-Expression: MIT