genkit 0.1.0__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.
genkit-0.1.0/LICENSE ADDED
@@ -0,0 +1,25 @@
1
+ **5. `LICENSE`**
2
+
3
+ ```markdown
4
+ MIT License
5
+
6
+ Copyright (c) [2024] [Suhail]
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ of this software and associated documentation files (the "Software"), to deal
10
+ in the Software without restriction, including without limitation the rights
11
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ copies of the Software, and to permit persons to whom the Software is
13
+ furnished to do so, subject to the following conditions:
14
+
15
+ The above copyright notice and this permission notice shall be included in all
16
+ copies or substantial portions of the Software.
17
+
18
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ SOFTWARE.
25
+ ```
genkit-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,375 @@
1
+ Metadata-Version: 2.1
2
+ Name: genkit
3
+ Version: 0.1.0
4
+ Summary: A Python package for generating random data like phone numbers.
5
+ Home-page: UNKNOWN
6
+ Author: Suhail Shaji
7
+ Author-email: suhailshaji@gmail.com
8
+ License: UNKNOWN
9
+ Keywords: random phone number generator,genkit,generate random phone number with country code
10
+ Platform: UNKNOWN
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Requires-Python: >=3.6
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+
18
+ # GenKit
19
+
20
+ GenKit is a versatile Python package designed for generating various types of data. It includes functionality for generating phone numbers in different formats based on country codes. Whether you need a phone number for testing or other purposes, genkit simplifies the process by offering customizable options.
21
+
22
+ ## Features
23
+
24
+ - **Phone Number Generation** : Generate phone numbers in formats specific to various countries.
25
+ - **Customizable** : Specify the country to get the appropriate phone number format.
26
+ - **Easy Integration** : Seamlessly integrate into your Python projects.
27
+ - **File Saving**: Save generated data to text files with timestamps for easy tracking.
28
+ - **Flexible Formats**: Return data as a list, dictionary, or plain string based on user preference.
29
+
30
+ ## Installation
31
+
32
+ You can easily install genkit using pip. Run the following command to install it:
33
+
34
+ ```
35
+ pip install genkit
36
+ ```
37
+
38
+ ## Usage
39
+
40
+ ### Generating a Single Phone Number
41
+
42
+ You can generate a single phone number for a specified country. By default, it generates an Indian phone number.
43
+
44
+ ```
45
+ from genkit import GenKit
46
+
47
+ # Generate a phone number for India (default)
48
+ print(GenKit.phonenumber())
49
+
50
+ # Generate a phone number for the US
51
+ print(GenKit.phonenumber("US"))
52
+
53
+ ```
54
+
55
+ ### Generating Multiple Phone Numbers
56
+
57
+ To generate multiple phone numbers, use the `n` parameter to specify the quantity. You can also specify the output format using the `type` parameter.
58
+
59
+ ```
60
+ from genkit import GenKit
61
+
62
+ # Generate 5 phone numbers for India and return as a list
63
+ print(GenKit.phonenumber("IN", n=5, type="list"))
64
+
65
+ # Generate 3 phone numbers for the US and return as a dictionary
66
+ print(GenKit.phonenumber("US", n=3, type="dict"))
67
+ ```
68
+
69
+ ### Saving to a File
70
+
71
+ You can save the generated phone numbers to a text file. The file will be named `genkit_TIMESTAMP.txt`, where `TIMESTAMP` is the current timestamp.
72
+
73
+ ```
74
+ from genkit import GenKit
75
+
76
+ # Generate 5 phone numbers for India and save to a file
77
+ GenKit.phonenumber("IN", n=5, save=True)
78
+
79
+ # Generate 3 phone numbers for the US in dictionary format and save to a file
80
+ GenKit.phonenumber("US", n=3, type="dict", save=True)
81
+
82
+ ```
83
+
84
+ ## Reference
85
+
86
+ Generates phone numbers based on the specified parameters.
87
+
88
+ ##### Parameters:
89
+
90
+ * n (int): Number of phone numbers to generate. Default is 1.
91
+ * type (str): Output format. Can be "string" (default), "list", or "dict".
92
+ * save (bool): Whether to save the generated numbers to a file. Default is False.
93
+
94
+ ##### **Returns:**
95
+
96
+ * If `type` is "string": A newline-separated string of phone numbers.
97
+ * If `type` is "list": A list of phone numbers.
98
+ * If `type` is "dict": A dictionary with a key "phone_numbers" containing the list of phone numbers.
99
+
100
+ ### Example
101
+
102
+ ```
103
+ result = GenKit.phonenumber("US", n=5, type="dict", save=True)
104
+ print(result) # Output: {'phone_numbers': ['+1XXXXXXXXXX', '+1XXXXXXXXXX', ...]}
105
+ ```
106
+
107
+ ## Supported Countries
108
+
109
+ The following countries are supported for phone number generation. Use 2-digit ISO codes to generate:
110
+
111
+ | ISO Code | Country | Phone Code |
112
+ | -------- | -------------------------------------------- | ---------- |
113
+ | AF | Afghanistan | +93 |
114
+ | AL | Albania | +355 |
115
+ | DZ | Algeria | +213 |
116
+ | AS | American Samoa | +1-684 |
117
+ | AD | Andorra | +376 |
118
+ | AO | Angola | +244 |
119
+ | AI | Anguilla | +1-264 |
120
+ | AQ | Antarctica | +672 |
121
+ | AG | Antigua and Barbuda | +1-268 |
122
+ | AR | Argentina | +54 |
123
+ | AM | Armenia | +374 |
124
+ | AW | Aruba | +297 |
125
+ | AU | Australia | +61 |
126
+ | AT | Austria | +43 |
127
+ | AZ | Azerbaijan | +994 |
128
+ | BS | Bahamas | +1-242 |
129
+ | BH | Bahrain | +973 |
130
+ | BD | Bangladesh | +880 |
131
+ | BB | Barbados | +1-246 |
132
+ | BY | Belarus | +375 |
133
+ | BE | Belgium | +32 |
134
+ | BZ | Belize | +501 |
135
+ | BJ | Benin | +229 |
136
+ | BM | Bermuda | +1-441 |
137
+ | BT | Bhutan | +975 |
138
+ | BO | Bolivia | +591 |
139
+ | BA | Bosnia and Herzegovina | +387 |
140
+ | BW | Botswana | +267 |
141
+ | BV | Bouvet Island | +47 |
142
+ | BR | Brazil | +55 |
143
+ | IO | British Indian Ocean Territory | +246 |
144
+ | BN | Brunei | +673 |
145
+ | BG | Bulgaria | +359 |
146
+ | BF | Burkina Faso | +226 |
147
+ | KH | Cambodia | +855 |
148
+ | CM | Cameroon | +237 |
149
+ | CA | Canada | +1 |
150
+ | CV | Cape Verde | +238 |
151
+ | KY | Cayman Islands | +1-345 |
152
+ | CF | Central African Republic | +236 |
153
+ | TD | Chad | +235 |
154
+ | CL | Chile | +56 |
155
+ | CN | China | +86 |
156
+ | CX | Christmas Island | +61 |
157
+ | CC | Cocos (Keeling) Islands | +61 |
158
+ | CO | Colombia | +57 |
159
+ | KM | Comoros | +269 |
160
+ | CD | Congo, Democratic Republic of the | +243 |
161
+ | CG | Congo, Republic of the | +242 |
162
+ | CK | Cook Islands | +682 |
163
+ | CR | Costa Rica | +506 |
164
+ | CI | Cote D'Ivoire | +225 |
165
+ | HR | Croatia | +385 |
166
+ | CU | Cuba | +53 |
167
+ | CY | Cyprus | +357 |
168
+ | CZ | Czech Republic | +420 |
169
+ | CS | Czechoslovakia | +42 |
170
+ | DK | Denmark | +45 |
171
+ | DJ | Djibouti | +253 |
172
+ | DM | Dominica | +1-767 |
173
+ | DO | Dominican Republic | +1-809 |
174
+ | TP | East Timor | +670 |
175
+ | EC | Ecuador | +593 |
176
+ | EG | Egypt | +20 |
177
+ | SV | El Salvador | +503 |
178
+ | GQ | Equatorial Guinea | +240 |
179
+ | ER | Eritrea | +291 |
180
+ | EE | Estonia | +372 |
181
+ | ET | Ethiopia | +251 |
182
+ | FK | Falkland Islands | +500 |
183
+ | FO | Faroe Islands | +298 |
184
+ | FJ | Fiji | +679 |
185
+ | FI | Finland | +358 |
186
+ | FR | France | +33 |
187
+ | GF | French Guiana | +594 |
188
+ | PF | French Polynesia | +689 |
189
+ | TF | French Southern Territories | +262 |
190
+ | GA | Gabon | +241 |
191
+ | GM | Gambia | +220 |
192
+ | GE | Georgia | +995 |
193
+ | DE | Germany | +49 |
194
+ | GH | Ghana | +233 |
195
+ | GI | Gibraltar | +350 |
196
+ | GB | United Kingdom | +44 |
197
+ | GR | Greece | +30 |
198
+ | GL | Greenland | +299 |
199
+ | GD | Grenada | +1-473 |
200
+ | GP | Guadeloupe | +590 |
201
+ | GU | Guam | +1-671 |
202
+ | GT | Guatemala | +502 |
203
+ | GN | Guinea | +224 |
204
+ | GW | Guinea-Bissau | +245 |
205
+ | GY | Guyana | +592 |
206
+ | HT | Haiti | +509 |
207
+ | HM | Heard Island and McDonald Islands | +672 |
208
+ | VA | Holy See (Vatican City State) | +39 |
209
+ | HN | Honduras | +504 |
210
+ | HK | Hong Kong | +852 |
211
+ | HU | Hungary | +36 |
212
+ | IS | Iceland | +354 |
213
+ | IN | India | +91 |
214
+ | ID | Indonesia | +62 |
215
+ | IR | Iran | +98 |
216
+ | IQ | Iraq | +964 |
217
+ | IE | Ireland | +353 |
218
+ | IL | Israel | +972 |
219
+ | IT | Italy | +39 |
220
+ | JM | Jamaica | +1-876 |
221
+ | JP | Japan | +81 |
222
+ | JO | Jordan | +962 |
223
+ | KZ | Kazakhstan | +7 |
224
+ | KE | Kenya | +254 |
225
+ | KI | Kiribati | +686 |
226
+ | KP | North Korea | +850 |
227
+ | KR | South Korea | +82 |
228
+ | KW | Kuwait | +965 |
229
+ | KG | Kyrgyzstan | +996 |
230
+ | LA | Laos | +856 |
231
+ | LV | Latvia | +371 |
232
+ | LB | Lebanon | +961 |
233
+ | LS | Lesotho | +266 |
234
+ | LR | Liberia | +231 |
235
+ | LY | Libya | +218 |
236
+ | LI | Liechtenstein | +423 |
237
+ | LT | Lithuania | +370 |
238
+ | LU | Luxembourg | +352 |
239
+ | MO | Macau | +853 |
240
+ | MK | North Macedonia | +389 |
241
+ | MG | Madagascar | +261 |
242
+ | MW | Malawi | +265 |
243
+ | MY | Malaysia | +60 |
244
+ | MV | Maldives | +960 |
245
+ | ML | Mali | +223 |
246
+ | MT | Malta | +356 |
247
+ | MH | Marshall Islands | +692 |
248
+ | MQ | Martinique | +596 |
249
+ | MR | Mauritania | +222 |
250
+ | MU | Mauritius | +230 |
251
+ | YT | Mayotte | +269 |
252
+ | MX | Mexico | +52 |
253
+ | FM | Micronesia | +691 |
254
+ | MD | Moldova | +373 |
255
+ | MC | Monaco | +377 |
256
+ | MN | Mongolia | +976 |
257
+ | MS | Montserrat | +1-664 |
258
+ | MA | Morocco | +212 |
259
+ | MZ | Mozambique | +258 |
260
+ | MM | Myanmar | +95 |
261
+ | NA | Namibia | +264 |
262
+ | NR | Nauru | +674 |
263
+ | NP | Nepal | +977 |
264
+ | NL | Netherlands | +31 |
265
+ | AN | Netherlands Antilles | +599 |
266
+ | NC | New Caledonia | +687 |
267
+ | NZ | New Zealand | +64 |
268
+ | NI | Nicaragua | +505 |
269
+ | NE | Niger | +227 |
270
+ | NG | Nigeria | +234 |
271
+ | NU | Niue | +683 |
272
+ | NF | Norfolk Island | +672 |
273
+ | MP | Northern Mariana Islands | +1-670 |
274
+ | NO | Norway | +47 |
275
+ | OM | Oman | +968 |
276
+ | PK | Pakistan | +92 |
277
+ | PW | Palau | +680 |
278
+ | PS | Palestine | +970 |
279
+ | PA | Panama | +507 |
280
+ | PG | Papua New Guinea | +675 |
281
+ | PY | Paraguay | +595 |
282
+ | PE | Peru | +51 |
283
+ | PH | Philippines | +63 |
284
+ | PN | Pitcairn | +870 |
285
+ | PL | Poland | +48 |
286
+ | PT | Portugal | +351 |
287
+ | PR | Puerto Rico | +1-787 |
288
+ | QA | Qatar | +974 |
289
+ | RE | Reunion | +262 |
290
+ | RO | Romania | +40 |
291
+ | RU | Russia | +7 |
292
+ | RW | Rwanda | +250 |
293
+ | BL | Saint Barthelemy | +590 |
294
+ | SH | Saint Helena | +290 |
295
+ | KN | Saint Kitts and Nevis | +1-869 |
296
+ | LC | Saint Lucia | +1-758 |
297
+ | MF | Saint Martin | +590 |
298
+ | PM | Saint Pierre and Miquelon | +508 |
299
+ | VC | Saint Vincent and the Grenadines | +1-784 |
300
+ | WS | Samoa | +685 |
301
+ | SM | San Marino | +378 |
302
+ | ST | Sao Tome and Principe | +239 |
303
+ | SA | Saudi Arabia | +966 |
304
+ | SN | Senegal | +221 |
305
+ | SC | Seychelles | +248 |
306
+ | SL | Sierra Leone | +232 |
307
+ | SG | Singapore | +65 |
308
+ | SX | Sint Maarten | +1-721 |
309
+ | SK | Slovakia | +421 |
310
+ | SI | Slovenia | +386 |
311
+ | SB | Solomon Islands | +677 |
312
+ | SO | Somalia | +252 |
313
+ | ZA | South Africa | +27 |
314
+ | GS | South Georgia and the South Sandwich Islands | +500 |
315
+ | SS | South Sudan | +211 |
316
+ | ES | Spain | +34 |
317
+ | LK | Sri Lanka | +94 |
318
+ | SD | Sudan | +249 |
319
+ | SR | Suriname | +597 |
320
+ | SZ | Swaziland | +268 |
321
+ | SE | Sweden | +46 |
322
+ | CH | Switzerland | +41 |
323
+ | SY | Syria | +963 |
324
+ | TW | Taiwan | +886 |
325
+ | TJ | Tajikistan | +992 |
326
+ | TZ | Tanzania | +255 |
327
+ | TH | Thailand | +66 |
328
+ | TL | Timor-Leste | +670 |
329
+ | TG | Togo | +228 |
330
+ | TK | Tokelau | +690 |
331
+ | TO | Tonga | +676 |
332
+ | TT | Trinidad and Tobago | +1-868 |
333
+ | TN | Tunisia | +216 |
334
+ | TR | Turkey | +90 |
335
+ | TM | Turkmenistan | +993 |
336
+ | TV | Tuvalu | +688 |
337
+ | UG | Uganda | +256 |
338
+ | UA | Ukraine | +380 |
339
+ | AE | United Arab Emirates | +971 |
340
+ | GB | United Kingdom | +44 |
341
+ | US | United States | +1 |
342
+ | UY | Uruguay | +598 |
343
+ | UZ | Uzbekistan | +998 |
344
+ | VU | Vanuatu | +678 |
345
+ | VE | Venezuela | +58 |
346
+ | VN | Vietnam | +84 |
347
+ | VG | Virgin Islands (British) | +1-284 |
348
+ | VI | Virgin Islands (U.S.) | +1-340 |
349
+ | WF | Wallis and Futuna | +681 |
350
+ | EH | Western Sahara | +212 |
351
+ | YE | Yemen | +967 |
352
+ | ZM | Zambia | +260 |
353
+ | ZW | Zimbabwe | +263 |
354
+
355
+ ## Authors
356
+
357
+ For any questions or issues, please contact:
358
+
359
+ * **Author** : [Suhail Shaji](https://github.com/suhailshaji)
360
+ * **Email** : [suhailshaji@gmail.com]()
361
+
362
+ ## Feedback
363
+
364
+ If you have any feedback, please reach out to us at
365
+ suhailshaji@gmail.com
366
+
367
+ ## License
368
+
369
+ [MIT](https://choosealicense.com/licenses/mit/)
370
+
371
+ ## 🔗 Connect
372
+
373
+ [![linkedin](https://img.shields.io/badge/linkedin-0A66C2?style=for-the-badge&logo=linkedin&logoColor=white)](https://www.linkedin.com/suhailshaji)
374
+
375
+