apiverve-codedetector 1.1.14__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.
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 APIVerve, and Evlar LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,369 @@
1
+ Metadata-Version: 2.4
2
+ Name: apiverve-codedetector
3
+ Version: 1.1.14
4
+ Summary: Code Detector is a simple tool for detecting the language of code in text. It returns details such as extension, language, family, and more.
5
+ Author-email: APIVerve <hello@apiverve.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://apiverve.com?utm_source=pypi
8
+ Project-URL: Repository, https://github.com/apiverve/codedetector-api
9
+ Project-URL: Documentation, https://docs.apiverve.com/api/codedetector?utm_source=pypi
10
+ Project-URL: Twitter, https://twitter.com/apivervehq
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: Financial and Insurance Industry
16
+ Classifier: Intended Audience :: Healthcare Industry
17
+ Classifier: Intended Audience :: Education
18
+ Classifier: Intended Audience :: Science/Research
19
+ Classifier: Intended Audience :: Information Technology
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: Utilities
22
+ Classifier: Topic :: Scientific/Engineering
23
+ Classifier: Topic :: Education
24
+ Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
25
+ Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
26
+ Classifier: Topic :: Internet :: WWW/HTTP
27
+ Classifier: Topic :: Software Development :: Libraries
28
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
29
+ Classifier: Topic :: Internet
30
+ Classifier: Topic :: Communications
31
+ Classifier: Topic :: Office/Business
32
+ Classifier: Topic :: Text Processing
33
+ Classifier: Topic :: Security
34
+ Classifier: Topic :: Database
35
+ Classifier: Topic :: Software Development :: Code Generators
36
+ Classifier: Topic :: Software Development :: Pre-processors
37
+ Classifier: Topic :: Software Development :: Quality Assurance
38
+ Classifier: Topic :: Software Development :: Testing
39
+ Classifier: Natural Language :: English
40
+ Requires-Python: >=3.7
41
+ Description-Content-Type: text/markdown
42
+ License-File: LICENSE
43
+ Requires-Dist: requests>=2.25.0
44
+ Dynamic: license-file
45
+
46
+ Code Detector API
47
+ ============
48
+
49
+ Code Detector is a simple tool for detecting the language of code in text. It returns details such as extension, language, family, and more.
50
+
51
+ ![Build Status](https://img.shields.io/badge/build-passing-green)
52
+ ![Code Climate](https://img.shields.io/badge/maintainability-B-purple)
53
+ ![Prod Ready](https://img.shields.io/badge/production-ready-blue)
54
+
55
+ This is a Python API Wrapper for the [Code Detector API](https://apiverve.com/marketplace/codedetector?utm_source=pypi&utm_medium=readme)
56
+
57
+ ---
58
+
59
+ ## Installation
60
+
61
+ Using `pip`:
62
+
63
+ ```bash
64
+ pip install apiverve-codedetector
65
+ ```
66
+
67
+ Using `pip3`:
68
+
69
+ ```bash
70
+ pip3 install apiverve-codedetector
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Configuration
76
+
77
+ Before using the codedetector API client, you have to setup your account and obtain your API Key.
78
+ You can get it by signing up at [https://apiverve.com](https://apiverve.com?utm_source=pypi&utm_medium=readme)
79
+
80
+ ---
81
+
82
+ ## Quick Start
83
+
84
+ Here's a simple example to get you started quickly:
85
+
86
+ ```python
87
+ from apiverve_codedetector.apiClient import CodedetectorAPIClient
88
+
89
+ # Initialize the client with your APIVerve API key
90
+ api = CodedetectorAPIClient("[YOUR_API_KEY]")
91
+
92
+ query = { "code": "a = 5
93
+ b = 6
94
+ c = 7
95
+
96
+ # calculate the semi-perimeter
97
+ s = (a + b + c) / 2
98
+
99
+ # calculate the area
100
+ area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
101
+ print('The area of the triangle is %0.2f' %area)" }
102
+
103
+ try:
104
+ # Make the API call
105
+ result = api.execute(query)
106
+
107
+ # Print the result
108
+ print(result)
109
+ except Exception as e:
110
+ print(f"Error: {e}")
111
+ ```
112
+
113
+ ---
114
+
115
+ ## Usage
116
+
117
+ The Code Detector API documentation is found here: [https://docs.apiverve.com/ref/codedetector](https://docs.apiverve.com/ref/codedetector?utm_source=pypi&utm_medium=readme).
118
+ You can find parameters, example responses, and status codes documented here.
119
+
120
+ ### Setup
121
+
122
+ ```python
123
+ # Import the client module
124
+ from apiverve_codedetector.apiClient import CodedetectorAPIClient
125
+
126
+ # Initialize the client with your APIVerve API key
127
+ api = CodedetectorAPIClient("[YOUR_API_KEY]")
128
+ ```
129
+
130
+ ---
131
+
132
+ ## Perform Request
133
+
134
+ Using the API client, you can perform requests to the API.
135
+
136
+ ###### Define Query
137
+
138
+ ```python
139
+ query = { "code": "a = 5
140
+ b = 6
141
+ c = 7
142
+
143
+ # calculate the semi-perimeter
144
+ s = (a + b + c) / 2
145
+
146
+ # calculate the area
147
+ area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
148
+ print('The area of the triangle is %0.2f' %area)" }
149
+ ```
150
+
151
+ ###### Simple Request
152
+
153
+ ```python
154
+ # Make a request to the API
155
+ result = api.execute(query)
156
+
157
+ # Print the result
158
+ print(result)
159
+ ```
160
+
161
+ ###### Example Response
162
+
163
+ ```json
164
+ {
165
+ "status": "ok",
166
+ "error": null,
167
+ "data": {
168
+ "likelihood": 0.99,
169
+ "family": "PYTHON",
170
+ "current": "python",
171
+ "readable": "Python Code",
172
+ "extension": ".py"
173
+ }
174
+ }
175
+ ```
176
+
177
+ ---
178
+
179
+ ## Error Handling
180
+
181
+ The API client provides comprehensive error handling through the `CodedetectorAPIClientError` exception. Here are some examples:
182
+
183
+ ### Basic Error Handling
184
+
185
+ ```python
186
+ from apiverve_codedetector.apiClient import CodedetectorAPIClient, CodedetectorAPIClientError
187
+
188
+ api = CodedetectorAPIClient("[YOUR_API_KEY]")
189
+
190
+ query = { "code": "a = 5
191
+ b = 6
192
+ c = 7
193
+
194
+ # calculate the semi-perimeter
195
+ s = (a + b + c) / 2
196
+
197
+ # calculate the area
198
+ area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
199
+ print('The area of the triangle is %0.2f' %area)" }
200
+
201
+ try:
202
+ result = api.execute(query)
203
+ print("Success!")
204
+ print(result)
205
+ except CodedetectorAPIClientError as e:
206
+ print(f"API Error: {e.message}")
207
+ if e.status_code:
208
+ print(f"Status Code: {e.status_code}")
209
+ if e.response:
210
+ print(f"Response: {e.response}")
211
+ ```
212
+
213
+ ### Handling Specific Error Types
214
+
215
+ ```python
216
+ from apiverve_codedetector.apiClient import CodedetectorAPIClient, CodedetectorAPIClientError
217
+
218
+ api = CodedetectorAPIClient("[YOUR_API_KEY]")
219
+
220
+ query = { "code": "a = 5
221
+ b = 6
222
+ c = 7
223
+
224
+ # calculate the semi-perimeter
225
+ s = (a + b + c) / 2
226
+
227
+ # calculate the area
228
+ area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
229
+ print('The area of the triangle is %0.2f' %area)" }
230
+
231
+ try:
232
+ result = api.execute(query)
233
+
234
+ # Check for successful response
235
+ if result.get('status') == 'success':
236
+ print("Request successful!")
237
+ print(result.get('data'))
238
+ else:
239
+ print(f"API returned an error: {result.get('error')}")
240
+
241
+ except CodedetectorAPIClientError as e:
242
+ # Handle API client errors
243
+ if e.status_code == 401:
244
+ print("Unauthorized: Invalid API key")
245
+ elif e.status_code == 429:
246
+ print("Rate limit exceeded")
247
+ elif e.status_code >= 500:
248
+ print("Server error - please try again later")
249
+ else:
250
+ print(f"API error: {e.message}")
251
+ except Exception as e:
252
+ # Handle unexpected errors
253
+ print(f"Unexpected error: {str(e)}")
254
+ ```
255
+
256
+ ### Using Context Manager (Recommended)
257
+
258
+ The client supports the context manager protocol for automatic resource cleanup:
259
+
260
+ ```python
261
+ from apiverve_codedetector.apiClient import CodedetectorAPIClient, CodedetectorAPIClientError
262
+
263
+ query = { "code": "a = 5
264
+ b = 6
265
+ c = 7
266
+
267
+ # calculate the semi-perimeter
268
+ s = (a + b + c) / 2
269
+
270
+ # calculate the area
271
+ area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
272
+ print('The area of the triangle is %0.2f' %area)" }
273
+
274
+ # Using context manager ensures proper cleanup
275
+ with CodedetectorAPIClient("[YOUR_API_KEY]") as api:
276
+ try:
277
+ result = api.execute(query)
278
+ print(result)
279
+ except CodedetectorAPIClientError as e:
280
+ print(f"Error: {e.message}")
281
+ # Session is automatically closed here
282
+ ```
283
+
284
+ ---
285
+
286
+ ## Advanced Features
287
+
288
+ ### Debug Mode
289
+
290
+ Enable debug logging to see detailed request and response information:
291
+
292
+ ```python
293
+ from apiverve_codedetector.apiClient import CodedetectorAPIClient
294
+
295
+ # Enable debug mode
296
+ api = CodedetectorAPIClient("[YOUR_API_KEY]", debug=True)
297
+
298
+ query = { "code": "a = 5
299
+ b = 6
300
+ c = 7
301
+
302
+ # calculate the semi-perimeter
303
+ s = (a + b + c) / 2
304
+
305
+ # calculate the area
306
+ area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
307
+ print('The area of the triangle is %0.2f' %area)" }
308
+
309
+ # Debug information will be printed to console
310
+ result = api.execute(query)
311
+ ```
312
+
313
+ ### Manual Session Management
314
+
315
+ If you need to manually manage the session lifecycle:
316
+
317
+ ```python
318
+ from apiverve_codedetector.apiClient import CodedetectorAPIClient
319
+
320
+ api = CodedetectorAPIClient("[YOUR_API_KEY]")
321
+
322
+ query = { "code": "a = 5
323
+ b = 6
324
+ c = 7
325
+
326
+ # calculate the semi-perimeter
327
+ s = (a + b + c) / 2
328
+
329
+ # calculate the area
330
+ area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
331
+ print('The area of the triangle is %0.2f' %area)" }
332
+
333
+ try:
334
+ result = api.execute(query)
335
+ print(result)
336
+ finally:
337
+ # Manually close the session when done
338
+ api.close()
339
+ ```
340
+
341
+ ---
342
+
343
+ ## Customer Support
344
+
345
+ Need any assistance? [Get in touch with Customer Support](https://apiverve.com/contact?utm_source=pypi&utm_medium=readme).
346
+
347
+ ---
348
+
349
+ ## Updates
350
+ Stay up to date by following [@apiverveHQ](https://twitter.com/apiverveHQ) on Twitter.
351
+
352
+ ---
353
+
354
+ ## Legal
355
+
356
+ All usage of the APIVerve website, API, and services is subject to the [APIVerve Terms of Service](https://apiverve.com/terms?utm_source=pypi&utm_medium=readme) and all legal documents and agreements.
357
+
358
+ ---
359
+
360
+ ## License
361
+ Licensed under the The MIT License (MIT)
362
+
363
+ Copyright (&copy;) 2026 APIVerve, and EvlarSoft LLC
364
+
365
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
366
+
367
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
368
+
369
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,324 @@
1
+ Code Detector API
2
+ ============
3
+
4
+ Code Detector is a simple tool for detecting the language of code in text. It returns details such as extension, language, family, and more.
5
+
6
+ ![Build Status](https://img.shields.io/badge/build-passing-green)
7
+ ![Code Climate](https://img.shields.io/badge/maintainability-B-purple)
8
+ ![Prod Ready](https://img.shields.io/badge/production-ready-blue)
9
+
10
+ This is a Python API Wrapper for the [Code Detector API](https://apiverve.com/marketplace/codedetector?utm_source=pypi&utm_medium=readme)
11
+
12
+ ---
13
+
14
+ ## Installation
15
+
16
+ Using `pip`:
17
+
18
+ ```bash
19
+ pip install apiverve-codedetector
20
+ ```
21
+
22
+ Using `pip3`:
23
+
24
+ ```bash
25
+ pip3 install apiverve-codedetector
26
+ ```
27
+
28
+ ---
29
+
30
+ ## Configuration
31
+
32
+ Before using the codedetector API client, you have to setup your account and obtain your API Key.
33
+ You can get it by signing up at [https://apiverve.com](https://apiverve.com?utm_source=pypi&utm_medium=readme)
34
+
35
+ ---
36
+
37
+ ## Quick Start
38
+
39
+ Here's a simple example to get you started quickly:
40
+
41
+ ```python
42
+ from apiverve_codedetector.apiClient import CodedetectorAPIClient
43
+
44
+ # Initialize the client with your APIVerve API key
45
+ api = CodedetectorAPIClient("[YOUR_API_KEY]")
46
+
47
+ query = { "code": "a = 5
48
+ b = 6
49
+ c = 7
50
+
51
+ # calculate the semi-perimeter
52
+ s = (a + b + c) / 2
53
+
54
+ # calculate the area
55
+ area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
56
+ print('The area of the triangle is %0.2f' %area)" }
57
+
58
+ try:
59
+ # Make the API call
60
+ result = api.execute(query)
61
+
62
+ # Print the result
63
+ print(result)
64
+ except Exception as e:
65
+ print(f"Error: {e}")
66
+ ```
67
+
68
+ ---
69
+
70
+ ## Usage
71
+
72
+ The Code Detector API documentation is found here: [https://docs.apiverve.com/ref/codedetector](https://docs.apiverve.com/ref/codedetector?utm_source=pypi&utm_medium=readme).
73
+ You can find parameters, example responses, and status codes documented here.
74
+
75
+ ### Setup
76
+
77
+ ```python
78
+ # Import the client module
79
+ from apiverve_codedetector.apiClient import CodedetectorAPIClient
80
+
81
+ # Initialize the client with your APIVerve API key
82
+ api = CodedetectorAPIClient("[YOUR_API_KEY]")
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Perform Request
88
+
89
+ Using the API client, you can perform requests to the API.
90
+
91
+ ###### Define Query
92
+
93
+ ```python
94
+ query = { "code": "a = 5
95
+ b = 6
96
+ c = 7
97
+
98
+ # calculate the semi-perimeter
99
+ s = (a + b + c) / 2
100
+
101
+ # calculate the area
102
+ area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
103
+ print('The area of the triangle is %0.2f' %area)" }
104
+ ```
105
+
106
+ ###### Simple Request
107
+
108
+ ```python
109
+ # Make a request to the API
110
+ result = api.execute(query)
111
+
112
+ # Print the result
113
+ print(result)
114
+ ```
115
+
116
+ ###### Example Response
117
+
118
+ ```json
119
+ {
120
+ "status": "ok",
121
+ "error": null,
122
+ "data": {
123
+ "likelihood": 0.99,
124
+ "family": "PYTHON",
125
+ "current": "python",
126
+ "readable": "Python Code",
127
+ "extension": ".py"
128
+ }
129
+ }
130
+ ```
131
+
132
+ ---
133
+
134
+ ## Error Handling
135
+
136
+ The API client provides comprehensive error handling through the `CodedetectorAPIClientError` exception. Here are some examples:
137
+
138
+ ### Basic Error Handling
139
+
140
+ ```python
141
+ from apiverve_codedetector.apiClient import CodedetectorAPIClient, CodedetectorAPIClientError
142
+
143
+ api = CodedetectorAPIClient("[YOUR_API_KEY]")
144
+
145
+ query = { "code": "a = 5
146
+ b = 6
147
+ c = 7
148
+
149
+ # calculate the semi-perimeter
150
+ s = (a + b + c) / 2
151
+
152
+ # calculate the area
153
+ area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
154
+ print('The area of the triangle is %0.2f' %area)" }
155
+
156
+ try:
157
+ result = api.execute(query)
158
+ print("Success!")
159
+ print(result)
160
+ except CodedetectorAPIClientError as e:
161
+ print(f"API Error: {e.message}")
162
+ if e.status_code:
163
+ print(f"Status Code: {e.status_code}")
164
+ if e.response:
165
+ print(f"Response: {e.response}")
166
+ ```
167
+
168
+ ### Handling Specific Error Types
169
+
170
+ ```python
171
+ from apiverve_codedetector.apiClient import CodedetectorAPIClient, CodedetectorAPIClientError
172
+
173
+ api = CodedetectorAPIClient("[YOUR_API_KEY]")
174
+
175
+ query = { "code": "a = 5
176
+ b = 6
177
+ c = 7
178
+
179
+ # calculate the semi-perimeter
180
+ s = (a + b + c) / 2
181
+
182
+ # calculate the area
183
+ area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
184
+ print('The area of the triangle is %0.2f' %area)" }
185
+
186
+ try:
187
+ result = api.execute(query)
188
+
189
+ # Check for successful response
190
+ if result.get('status') == 'success':
191
+ print("Request successful!")
192
+ print(result.get('data'))
193
+ else:
194
+ print(f"API returned an error: {result.get('error')}")
195
+
196
+ except CodedetectorAPIClientError as e:
197
+ # Handle API client errors
198
+ if e.status_code == 401:
199
+ print("Unauthorized: Invalid API key")
200
+ elif e.status_code == 429:
201
+ print("Rate limit exceeded")
202
+ elif e.status_code >= 500:
203
+ print("Server error - please try again later")
204
+ else:
205
+ print(f"API error: {e.message}")
206
+ except Exception as e:
207
+ # Handle unexpected errors
208
+ print(f"Unexpected error: {str(e)}")
209
+ ```
210
+
211
+ ### Using Context Manager (Recommended)
212
+
213
+ The client supports the context manager protocol for automatic resource cleanup:
214
+
215
+ ```python
216
+ from apiverve_codedetector.apiClient import CodedetectorAPIClient, CodedetectorAPIClientError
217
+
218
+ query = { "code": "a = 5
219
+ b = 6
220
+ c = 7
221
+
222
+ # calculate the semi-perimeter
223
+ s = (a + b + c) / 2
224
+
225
+ # calculate the area
226
+ area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
227
+ print('The area of the triangle is %0.2f' %area)" }
228
+
229
+ # Using context manager ensures proper cleanup
230
+ with CodedetectorAPIClient("[YOUR_API_KEY]") as api:
231
+ try:
232
+ result = api.execute(query)
233
+ print(result)
234
+ except CodedetectorAPIClientError as e:
235
+ print(f"Error: {e.message}")
236
+ # Session is automatically closed here
237
+ ```
238
+
239
+ ---
240
+
241
+ ## Advanced Features
242
+
243
+ ### Debug Mode
244
+
245
+ Enable debug logging to see detailed request and response information:
246
+
247
+ ```python
248
+ from apiverve_codedetector.apiClient import CodedetectorAPIClient
249
+
250
+ # Enable debug mode
251
+ api = CodedetectorAPIClient("[YOUR_API_KEY]", debug=True)
252
+
253
+ query = { "code": "a = 5
254
+ b = 6
255
+ c = 7
256
+
257
+ # calculate the semi-perimeter
258
+ s = (a + b + c) / 2
259
+
260
+ # calculate the area
261
+ area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
262
+ print('The area of the triangle is %0.2f' %area)" }
263
+
264
+ # Debug information will be printed to console
265
+ result = api.execute(query)
266
+ ```
267
+
268
+ ### Manual Session Management
269
+
270
+ If you need to manually manage the session lifecycle:
271
+
272
+ ```python
273
+ from apiverve_codedetector.apiClient import CodedetectorAPIClient
274
+
275
+ api = CodedetectorAPIClient("[YOUR_API_KEY]")
276
+
277
+ query = { "code": "a = 5
278
+ b = 6
279
+ c = 7
280
+
281
+ # calculate the semi-perimeter
282
+ s = (a + b + c) / 2
283
+
284
+ # calculate the area
285
+ area = (s*(s-a)*(s-b)*(s-c)) ** 0.5
286
+ print('The area of the triangle is %0.2f' %area)" }
287
+
288
+ try:
289
+ result = api.execute(query)
290
+ print(result)
291
+ finally:
292
+ # Manually close the session when done
293
+ api.close()
294
+ ```
295
+
296
+ ---
297
+
298
+ ## Customer Support
299
+
300
+ Need any assistance? [Get in touch with Customer Support](https://apiverve.com/contact?utm_source=pypi&utm_medium=readme).
301
+
302
+ ---
303
+
304
+ ## Updates
305
+ Stay up to date by following [@apiverveHQ](https://twitter.com/apiverveHQ) on Twitter.
306
+
307
+ ---
308
+
309
+ ## Legal
310
+
311
+ All usage of the APIVerve website, API, and services is subject to the [APIVerve Terms of Service](https://apiverve.com/terms?utm_source=pypi&utm_medium=readme) and all legal documents and agreements.
312
+
313
+ ---
314
+
315
+ ## License
316
+ Licensed under the The MIT License (MIT)
317
+
318
+ Copyright (&copy;) 2026 APIVerve, and EvlarSoft LLC
319
+
320
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
321
+
322
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
323
+
324
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.