apiverve-csrparser 1.2.3__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) 2026 APIVerve and EvlarSoft 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,422 @@
1
+ Metadata-Version: 2.4
2
+ Name: apiverve-csrparser
3
+ Version: 1.2.3
4
+ Summary: CSR Parser extracts and analyzes information from Certificate Signing Requests (CSRs), providing detailed subject information, public key details, and fingerprints.
5
+ Author-email: APIVerve <hello@apiverve.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://apiverve.com/marketplace/csrparser?utm_source=pypi&utm_medium=referral&utm_content=homepage
8
+ Project-URL: Documentation, https://docs.apiverve.com/ref/csrparser?utm_source=pypi&utm_medium=referral&utm_content=docs
9
+ Project-URL: Repository, https://github.com/apiverve/csrparser-api
10
+ Project-URL: Twitter, https://twitter.com/apivervehq
11
+ Keywords: csr parser,certificate signing request,ssl certificate,x509,pem format
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Topic :: Internet :: WWW/HTTP
17
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
+ Classifier: Natural Language :: English
19
+ Requires-Python: >=3.9
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: requests>=2.25.0
23
+ Dynamic: license-file
24
+
25
+ CSR Parser API
26
+ ============
27
+
28
+ CSR Parser extracts and analyzes information from Certificate Signing Requests (CSRs), providing detailed subject information, public key details, and fingerprints.
29
+
30
+
31
+ [![PyPI version](https://img.shields.io/pypi/v/apiverve-csrparser.svg)](https://pypi.org/project/apiverve-csrparser/)
32
+
33
+ This is a Python wrapper for the [CSR Parser API](https://apiverve.com/marketplace/csrparser?utm_source=pypi&utm_medium=referral&utm_content=readme)
34
+
35
+ ---
36
+
37
+ ## Installation
38
+
39
+ Using `pip`:
40
+
41
+ ```bash
42
+ pip install apiverve-csrparser
43
+ ```
44
+
45
+ Using `pip3`:
46
+
47
+ ```bash
48
+ pip3 install apiverve-csrparser
49
+ ```
50
+
51
+ ---
52
+
53
+ ## Configuration
54
+
55
+ Before using the CSR Parser API client, you have to setup your account and obtain your API Key.
56
+ You can get it by signing up at [https://apiverve.com](https://apiverve.com?utm_source=pypi&utm_medium=referral&utm_content=readme)
57
+
58
+ ---
59
+
60
+ ## Quick Start
61
+
62
+ Here's a simple example to get you started quickly:
63
+
64
+ ```python
65
+ from apiverve_csrparser.apiClient import CsrparserAPIClient
66
+
67
+ # Initialize the client with your APIVerve API key
68
+ api = CsrparserAPIClient("[YOUR_API_KEY]")
69
+
70
+ query = { "csr": "-----BEGIN CERTIFICATE REQUEST-----
71
+ MIICvDCCAaQCAQAwdzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWEx
72
+ FjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEzARBgNVBAoMCkV4YW1wbGUgQ28xEDAO
73
+ BgNVBAsMB0RldlRlYW0xFDASBgNVBAMMC2V4YW1wbGUuY29tMIIBIjANBgkqhkiG
74
+ 9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjd/RepiCLQ5/HfKynijcPdiwygrSgxQeTKPo
75
+ T/WiEaRTaUToW9uDUeiIHK83Tgn2+TIONpMoLJRNG+zslpHybWhVVWNlamkrlRwP
76
+ XFQJzsxDN5+TQugILatLsp680SgMNyyPtDIpT3niiNuQ4NFepQLvQTbjXgj1celb
77
+ U86CCeJzYengTF0ZE9Ra+/SsRTA+oy0fNLChNMc2DBaybccxwV2rNWvlvPdhfB7M
78
+ sel3sw/x2hsbWoYC/kudzYmoDPZKX+XOhCkFwUgwib8V4hbjVLcOYsPBJcROYpRh
79
+ 9d5g7xdRlbF1I7dHsCRKnsvkIONtwKQmJ2v/UPqYahjtm2TPUQIDAQABoAAwDQYJ
80
+ KoZIhvcNAQELBQADggEBAFEHOsN2SkB3qFBMk9JR5IDoh8rSUKj/310DOwilOQm+
81
+ 5lAwRfcFMYCl9yf4IV+XPPfvT3ahzUFfi8Fc98CDeIxAhEwtuZFlE7LA5+/F4HXM
82
+ H3gzqTFwOZq+Wa2m029/BvcyII830h4Z+gU68R52px7O7wYSbAR/n7t1fh2bxzmW
83
+ KqqjrvCpHoMVpgcm9y2bYTj+HLxgX4/uADFvotQppOWZi0ctam+if3Kqb3Kd2MFD
84
+ vVHZp9NwEoqNPxmFEzcyOk2y1PYhhRja7rjdC6bdAqj6JRt+WSzStvgx7aEsxBQj
85
+ rJCMi+GypGf9xQUfCJBhTDQVQ3fmCKTfddDeeVbJBrA=
86
+ -----END CERTIFICATE REQUEST-----" }
87
+
88
+ try:
89
+ # Make the API call
90
+ result = api.execute(query)
91
+
92
+ # Print the result
93
+ print(result)
94
+ except Exception as e:
95
+ print(f"Error: {e}")
96
+ ```
97
+
98
+ ---
99
+
100
+ ## Usage
101
+
102
+ The CSR Parser API documentation is found here: [https://docs.apiverve.com/ref/csrparser](https://docs.apiverve.com/ref/csrparser?utm_source=pypi&utm_medium=referral&utm_content=readme).
103
+ You can find parameters, example responses, and status codes documented here.
104
+
105
+ ### Setup
106
+
107
+ ```python
108
+ # Import the client module
109
+ from apiverve_csrparser.apiClient import CsrparserAPIClient
110
+
111
+ # Initialize the client with your APIVerve API key
112
+ api = CsrparserAPIClient("[YOUR_API_KEY]")
113
+ ```
114
+
115
+ ---
116
+
117
+ ## Perform Request
118
+
119
+ Using the API client, you can perform requests to the API.
120
+
121
+ ###### Define Query
122
+
123
+ ```python
124
+ query = { "csr": "-----BEGIN CERTIFICATE REQUEST-----
125
+ MIICvDCCAaQCAQAwdzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWEx
126
+ FjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEzARBgNVBAoMCkV4YW1wbGUgQ28xEDAO
127
+ BgNVBAsMB0RldlRlYW0xFDASBgNVBAMMC2V4YW1wbGUuY29tMIIBIjANBgkqhkiG
128
+ 9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjd/RepiCLQ5/HfKynijcPdiwygrSgxQeTKPo
129
+ T/WiEaRTaUToW9uDUeiIHK83Tgn2+TIONpMoLJRNG+zslpHybWhVVWNlamkrlRwP
130
+ XFQJzsxDN5+TQugILatLsp680SgMNyyPtDIpT3niiNuQ4NFepQLvQTbjXgj1celb
131
+ U86CCeJzYengTF0ZE9Ra+/SsRTA+oy0fNLChNMc2DBaybccxwV2rNWvlvPdhfB7M
132
+ sel3sw/x2hsbWoYC/kudzYmoDPZKX+XOhCkFwUgwib8V4hbjVLcOYsPBJcROYpRh
133
+ 9d5g7xdRlbF1I7dHsCRKnsvkIONtwKQmJ2v/UPqYahjtm2TPUQIDAQABoAAwDQYJ
134
+ KoZIhvcNAQELBQADggEBAFEHOsN2SkB3qFBMk9JR5IDoh8rSUKj/310DOwilOQm+
135
+ 5lAwRfcFMYCl9yf4IV+XPPfvT3ahzUFfi8Fc98CDeIxAhEwtuZFlE7LA5+/F4HXM
136
+ H3gzqTFwOZq+Wa2m029/BvcyII830h4Z+gU68R52px7O7wYSbAR/n7t1fh2bxzmW
137
+ KqqjrvCpHoMVpgcm9y2bYTj+HLxgX4/uADFvotQppOWZi0ctam+if3Kqb3Kd2MFD
138
+ vVHZp9NwEoqNPxmFEzcyOk2y1PYhhRja7rjdC6bdAqj6JRt+WSzStvgx7aEsxBQj
139
+ rJCMi+GypGf9xQUfCJBhTDQVQ3fmCKTfddDeeVbJBrA=
140
+ -----END CERTIFICATE REQUEST-----" }
141
+ ```
142
+
143
+ ###### Simple Request
144
+
145
+ ```python
146
+ # Make a request to the API
147
+ result = api.execute(query)
148
+
149
+ # Print the result
150
+ print(result)
151
+ ```
152
+
153
+ ###### Example Response
154
+
155
+ ```json
156
+ {
157
+ "status": "ok",
158
+ "error": null,
159
+ "data": {
160
+ "version": "v1",
161
+ "subject": {
162
+ "common_name": "example.com",
163
+ "organization": "Example Co",
164
+ "organizational_unit": "DevTeam",
165
+ "locality": "San Francisco",
166
+ "state": "California",
167
+ "country": "US",
168
+ "email": null
169
+ },
170
+ "public_key": {
171
+ "algorithm": "RSA",
172
+ "size_bits": 2048,
173
+ "exponent": 65537
174
+ },
175
+ "signature_algorithm": "SHA256withRSA",
176
+ "extensions": [],
177
+ "fingerprints": {
178
+ "sha1": "05:E5:65:28:8A:47:01:D3:05:EA:3B:3F:F5:DC:C7:42:BF:06:E2:5F",
179
+ "sha256": "E0:0B:C1:59:A3:9E:F9:96:13:7B:CE:98:BC:8F:A1:49:62:4D:2E:CF:85:D5:36:2C:DD:46:9E:96:CF:92:A3:AF",
180
+ "md5": "27:C7:EC:94:73:34:E3:B7:3F:F6:FD:3E:0A:81:EA:3D"
181
+ },
182
+ "pem": "-----BEGIN CERTIFICATE REQUEST-----\nMIICvDCCAaQCAQAwdzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWEx\nFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEzARBgNVBAoMCkV4YW1wbGUgQ28xEDAO\nBgNVBAsMB0RldlRlYW0xFDASBgNVBAMMC2V4YW1wbGUuY29tMIIBIjANBgkqhkiG\n9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjd/RepiCLQ5/HfKynijcPdiwygrSgxQeTKPo\nT/WiEaRTaUToW9uDUeiIHK83Tgn2+TIONpMoLJRNG+zslpHybWhVVWNlamkrlRwP\nXFQJzsxDN5+TQugILatLsp680SgMNyyPtDIpT3niiNuQ4NFepQLvQTbjXgj1celb\nU86CCeJzYengTF0ZE9Ra+/SsRTA+oy0fNLChNMc2DBaybccxwV2rNWvlvPdhfB7M\nsel3sw/x2hsbWoYC/kudzYmoDPZKX+XOhCkFwUgwib8V4hbjVLcOYsPBJcROYpRh\n9d5g7xdRlbF1I7dHsCRKnsvkIONtwKQmJ2v/UPqYahjtm2TPUQIDAQABoAAwDQYJ\nKoZIhvcNAQELBQADggEBAFEHOsN2SkB3qFBMk9JR5IDoh8rSUKj/310DOwilOQm+\n5lAwRfcFMYCl9yf4IV+XPPfvT3ahzUFfi8Fc98CDeIxAhEwtuZFlE7LA5+/F4HXM\nH3gzqTFwOZq+Wa2m029/BvcyII830h4Z+gU68R52px7O7wYSbAR/n7t1fh2bxzmW\nKqqjrvCpHoMVpgcm9y2bYTj+HLxgX4/uADFvotQppOWZi0ctam+if3Kqb3Kd2MFD\nvVHZp9NwEoqNPxmFEzcyOk2y1PYhhRja7rjdC6bdAqj6JRt+WSzStvgx7aEsxBQj\nrJCMi+GypGf9xQUfCJBhTDQVQ3fmCKTfddDeeVbJBrA=\n-----END CERTIFICATE REQUEST-----",
183
+ "size_bytes": 704,
184
+ "format": "PEM",
185
+ "is_valid": true,
186
+ "security_assessment": {
187
+ "is_weak_key": false,
188
+ "is_deprecated_signature": false,
189
+ "key_strength": "acceptable"
190
+ }
191
+ }
192
+ }
193
+ ```
194
+
195
+ ---
196
+
197
+ ## Error Handling
198
+
199
+ The API client provides comprehensive error handling through the `CsrparserAPIClientError` exception. Here are some examples:
200
+
201
+ ### Basic Error Handling
202
+
203
+ ```python
204
+ from apiverve_csrparser.apiClient import CsrparserAPIClient, CsrparserAPIClientError
205
+
206
+ api = CsrparserAPIClient("[YOUR_API_KEY]")
207
+
208
+ query = { "csr": "-----BEGIN CERTIFICATE REQUEST-----
209
+ MIICvDCCAaQCAQAwdzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWEx
210
+ FjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEzARBgNVBAoMCkV4YW1wbGUgQ28xEDAO
211
+ BgNVBAsMB0RldlRlYW0xFDASBgNVBAMMC2V4YW1wbGUuY29tMIIBIjANBgkqhkiG
212
+ 9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjd/RepiCLQ5/HfKynijcPdiwygrSgxQeTKPo
213
+ T/WiEaRTaUToW9uDUeiIHK83Tgn2+TIONpMoLJRNG+zslpHybWhVVWNlamkrlRwP
214
+ XFQJzsxDN5+TQugILatLsp680SgMNyyPtDIpT3niiNuQ4NFepQLvQTbjXgj1celb
215
+ U86CCeJzYengTF0ZE9Ra+/SsRTA+oy0fNLChNMc2DBaybccxwV2rNWvlvPdhfB7M
216
+ sel3sw/x2hsbWoYC/kudzYmoDPZKX+XOhCkFwUgwib8V4hbjVLcOYsPBJcROYpRh
217
+ 9d5g7xdRlbF1I7dHsCRKnsvkIONtwKQmJ2v/UPqYahjtm2TPUQIDAQABoAAwDQYJ
218
+ KoZIhvcNAQELBQADggEBAFEHOsN2SkB3qFBMk9JR5IDoh8rSUKj/310DOwilOQm+
219
+ 5lAwRfcFMYCl9yf4IV+XPPfvT3ahzUFfi8Fc98CDeIxAhEwtuZFlE7LA5+/F4HXM
220
+ H3gzqTFwOZq+Wa2m029/BvcyII830h4Z+gU68R52px7O7wYSbAR/n7t1fh2bxzmW
221
+ KqqjrvCpHoMVpgcm9y2bYTj+HLxgX4/uADFvotQppOWZi0ctam+if3Kqb3Kd2MFD
222
+ vVHZp9NwEoqNPxmFEzcyOk2y1PYhhRja7rjdC6bdAqj6JRt+WSzStvgx7aEsxBQj
223
+ rJCMi+GypGf9xQUfCJBhTDQVQ3fmCKTfddDeeVbJBrA=
224
+ -----END CERTIFICATE REQUEST-----" }
225
+
226
+ try:
227
+ result = api.execute(query)
228
+ print("Success!")
229
+ print(result)
230
+ except CsrparserAPIClientError as e:
231
+ print(f"API Error: {e.message}")
232
+ if e.status_code:
233
+ print(f"Status Code: {e.status_code}")
234
+ if e.response:
235
+ print(f"Response: {e.response}")
236
+ ```
237
+
238
+ ### Handling Specific Error Types
239
+
240
+ ```python
241
+ from apiverve_csrparser.apiClient import CsrparserAPIClient, CsrparserAPIClientError
242
+
243
+ api = CsrparserAPIClient("[YOUR_API_KEY]")
244
+
245
+ query = { "csr": "-----BEGIN CERTIFICATE REQUEST-----
246
+ MIICvDCCAaQCAQAwdzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWEx
247
+ FjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEzARBgNVBAoMCkV4YW1wbGUgQ28xEDAO
248
+ BgNVBAsMB0RldlRlYW0xFDASBgNVBAMMC2V4YW1wbGUuY29tMIIBIjANBgkqhkiG
249
+ 9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjd/RepiCLQ5/HfKynijcPdiwygrSgxQeTKPo
250
+ T/WiEaRTaUToW9uDUeiIHK83Tgn2+TIONpMoLJRNG+zslpHybWhVVWNlamkrlRwP
251
+ XFQJzsxDN5+TQugILatLsp680SgMNyyPtDIpT3niiNuQ4NFepQLvQTbjXgj1celb
252
+ U86CCeJzYengTF0ZE9Ra+/SsRTA+oy0fNLChNMc2DBaybccxwV2rNWvlvPdhfB7M
253
+ sel3sw/x2hsbWoYC/kudzYmoDPZKX+XOhCkFwUgwib8V4hbjVLcOYsPBJcROYpRh
254
+ 9d5g7xdRlbF1I7dHsCRKnsvkIONtwKQmJ2v/UPqYahjtm2TPUQIDAQABoAAwDQYJ
255
+ KoZIhvcNAQELBQADggEBAFEHOsN2SkB3qFBMk9JR5IDoh8rSUKj/310DOwilOQm+
256
+ 5lAwRfcFMYCl9yf4IV+XPPfvT3ahzUFfi8Fc98CDeIxAhEwtuZFlE7LA5+/F4HXM
257
+ H3gzqTFwOZq+Wa2m029/BvcyII830h4Z+gU68R52px7O7wYSbAR/n7t1fh2bxzmW
258
+ KqqjrvCpHoMVpgcm9y2bYTj+HLxgX4/uADFvotQppOWZi0ctam+if3Kqb3Kd2MFD
259
+ vVHZp9NwEoqNPxmFEzcyOk2y1PYhhRja7rjdC6bdAqj6JRt+WSzStvgx7aEsxBQj
260
+ rJCMi+GypGf9xQUfCJBhTDQVQ3fmCKTfddDeeVbJBrA=
261
+ -----END CERTIFICATE REQUEST-----" }
262
+
263
+ try:
264
+ result = api.execute(query)
265
+
266
+ # Check for successful response
267
+ if result.get('status') == 'success':
268
+ print("Request successful!")
269
+ print(result.get('data'))
270
+ else:
271
+ print(f"API returned an error: {result.get('error')}")
272
+
273
+ except CsrparserAPIClientError as e:
274
+ # Handle API client errors
275
+ if e.status_code == 401:
276
+ print("Unauthorized: Invalid API key")
277
+ elif e.status_code == 429:
278
+ print("Rate limit exceeded")
279
+ elif e.status_code >= 500:
280
+ print("Server error - please try again later")
281
+ else:
282
+ print(f"API error: {e.message}")
283
+ except Exception as e:
284
+ # Handle unexpected errors
285
+ print(f"Unexpected error: {str(e)}")
286
+ ```
287
+
288
+ ### Using Context Manager (Recommended)
289
+
290
+ The client supports the context manager protocol for automatic resource cleanup:
291
+
292
+ ```python
293
+ from apiverve_csrparser.apiClient import CsrparserAPIClient, CsrparserAPIClientError
294
+
295
+ query = { "csr": "-----BEGIN CERTIFICATE REQUEST-----
296
+ MIICvDCCAaQCAQAwdzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWEx
297
+ FjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEzARBgNVBAoMCkV4YW1wbGUgQ28xEDAO
298
+ BgNVBAsMB0RldlRlYW0xFDASBgNVBAMMC2V4YW1wbGUuY29tMIIBIjANBgkqhkiG
299
+ 9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjd/RepiCLQ5/HfKynijcPdiwygrSgxQeTKPo
300
+ T/WiEaRTaUToW9uDUeiIHK83Tgn2+TIONpMoLJRNG+zslpHybWhVVWNlamkrlRwP
301
+ XFQJzsxDN5+TQugILatLsp680SgMNyyPtDIpT3niiNuQ4NFepQLvQTbjXgj1celb
302
+ U86CCeJzYengTF0ZE9Ra+/SsRTA+oy0fNLChNMc2DBaybccxwV2rNWvlvPdhfB7M
303
+ sel3sw/x2hsbWoYC/kudzYmoDPZKX+XOhCkFwUgwib8V4hbjVLcOYsPBJcROYpRh
304
+ 9d5g7xdRlbF1I7dHsCRKnsvkIONtwKQmJ2v/UPqYahjtm2TPUQIDAQABoAAwDQYJ
305
+ KoZIhvcNAQELBQADggEBAFEHOsN2SkB3qFBMk9JR5IDoh8rSUKj/310DOwilOQm+
306
+ 5lAwRfcFMYCl9yf4IV+XPPfvT3ahzUFfi8Fc98CDeIxAhEwtuZFlE7LA5+/F4HXM
307
+ H3gzqTFwOZq+Wa2m029/BvcyII830h4Z+gU68R52px7O7wYSbAR/n7t1fh2bxzmW
308
+ KqqjrvCpHoMVpgcm9y2bYTj+HLxgX4/uADFvotQppOWZi0ctam+if3Kqb3Kd2MFD
309
+ vVHZp9NwEoqNPxmFEzcyOk2y1PYhhRja7rjdC6bdAqj6JRt+WSzStvgx7aEsxBQj
310
+ rJCMi+GypGf9xQUfCJBhTDQVQ3fmCKTfddDeeVbJBrA=
311
+ -----END CERTIFICATE REQUEST-----" }
312
+
313
+ # Using context manager ensures proper cleanup
314
+ with CsrparserAPIClient("[YOUR_API_KEY]") as api:
315
+ try:
316
+ result = api.execute(query)
317
+ print(result)
318
+ except CsrparserAPIClientError as e:
319
+ print(f"Error: {e.message}")
320
+ # Session is automatically closed here
321
+ ```
322
+
323
+ ---
324
+
325
+ ## Advanced Features
326
+
327
+ ### Debug Mode
328
+
329
+ Enable debug logging to see detailed request and response information:
330
+
331
+ ```python
332
+ from apiverve_csrparser.apiClient import CsrparserAPIClient
333
+
334
+ # Enable debug mode
335
+ api = CsrparserAPIClient("[YOUR_API_KEY]", debug=True)
336
+
337
+ query = { "csr": "-----BEGIN CERTIFICATE REQUEST-----
338
+ MIICvDCCAaQCAQAwdzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWEx
339
+ FjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEzARBgNVBAoMCkV4YW1wbGUgQ28xEDAO
340
+ BgNVBAsMB0RldlRlYW0xFDASBgNVBAMMC2V4YW1wbGUuY29tMIIBIjANBgkqhkiG
341
+ 9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjd/RepiCLQ5/HfKynijcPdiwygrSgxQeTKPo
342
+ T/WiEaRTaUToW9uDUeiIHK83Tgn2+TIONpMoLJRNG+zslpHybWhVVWNlamkrlRwP
343
+ XFQJzsxDN5+TQugILatLsp680SgMNyyPtDIpT3niiNuQ4NFepQLvQTbjXgj1celb
344
+ U86CCeJzYengTF0ZE9Ra+/SsRTA+oy0fNLChNMc2DBaybccxwV2rNWvlvPdhfB7M
345
+ sel3sw/x2hsbWoYC/kudzYmoDPZKX+XOhCkFwUgwib8V4hbjVLcOYsPBJcROYpRh
346
+ 9d5g7xdRlbF1I7dHsCRKnsvkIONtwKQmJ2v/UPqYahjtm2TPUQIDAQABoAAwDQYJ
347
+ KoZIhvcNAQELBQADggEBAFEHOsN2SkB3qFBMk9JR5IDoh8rSUKj/310DOwilOQm+
348
+ 5lAwRfcFMYCl9yf4IV+XPPfvT3ahzUFfi8Fc98CDeIxAhEwtuZFlE7LA5+/F4HXM
349
+ H3gzqTFwOZq+Wa2m029/BvcyII830h4Z+gU68R52px7O7wYSbAR/n7t1fh2bxzmW
350
+ KqqjrvCpHoMVpgcm9y2bYTj+HLxgX4/uADFvotQppOWZi0ctam+if3Kqb3Kd2MFD
351
+ vVHZp9NwEoqNPxmFEzcyOk2y1PYhhRja7rjdC6bdAqj6JRt+WSzStvgx7aEsxBQj
352
+ rJCMi+GypGf9xQUfCJBhTDQVQ3fmCKTfddDeeVbJBrA=
353
+ -----END CERTIFICATE REQUEST-----" }
354
+
355
+ # Debug information will be printed to console
356
+ result = api.execute(query)
357
+ ```
358
+
359
+ ### Manual Session Management
360
+
361
+ If you need to manually manage the session lifecycle:
362
+
363
+ ```python
364
+ from apiverve_csrparser.apiClient import CsrparserAPIClient
365
+
366
+ api = CsrparserAPIClient("[YOUR_API_KEY]")
367
+
368
+ query = { "csr": "-----BEGIN CERTIFICATE REQUEST-----
369
+ MIICvDCCAaQCAQAwdzELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWEx
370
+ FjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEzARBgNVBAoMCkV4YW1wbGUgQ28xEDAO
371
+ BgNVBAsMB0RldlRlYW0xFDASBgNVBAMMC2V4YW1wbGUuY29tMIIBIjANBgkqhkiG
372
+ 9w0BAQEFAAOCAQ8AMIIBCgKCAQEAjd/RepiCLQ5/HfKynijcPdiwygrSgxQeTKPo
373
+ T/WiEaRTaUToW9uDUeiIHK83Tgn2+TIONpMoLJRNG+zslpHybWhVVWNlamkrlRwP
374
+ XFQJzsxDN5+TQugILatLsp680SgMNyyPtDIpT3niiNuQ4NFepQLvQTbjXgj1celb
375
+ U86CCeJzYengTF0ZE9Ra+/SsRTA+oy0fNLChNMc2DBaybccxwV2rNWvlvPdhfB7M
376
+ sel3sw/x2hsbWoYC/kudzYmoDPZKX+XOhCkFwUgwib8V4hbjVLcOYsPBJcROYpRh
377
+ 9d5g7xdRlbF1I7dHsCRKnsvkIONtwKQmJ2v/UPqYahjtm2TPUQIDAQABoAAwDQYJ
378
+ KoZIhvcNAQELBQADggEBAFEHOsN2SkB3qFBMk9JR5IDoh8rSUKj/310DOwilOQm+
379
+ 5lAwRfcFMYCl9yf4IV+XPPfvT3ahzUFfi8Fc98CDeIxAhEwtuZFlE7LA5+/F4HXM
380
+ H3gzqTFwOZq+Wa2m029/BvcyII830h4Z+gU68R52px7O7wYSbAR/n7t1fh2bxzmW
381
+ KqqjrvCpHoMVpgcm9y2bYTj+HLxgX4/uADFvotQppOWZi0ctam+if3Kqb3Kd2MFD
382
+ vVHZp9NwEoqNPxmFEzcyOk2y1PYhhRja7rjdC6bdAqj6JRt+WSzStvgx7aEsxBQj
383
+ rJCMi+GypGf9xQUfCJBhTDQVQ3fmCKTfddDeeVbJBrA=
384
+ -----END CERTIFICATE REQUEST-----" }
385
+
386
+ try:
387
+ result = api.execute(query)
388
+ print(result)
389
+ finally:
390
+ # Manually close the session when done
391
+ api.close()
392
+ ```
393
+
394
+ ---
395
+
396
+ ## Customer Support
397
+
398
+ Need any assistance? [Get in touch with Customer Support](https://apiverve.com/contact?utm_source=pypi&utm_medium=referral&utm_content=readme).
399
+
400
+ ---
401
+
402
+ ## Updates
403
+ Stay up to date by following [@apiverveHQ](https://twitter.com/apiverveHQ) on Twitter.
404
+
405
+ ---
406
+
407
+ ## Legal
408
+
409
+ 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=referral&utm_content=readme) and all legal documents and agreements.
410
+
411
+ ---
412
+
413
+ ## License
414
+ Licensed under the MIT License (MIT)
415
+
416
+ Copyright (&copy;) 2026 APIVerve, and EvlarSoft LLC
417
+
418
+ 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:
419
+
420
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
421
+
422
+ 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.