apiverve-cryptogramgenerator 1.2.2__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,359 @@
1
+ Metadata-Version: 2.4
2
+ Name: apiverve-cryptogramgenerator
3
+ Version: 1.2.2
4
+ Summary: Cryptogram Generator creates letter substitution cipher puzzles where each letter is replaced with another letter consistently throughout the text.
5
+ Author-email: APIVerve <hello@apiverve.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://apiverve.com/marketplace/cryptogram?utm_source=pypi&utm_medium=referral&utm_content=homepage
8
+ Project-URL: Documentation, https://docs.apiverve.com/ref/cryptogram?utm_source=pypi&utm_medium=referral&utm_content=docs
9
+ Project-URL: Repository, https://github.com/apiverve/cryptogram-api
10
+ Project-URL: Twitter, https://twitter.com/apivervehq
11
+ Keywords: cryptogram,cipher,code puzzle,substitution cipher,decode
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
+ Cryptogram Generator API
26
+ ============
27
+
28
+ Cryptogram Generator creates letter substitution cipher puzzles where each letter is replaced with another letter consistently throughout the text.
29
+
30
+
31
+ [![PyPI version](https://img.shields.io/pypi/v/apiverve-cryptogramgenerator.svg)](https://pypi.org/project/apiverve-cryptogramgenerator/)
32
+
33
+ This is a Python wrapper for the [Cryptogram Generator API](https://apiverve.com/marketplace/cryptogram?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-cryptogramgenerator
43
+ ```
44
+
45
+ Using `pip3`:
46
+
47
+ ```bash
48
+ pip3 install apiverve-cryptogramgenerator
49
+ ```
50
+
51
+ ---
52
+
53
+ ## Configuration
54
+
55
+ Before using the Cryptogram Generator 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_cryptogramgenerator.apiClient import CryptogramAPIClient
66
+
67
+ # Initialize the client with your APIVerve API key
68
+ api = CryptogramAPIClient("[YOUR_API_KEY]")
69
+
70
+ query = {
71
+ "text": "The quick brown fox",
72
+ "random": true,
73
+ "image": true,
74
+ "solutionImage": true
75
+ }
76
+
77
+ try:
78
+ # Make the API call
79
+ result = api.execute(query)
80
+
81
+ # Print the result
82
+ print(result)
83
+ except Exception as e:
84
+ print(f"Error: {e}")
85
+ ```
86
+
87
+ ---
88
+
89
+ ## Usage
90
+
91
+ The Cryptogram Generator API documentation is found here: [https://docs.apiverve.com/ref/cryptogram](https://docs.apiverve.com/ref/cryptogram?utm_source=pypi&utm_medium=referral&utm_content=readme).
92
+ You can find parameters, example responses, and status codes documented here.
93
+
94
+ ### Setup
95
+
96
+ ```python
97
+ # Import the client module
98
+ from apiverve_cryptogramgenerator.apiClient import CryptogramAPIClient
99
+
100
+ # Initialize the client with your APIVerve API key
101
+ api = CryptogramAPIClient("[YOUR_API_KEY]")
102
+ ```
103
+
104
+ ---
105
+
106
+ ## Perform Request
107
+
108
+ Using the API client, you can perform requests to the API.
109
+
110
+ ###### Define Query
111
+
112
+ ```python
113
+ query = {
114
+ "text": "The quick brown fox",
115
+ "random": true,
116
+ "image": true,
117
+ "solutionImage": true
118
+ }
119
+ ```
120
+
121
+ ###### Simple Request
122
+
123
+ ```python
124
+ # Make a request to the API
125
+ result = api.execute(query)
126
+
127
+ # Print the result
128
+ print(result)
129
+ ```
130
+
131
+ ###### Example Response
132
+
133
+ ```json
134
+ {
135
+ "status": "ok",
136
+ "error": null,
137
+ "data": {
138
+ "encoded": "PNR MJSXQRV JI K PNJSGKQC DBFRG ARWBQG ZBPN K GBQWFR GPRY",
139
+ "original": "The journey of a thousand miles begins with a single step",
140
+ "cipher": {
141
+ "A": "K",
142
+ "B": "A",
143
+ "C": "H",
144
+ "D": "C",
145
+ "E": "R",
146
+ "F": "I",
147
+ "G": "W",
148
+ "H": "N",
149
+ "I": "B",
150
+ "J": "M",
151
+ "K": "E",
152
+ "L": "F",
153
+ "M": "D",
154
+ "N": "Q",
155
+ "O": "J",
156
+ "P": "Y",
157
+ "Q": "T",
158
+ "R": "X",
159
+ "S": "G",
160
+ "T": "P",
161
+ "U": "S",
162
+ "V": "L",
163
+ "W": "Z",
164
+ "X": "O",
165
+ "Y": "V",
166
+ "Z": "U"
167
+ },
168
+ "letterCount": 47,
169
+ "wordCount": 11,
170
+ "html": "<html><head><title>Cryptogram Puzzle</title><style>body {font-family: Arial, sans-serif; padding: 20px; max-width: 800px; margin: 0 auto;}h1 {text-align: center;}.puzzle {font-family: monospace; font-size: 24px; letter-spacing: 3px; line-height: 2.5; word-wrap: break-word;}.letter-box {display: inline-block; text-align: center; margin: 2px;}.encoded {border-bottom: 2px solid #333; min-width: 20px; display: block;}.answer {color: #ccc; font-size: 14px;}.space {width: 15px; display: inline-block;}.hint {margin-top: 30px; padding: 15px; background: #f5f5f5; border-radius: 5px;}.hint h3 {margin-top: 0;}</style></head><body><h1>Cryptogram</h1><div class='puzzle'><span class='letter-box'><span class='encoded'>P</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>N</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>R</span><span class='answer'>_</span></span><span class='space'></span><span class='letter-box'><span class='encoded'>M</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>J</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>S</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>X</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>Q</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>R</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>V</span><span class='answer'>_</span></span><span class='space'></span><span class='letter-box'><span class='encoded'>J</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>I</span><span class='answer'>_</span></span><span class='space'></span><span class='letter-box'><span class='encoded'>K</span><span class='answer'>_</span></span><span class='space'></span><span class='letter-box'><span class='encoded'>P</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>N</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>J</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>S</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>G</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>K</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>Q</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>C</span><span class='answer'>_</span></span><span class='space'></span><span class='letter-box'><span class='encoded'>D</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>B</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>F</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>R</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>G</span><span class='answer'>_</span></span><span class='space'></span><span class='letter-box'><span class='encoded'>A</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>R</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>W</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>B</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>Q</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>G</span><span class='answer'>_</span></span><span class='space'></span><span class='letter-box'><span class='encoded'>Z</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>B</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>P</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>N</span><span class='answer'>_</span></span><span class='space'></span><span class='letter-box'><span class='encoded'>K</span><span class='answer'>_</span></span><span class='space'></span><span class='letter-box'><span class='encoded'>G</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>B</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>Q</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>W</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>F</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>R</span><span class='answer'>_</span></span><span class='space'></span><span class='letter-box'><span class='encoded'>G</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>P</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>R</span><span class='answer'>_</span></span><span class='letter-box'><span class='encoded'>Y</span><span class='answer'>_</span></span></div><div class='hint'><h3>Letter Frequency:</h3><p>R=6, G=5, P=4, Q=4, B=4, N=3, J=3, K=3, S=2, F=2, W=2, M=1, X=1, V=1, I=1, C=1, D=1, A=1, Z=1, Y=1</p></div></body></html>",
171
+ "image": {
172
+ "imageName": "0afa5de4-52fb-4902-8139-c177c08ac98b_puzzle.png",
173
+ "format": ".png",
174
+ "downloadURL": "https://storage.googleapis.com/apiverve/APIData/cryptogram/0afa5de4-52fb-4902-8139-c177c08ac98b_puzzle.png?GoogleAccessId=635500398038-compute%40developer.gserviceaccount.com&Expires=1766010132&Signature=guv7GNCup4lJXTI0iCF7Bo2Cz02Wl6h2HWC0YxJ0jtzb7w%2BlW80b1OzBlGR%2BneFxFdzQPwfIuMQlaHsW0KFqPh5ITsFkSt802OEUFyxuiDn71y4XkiJx8zVDhrxNH9R9i1befMM16c%2F4WQGpgzkaaXw8TJJUT2q2s8c8ESo41K85iYcHJZ%2BGUxXeMeFDJ%2FG38pq5txarX%2F0rnmdTk0Jk%2BhEox9PXFPCzaSvWbDFYDVABIt97N2NQyqlDPRcucrm5uuE5Jb9qjT80JqzlumfqiaR3DpgPDwZkWeVyuYW4b4TZCCbbEpK%2FIlRRUZTw9gYdxDpk0B35NKN9WKSCi%2BfFWQ%3D%3D",
175
+ "expires": 1766010132300
176
+ },
177
+ "solutionImage": {
178
+ "imageName": "41e6b5b7-d98c-4d4d-8b44-f56bdb5160b9_solution.png",
179
+ "format": ".png",
180
+ "downloadURL": "https://storage.googleapis.com/apiverve/APIData/cryptogram/41e6b5b7-d98c-4d4d-8b44-f56bdb5160b9_solution.png?GoogleAccessId=635500398038-compute%40developer.gserviceaccount.com&Expires=1766010132&Signature=YKDpJF9MYlmXjASdgVUgtPCq8%2Fp59Eci6DIAbXuHzv9B4rALSZwyq1sMj9KoIRhryYCdNW1KGBRpcgJFSFgaEGfcNC1MNsryoV%2F7bp3TSr1%2BknwqAGQu7sWvZrtozB2oJ3Wzaqz%2BGjm74rhrOaqAx0w7%2BmJtimslEHCl8emRuZxmAhW9l8Wi%2Fv%2BsCmb7%2Bl5hj0njHSs6AWo3YtoZpWoNv7F49g1dQczrfj%2BFYW7bOoFMfcmysTz%2ByNpXECZFbvWJ3A2f0fql7itGLGK%2B%2BNlI6Q6WkQ1ye3c7skHB3DqT%2BWHLbJCm0vjbIVhIgq3Vo39ZADdogcd7uiklvEBriMFkwA%3D%3D",
181
+ "expires": 1766010132645
182
+ }
183
+ }
184
+ }
185
+ ```
186
+
187
+ ---
188
+
189
+ ## Error Handling
190
+
191
+ The API client provides comprehensive error handling through the `CryptogramAPIClientError` exception. Here are some examples:
192
+
193
+ ### Basic Error Handling
194
+
195
+ ```python
196
+ from apiverve_cryptogramgenerator.apiClient import CryptogramAPIClient, CryptogramAPIClientError
197
+
198
+ api = CryptogramAPIClient("[YOUR_API_KEY]")
199
+
200
+ query = {
201
+ "text": "The quick brown fox",
202
+ "random": true,
203
+ "image": true,
204
+ "solutionImage": true
205
+ }
206
+
207
+ try:
208
+ result = api.execute(query)
209
+ print("Success!")
210
+ print(result)
211
+ except CryptogramAPIClientError as e:
212
+ print(f"API Error: {e.message}")
213
+ if e.status_code:
214
+ print(f"Status Code: {e.status_code}")
215
+ if e.response:
216
+ print(f"Response: {e.response}")
217
+ ```
218
+
219
+ ### Handling Specific Error Types
220
+
221
+ ```python
222
+ from apiverve_cryptogramgenerator.apiClient import CryptogramAPIClient, CryptogramAPIClientError
223
+
224
+ api = CryptogramAPIClient("[YOUR_API_KEY]")
225
+
226
+ query = {
227
+ "text": "The quick brown fox",
228
+ "random": true,
229
+ "image": true,
230
+ "solutionImage": true
231
+ }
232
+
233
+ try:
234
+ result = api.execute(query)
235
+
236
+ # Check for successful response
237
+ if result.get('status') == 'success':
238
+ print("Request successful!")
239
+ print(result.get('data'))
240
+ else:
241
+ print(f"API returned an error: {result.get('error')}")
242
+
243
+ except CryptogramAPIClientError as e:
244
+ # Handle API client errors
245
+ if e.status_code == 401:
246
+ print("Unauthorized: Invalid API key")
247
+ elif e.status_code == 429:
248
+ print("Rate limit exceeded")
249
+ elif e.status_code >= 500:
250
+ print("Server error - please try again later")
251
+ else:
252
+ print(f"API error: {e.message}")
253
+ except Exception as e:
254
+ # Handle unexpected errors
255
+ print(f"Unexpected error: {str(e)}")
256
+ ```
257
+
258
+ ### Using Context Manager (Recommended)
259
+
260
+ The client supports the context manager protocol for automatic resource cleanup:
261
+
262
+ ```python
263
+ from apiverve_cryptogramgenerator.apiClient import CryptogramAPIClient, CryptogramAPIClientError
264
+
265
+ query = {
266
+ "text": "The quick brown fox",
267
+ "random": true,
268
+ "image": true,
269
+ "solutionImage": true
270
+ }
271
+
272
+ # Using context manager ensures proper cleanup
273
+ with CryptogramAPIClient("[YOUR_API_KEY]") as api:
274
+ try:
275
+ result = api.execute(query)
276
+ print(result)
277
+ except CryptogramAPIClientError as e:
278
+ print(f"Error: {e.message}")
279
+ # Session is automatically closed here
280
+ ```
281
+
282
+ ---
283
+
284
+ ## Advanced Features
285
+
286
+ ### Debug Mode
287
+
288
+ Enable debug logging to see detailed request and response information:
289
+
290
+ ```python
291
+ from apiverve_cryptogramgenerator.apiClient import CryptogramAPIClient
292
+
293
+ # Enable debug mode
294
+ api = CryptogramAPIClient("[YOUR_API_KEY]", debug=True)
295
+
296
+ query = {
297
+ "text": "The quick brown fox",
298
+ "random": true,
299
+ "image": true,
300
+ "solutionImage": true
301
+ }
302
+
303
+ # Debug information will be printed to console
304
+ result = api.execute(query)
305
+ ```
306
+
307
+ ### Manual Session Management
308
+
309
+ If you need to manually manage the session lifecycle:
310
+
311
+ ```python
312
+ from apiverve_cryptogramgenerator.apiClient import CryptogramAPIClient
313
+
314
+ api = CryptogramAPIClient("[YOUR_API_KEY]")
315
+
316
+ query = {
317
+ "text": "The quick brown fox",
318
+ "random": true,
319
+ "image": true,
320
+ "solutionImage": true
321
+ }
322
+
323
+ try:
324
+ result = api.execute(query)
325
+ print(result)
326
+ finally:
327
+ # Manually close the session when done
328
+ api.close()
329
+ ```
330
+
331
+ ---
332
+
333
+ ## Customer Support
334
+
335
+ Need any assistance? [Get in touch with Customer Support](https://apiverve.com/contact?utm_source=pypi&utm_medium=referral&utm_content=readme).
336
+
337
+ ---
338
+
339
+ ## Updates
340
+ Stay up to date by following [@apiverveHQ](https://twitter.com/apiverveHQ) on Twitter.
341
+
342
+ ---
343
+
344
+ ## Legal
345
+
346
+ 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.
347
+
348
+ ---
349
+
350
+ ## License
351
+ Licensed under the MIT License (MIT)
352
+
353
+ Copyright (&copy;) 2026 APIVerve, and EvlarSoft LLC
354
+
355
+ 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:
356
+
357
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
358
+
359
+ 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.