opportify-sdk 0.1.3__py3-none-any.whl → 0.2.0__py3-none-any.whl

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.

Potentially problematic release.


This version of opportify-sdk might be problematic. Click here for more details.

Files changed (69) hide show
  1. openapi_client/__init__.py +19 -1
  2. openapi_client/api/email_insights_api.py +564 -1
  3. openapi_client/api/ip_insights_api.py +564 -1
  4. openapi_client/api_client.py +2 -2
  5. openapi_client/configuration.py +1 -1
  6. openapi_client/exceptions.py +18 -1
  7. openapi_client/models/__init__.py +19 -1
  8. openapi_client/models/abuse_contact.py +1 -1
  9. openapi_client/models/admin_contact.py +1 -1
  10. openapi_client/models/analyze_email200_response.py +1 -1
  11. openapi_client/models/analyze_email400_response.py +1 -1
  12. openapi_client/models/analyze_email400_response_error.py +1 -1
  13. openapi_client/models/analyze_email403_response.py +1 -1
  14. openapi_client/models/analyze_email403_response_error.py +1 -1
  15. openapi_client/models/analyze_email500_response.py +1 -1
  16. openapi_client/models/analyze_email500_response_error.py +1 -1
  17. openapi_client/models/analyze_email_request.py +1 -1
  18. openapi_client/models/analyze_ip200_response.py +1 -1
  19. openapi_client/models/analyze_ip400_response.py +1 -1
  20. openapi_client/models/analyze_ip400_response_error.py +1 -1
  21. openapi_client/models/analyze_ip404_response.py +1 -1
  22. openapi_client/models/analyze_ip500_response.py +1 -1
  23. openapi_client/models/analyze_ip_request.py +1 -1
  24. openapi_client/models/asn.py +1 -1
  25. openapi_client/models/batch_analyze_emails202_response.py +101 -0
  26. openapi_client/models/batch_analyze_emails400_response.py +91 -0
  27. openapi_client/models/batch_analyze_emails400_response_error.py +137 -0
  28. openapi_client/models/batch_analyze_emails403_response.py +91 -0
  29. openapi_client/models/batch_analyze_emails403_response_error.py +89 -0
  30. openapi_client/models/batch_analyze_emails413_response.py +91 -0
  31. openapi_client/models/batch_analyze_emails413_response_error.py +89 -0
  32. openapi_client/models/batch_analyze_emails_request.py +91 -0
  33. openapi_client/models/batch_analyze_ips400_response.py +91 -0
  34. openapi_client/models/batch_analyze_ips400_response_error.py +137 -0
  35. openapi_client/models/batch_analyze_ips_request.py +89 -0
  36. openapi_client/models/block_listed.py +1 -1
  37. openapi_client/models/email_dns.py +1 -1
  38. openapi_client/models/geo.py +1 -1
  39. openapi_client/models/get_email_batch_status200_response.py +109 -0
  40. openapi_client/models/get_email_batch_status200_response_download_urls.py +93 -0
  41. openapi_client/models/get_email_batch_status404_response.py +91 -0
  42. openapi_client/models/get_email_batch_status404_response_error.py +89 -0
  43. openapi_client/models/internalerror.py +1 -1
  44. openapi_client/models/invaliddata.py +89 -0
  45. openapi_client/models/invaliddata1.py +89 -0
  46. openapi_client/models/invalidemail.py +1 -1
  47. openapi_client/models/invalidplan.py +1 -1
  48. openapi_client/models/invalidtoken.py +1 -1
  49. openapi_client/models/ipvalidationfailed.py +1 -1
  50. openapi_client/models/malformedrequest.py +1 -1
  51. openapi_client/models/malformedrequest1.py +1 -1
  52. openapi_client/models/malformedrequest2.py +89 -0
  53. openapi_client/models/notfound.py +1 -1
  54. openapi_client/models/organization.py +1 -1
  55. openapi_client/models/risk_report_email.py +1 -1
  56. openapi_client/models/risk_report_ip.py +1 -1
  57. openapi_client/models/tech_contact.py +1 -1
  58. openapi_client/models/trusted_provider.py +1 -1
  59. openapi_client/models/whois.py +1 -1
  60. openapi_client/rest.py +1 -1
  61. opportify_sdk/email_insights.py +79 -0
  62. opportify_sdk/ip_insights.py +74 -0
  63. opportify_sdk-0.2.0.dist-info/METADATA +239 -0
  64. opportify_sdk-0.2.0.dist-info/RECORD +70 -0
  65. {opportify_sdk-0.1.3.dist-info → opportify_sdk-0.2.0.dist-info}/WHEEL +1 -1
  66. openapi_client/models/risk_report.py +0 -89
  67. opportify_sdk-0.1.3.dist-info/METADATA +0 -115
  68. opportify_sdk-0.1.3.dist-info/RECORD +0 -53
  69. {opportify_sdk-0.1.3.dist-info → opportify_sdk-0.2.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,239 @@
1
+ Metadata-Version: 2.4
2
+ Name: opportify_sdk
3
+ Version: 0.2.0
4
+ Summary: Opportify Insights API
5
+ Home-page: https://github.com/opportify/opportify-sdk-python
6
+ Author: Opportify & OpenAPI-Generator
7
+ Author-email:
8
+ Keywords: OpenAPI,OpenAPI-Generator,Opportify Insights API,Opportify
9
+ Description-Content-Type: text/markdown
10
+ Requires-Dist: urllib3<3.0.0,>=1.25.3
11
+ Requires-Dist: python-dateutil>=2.8.2
12
+ Requires-Dist: pydantic>=2
13
+ Requires-Dist: typing-extensions>=4.7.1
14
+ Dynamic: author
15
+ Dynamic: description
16
+ Dynamic: description-content-type
17
+ Dynamic: home-page
18
+ Dynamic: keywords
19
+ Dynamic: requires-dist
20
+ Dynamic: summary
21
+
22
+ # Opportify-SDK-Python
23
+
24
+ ## Overview
25
+
26
+ The **Opportify Insights API** provides access to a powerful and up-to-date platform. With advanced data warehousing and AI-driven capabilities, this API is designed to empower your business to make informed, data-driven decisions and effectively assess potential risks.
27
+
28
+ [Sign Up Free](https://www.opportify.ai)
29
+
30
+ ### Base URL
31
+ Use the following base URL for all API requests:
32
+
33
+ ```plaintext
34
+ https://api.opportify.ai/insights/v1/<service>/<endpoint>
35
+ ```
36
+
37
+ ## Requirements
38
+
39
+ Requires Python v3.8 or later
40
+
41
+ ## Getting Started
42
+
43
+ First, install Opportify SDK via PyPI manager:
44
+
45
+ ```
46
+ pip install opportify-sdk
47
+ ```
48
+
49
+ ## Single Analysis
50
+
51
+ ### Calling Email Insights
52
+
53
+ ```python
54
+ from opportify_sdk import EmailInsights
55
+
56
+ # Initialize the wrapper with your API key
57
+ api_key = "<YOUR-API-KEY-HERE>"
58
+ email_insights = EmailInsights(api_key)
59
+
60
+ # Optional: Configure host, version, and debug mode
61
+ email_insights.set_version("v1")
62
+
63
+ # Define request parameters
64
+ params = {
65
+ "email": "<SOME-EMAIL-HERE>",
66
+ "enableAutoCorrection": True,
67
+ "enableAi": True
68
+ }
69
+
70
+ # Call the API
71
+ try:
72
+ result = email_insights.analyze(params)
73
+ print("Response:", result)
74
+ except Exception as e:
75
+ print(f"Error: {e}")
76
+ ```
77
+
78
+ ### Calling IP Insights
79
+
80
+ ```python
81
+
82
+ from opportify_sdk import IpInsights
83
+
84
+ # Initialize the wrapper with your API key
85
+ api_key = "<YOUR-API-KEY-HERE>"
86
+ ip_insights = IpInsights(api_key)
87
+
88
+ # Optional: Configure host, version, and debug mode
89
+ ip_insights.set_version("v1")
90
+
91
+ # Define request parameters
92
+ params = {
93
+ "ip": "<SOME-IP-HERE>",
94
+ "enableAi": True
95
+ }
96
+
97
+ # Call the API
98
+ try:
99
+ result = ip_insights.analyze(params)
100
+ print("Response:", result)
101
+ except Exception as e:
102
+ print(f"Error: {e}")
103
+ ```
104
+
105
+ ## Batch Analysis
106
+
107
+ For processing large volumes of emails or IP addresses, use the batch analysis methods:
108
+
109
+ ### Batch Email Analysis
110
+
111
+ ```python
112
+ from opportify_sdk import EmailInsights
113
+
114
+ # Initialize the wrapper with your API key
115
+ api_key = "<YOUR-API-KEY-HERE>"
116
+ email_insights = EmailInsights(api_key)
117
+
118
+ # Define batch request parameters
119
+ batch_params = {
120
+ "emails": [
121
+ "user1@company.com",
122
+ "user2@domain.org",
123
+ "test@example.com"
124
+ ],
125
+ "enableAutoCorrection": True,
126
+ "enableAi": True
127
+ }
128
+
129
+ # Start batch analysis
130
+ try:
131
+ batch_response = email_insights.batch_analyze(batch_params)
132
+ job_id = batch_response['job_id']
133
+ print(f"Batch job started: {job_id}")
134
+
135
+ # Check batch status
136
+ status = email_insights.get_batch_status(job_id)
137
+ print(f"Status: {status['status']}, Progress: {status['progress']}%")
138
+
139
+ # When completed, download URLs will be available
140
+ if status['status'] == 'COMPLETED':
141
+ download_urls = status['download_urls']
142
+ print(f"Results ready: {download_urls['csv']}")
143
+
144
+ except Exception as e:
145
+ print(f"Error: {e}")
146
+ ```
147
+
148
+ ### Batch IP Analysis
149
+
150
+ ```python
151
+ from opportify_sdk import IpInsights
152
+
153
+ # Initialize the wrapper with your API key
154
+ api_key = "<YOUR-API-KEY-HERE>"
155
+ ip_insights = IpInsights(api_key)
156
+
157
+ # Define batch request parameters
158
+ batch_params = {
159
+ "ips": [
160
+ "8.8.8.8",
161
+ "1.1.1.1",
162
+ "192.168.1.1"
163
+ ],
164
+ "enableAi": True
165
+ }
166
+
167
+ # Start batch analysis
168
+ try:
169
+ batch_response = ip_insights.batch_analyze(batch_params)
170
+ job_id = batch_response['job_id']
171
+ print(f"Batch job started: {job_id}")
172
+
173
+ # Check batch status
174
+ status = ip_insights.get_batch_status(job_id)
175
+ print(f"Status: {status['status']}, Progress: {status['progress']}%")
176
+
177
+ # When completed, download URLs will be available
178
+ if status['status'] == 'COMPLETED':
179
+ download_urls = status['download_urls']
180
+ print(f"Results ready: {download_urls['csv']}")
181
+
182
+ except Exception as e:
183
+ print(f"Error: {e}")
184
+ ```
185
+
186
+ ## Configuration
187
+
188
+ ### Enable Debug Mode
189
+
190
+ ```python
191
+ ip_insights.set_version("v1").set_debug_mode(True)
192
+ email_insights.set_version("v1").set_debug_mode(True)
193
+ ```
194
+
195
+ ### Batch Status Polling
196
+
197
+ For long-running batch jobs, poll the status periodically:
198
+
199
+ ```python
200
+ import time
201
+
202
+ def wait_for_batch_completion(client, job_id, max_wait=300):
203
+ """Wait for batch job to complete with polling."""
204
+ start_time = time.time()
205
+
206
+ while time.time() - start_time < max_wait:
207
+ status = client.get_batch_status(job_id)
208
+
209
+ if status['status'] == 'COMPLETED':
210
+ return status
211
+ elif status['status'] == 'ERROR':
212
+ raise Exception(f"Batch job failed: {status.get('status_description')}")
213
+
214
+ print(f"Progress: {status.get('progress', 0)}%")
215
+ time.sleep(10) # Wait 10 seconds before next check
216
+
217
+ raise TimeoutError("Batch job did not complete within the timeout period")
218
+
219
+ # Usage
220
+ try:
221
+ batch_response = email_insights.batch_analyze(batch_params)
222
+ final_status = wait_for_batch_completion(email_insights, batch_response['job_id'])
223
+ print("Batch completed successfully!")
224
+ except Exception as e:
225
+ print(f"Error: {e}")
226
+ ```
227
+
228
+ ## About this package
229
+
230
+ This Python package supports both single and batch analysis operations and is a customization of the base generated by:
231
+
232
+ - [OpenAPI Generator](https://openapi-generator.tech) project.
233
+
234
+ ## Additional Resources
235
+
236
+ - **[Batch Processing Guide](BATCH_PROCESSING_GUIDE.md)** - Comprehensive guide for batch operations
237
+ - **[API Documentation](https://api.opportify.ai/docs)** - Full API reference
238
+ - **[Support](https://www.opportify.ai/support)** - Get help and support
239
+
@@ -0,0 +1,70 @@
1
+ openapi_client/__init__.py,sha256=GP3o81_VyfznrU6uQxwB4EaaPZF4kf-x4GE1fm0_ScM,8072
2
+ openapi_client/api_client.py,sha256=TNtnbhAd6CzfJXJ3Nf505_ik88Bth5RJnyVl2qlwJXw,30454
3
+ openapi_client/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
4
+ openapi_client/configuration.py,sha256=hC2aRmpj5q1As6HC1q-Q9CqlK0jD-cRjFJ_E06_0hOI,21558
5
+ openapi_client/exceptions.py,sha256=bulb1NA5LG77JM9puU1kLzNpPY8xe5T1B7zN99xqSk0,9451
6
+ openapi_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ openapi_client/rest.py,sha256=zNruqH7u1HGpdn3ZZrlLxXu60cXKxMwJMWB1Lmnllo4,12392
8
+ openapi_client/api/__init__.py,sha256=_2MpmNT7so7K9CyzP-_2Sd_1EU8-Gq10jtUKccY86-Q,176
9
+ openapi_client/api/email_insights_api.py,sha256=626w8CzU6pwxBTTIkeeyvZd6vxYzmk3FSfn8jueuVsw,48799
10
+ openapi_client/api/ip_insights_api.py,sha256=k-ACj6s4m5LeQEeka_AehUIwrzpyP2iGBxrLqtj0QKo,49600
11
+ openapi_client/models/__init__.py,sha256=trjdm5sstApvWDHVLfZvRhuqwfIZDsAHl1a7bFnhsFc,7400
12
+ openapi_client/models/abuse_contact.py,sha256=eFANN7T_IHf9e7PQoRA89kBOOFDPgHPF3KjZg7C6Fjc,6574
13
+ openapi_client/models/admin_contact.py,sha256=5TYVZYoRA42x0AtLQufe9KnGsEqQJ-Z2E-74s1gco3I,6574
14
+ openapi_client/models/analyze_email200_response.py,sha256=9ItR2jF3mq6dLCuBUWOa-XbUVe4IB_FO0RtfLHLkec4,8530
15
+ openapi_client/models/analyze_email400_response.py,sha256=PzLMgliZoU2_tUdNvW9_8VMouS7qn5v0-dJzQpiLNmg,5857
16
+ openapi_client/models/analyze_email400_response_error.py,sha256=xcBiMHD1R64wAJJ6Srf405VImwe5yGKJUn7Y1CezdAQ,8405
17
+ openapi_client/models/analyze_email403_response.py,sha256=4WYJpB9ISo0uCWqMi6H4VmtEe41kHUQRqLY-6raemyk,5857
18
+ openapi_client/models/analyze_email403_response_error.py,sha256=KJfL1rNk98mqV0hw1vjD8akvsclFsF80hEiGu5FtNRE,8320
19
+ openapi_client/models/analyze_email500_response.py,sha256=xsSaO6iW-LfPKjhCz5_ws7OZRa5nENm6w5WhyFwlJvE,5857
20
+ openapi_client/models/analyze_email500_response_error.py,sha256=k7NRxo1jg4gXjNu--yMXHxZkXIBgZa-ZyFX3bbY0m2o,5629
21
+ openapi_client/models/analyze_email_request.py,sha256=1AVVViiQGdQ4FTnCL8cCiH-zQ8ytWsx_nlCIDZtugms,6077
22
+ openapi_client/models/analyze_ip200_response.py,sha256=K3N2BgQpE3x4oI7LHq4EmAIWTJsuk3BHdKCk51WiqAQ,9166
23
+ openapi_client/models/analyze_ip400_response.py,sha256=nK2hhoS9Oq4ScRUkgnkSnac2SCfAfpZxX3AIRHffa1U,5833
24
+ openapi_client/models/analyze_ip400_response_error.py,sha256=pSiO2Qa25PCJV7mraBxG-K9DtNJbaD06L8e_anToLI4,8500
25
+ openapi_client/models/analyze_ip404_response.py,sha256=TjlVCQqWfYQq_w1i1U89RWnNAe5oxdlaO1DN9V8y-kc,5762
26
+ openapi_client/models/analyze_ip500_response.py,sha256=He2hnDq2XGsvTM1V43cBu5HJ69tShaEioo1mfzhMbbk,5782
27
+ openapi_client/models/analyze_ip_request.py,sha256=So-JYoOPAodi-7BXcE6PrCs06ZMl4kfy-HKmJQ7WBU4,5755
28
+ openapi_client/models/asn.py,sha256=69gzMBcgDVjC5hnlqHtD3ExNrlydXuNQyK1SX6UBS34,6251
29
+ openapi_client/models/batch_analyze_emails202_response.py,sha256=toSYJU8KY4nyj_iRYFzEfulbLvitmaVtVexhgNMkGhw,6427
30
+ openapi_client/models/batch_analyze_emails400_response.py,sha256=oPmwJEboRPPukkz3M2Cxo-AngSutpSg1dzTscysJk4o,5906
31
+ openapi_client/models/batch_analyze_emails400_response_error.py,sha256=wmNJfsaejnfg8CtgtzOkoWwuJJEeiL3JikJA5eZNbMM,8453
32
+ openapi_client/models/batch_analyze_emails403_response.py,sha256=GyPeW6S1YL8kUlsbB5vEQbArBT4vLK5gpXi-HYNysiE,5906
33
+ openapi_client/models/batch_analyze_emails403_response_error.py,sha256=7sqVakxFNpJZzexc4KGYc6zOoOqMmIIevtboL1ttOGg,5653
34
+ openapi_client/models/batch_analyze_emails413_response.py,sha256=LTQiKlMOfB_c0SBtu3-TW2ifuAsK1-eRXTIoMUZO56c,5906
35
+ openapi_client/models/batch_analyze_emails413_response_error.py,sha256=STJiPpkWLfPuRDwxA2-ir7sqAxvamGehfsdSDZzM3Vo,5653
36
+ openapi_client/models/batch_analyze_emails_request.py,sha256=YZJwRnxPjL_CbJMNfyMgSjkV6CHUeo7bvom1ULjI5Ck,6047
37
+ openapi_client/models/batch_analyze_ips400_response.py,sha256=E88ix0B_3QQ_TC0yImSRu5NvDTGGn4I_iIVO9rMcCmk,5882
38
+ openapi_client/models/batch_analyze_ips400_response_error.py,sha256=3esx5C5QpjfzjezGwGovwpZvqLrwMwrk-30D87L8168,8446
39
+ openapi_client/models/batch_analyze_ips_request.py,sha256=F8QE2dXynM5QummYBlFfcI02RRPW2v7FkBEDtVmlvT8,5759
40
+ openapi_client/models/block_listed.py,sha256=ZbNbcM3kd5MtZ5PR4tZuk9mdzrAhx6LP0hgBag6DtaU,6829
41
+ openapi_client/models/email_dns.py,sha256=ISJ0qQ-yjUI9EcecRm1H7gmkdy9DvRPszZ0BkHS7X-M,5560
42
+ openapi_client/models/geo.py,sha256=IM5MNzvO9AIxNhj5gxdWZ0YtGwqCI9YL_fk93kLv6dw,9893
43
+ openapi_client/models/get_email_batch_status200_response.py,sha256=oeMKR2oGGpVHICwDS751tGjm2zgOf2ZWZhbUJtNn4VU,7220
44
+ openapi_client/models/get_email_batch_status200_response_download_urls.py,sha256=j-Dc9MnA-Z0AsWNrSAi_3fAIeIky6iLd7APBOgtMKvE,6392
45
+ openapi_client/models/get_email_batch_status404_response.py,sha256=Uui5j3Zjl6UIJjUPLseJuvQHJG0fTM8ax7haXOwf7xs,5915
46
+ openapi_client/models/get_email_batch_status404_response_error.py,sha256=8WOBK1sw-Dhh4Wz0r_gSjt3DpyyYwQZn6XE9VeHNCw4,5657
47
+ openapi_client/models/internalerror.py,sha256=PMOBqC-KUuwCl0ceP4HtrbzeUnHUU7M5nV9fyHQr1Ts,5569
48
+ openapi_client/models/invaliddata.py,sha256=HqwUuRqY6UvNTeHhHAcc5t8o-4ovO7b4UfiR-WasPJY,5561
49
+ openapi_client/models/invaliddata1.py,sha256=KHRjX1Soc1Ilo2MgfU8-scnh3QbdykwTBsFIb0UJNNk,5565
50
+ openapi_client/models/invalidemail.py,sha256=fm1Qooopkdh7lapsWZiQgv5xulWFX16vHUmFmuNNtmc,5565
51
+ openapi_client/models/invalidplan.py,sha256=Sn7b6WNP--bH0rngyyujFE86O5s3Oo-Xz4p6yhaYDWI,5561
52
+ openapi_client/models/invalidtoken.py,sha256=ukDbol3g5h1frvnjR3FYlaOpitDBd6hDo5iCSAx97Cs,5565
53
+ openapi_client/models/ipvalidationfailed.py,sha256=NJ5n39-YrSEtf-sf1yhfCR_hfPX6ao85PI_-E87oaaY,5589
54
+ openapi_client/models/malformedrequest.py,sha256=84m5yUcfx8ckkH48xdxVY1nT5LNqr1Fuha-ZX0P-Ru0,5581
55
+ openapi_client/models/malformedrequest1.py,sha256=9xcrcIUJHGnKoePRdXRA-gEEIyUOe6CqWZXpkOe3BgI,5585
56
+ openapi_client/models/malformedrequest2.py,sha256=52UO3AKNs0saviudxbqbY5Xuc_E9K7Y5359TncVwAPs,5585
57
+ openapi_client/models/notfound.py,sha256=H7bDDVsr1B9ZO8CIgbwwh3XEq3DK7Lel67ORU5084WI,5549
58
+ openapi_client/models/organization.py,sha256=GsSVDda1xq4QAM53OxM9J5ODoz4dtA7spfH1TCu07LE,7144
59
+ openapi_client/models/risk_report_email.py,sha256=crGaJXcF8lZlcf6hU11DzYzRnywoH7lLkTw60RJQ_MM,9803
60
+ openapi_client/models/risk_report_ip.py,sha256=tWBGmWPj1jFyjQWhJYZa5h-6Dqc5GHxUtV_Qwey-aEQ,9152
61
+ openapi_client/models/tech_contact.py,sha256=BV7SWTM5FV9GA__a5spB2ouApzvkg6vs9GW7Fmnt6Aw,6563
62
+ openapi_client/models/trusted_provider.py,sha256=fFcUAi6efmYldLM1qCqDfYbVbfET12O_60MFZw_LFSc,6188
63
+ openapi_client/models/whois.py,sha256=CXlTxrEh4B6Q36lzt1q7s5gTieJyDl7sp2DDAJmOEZo,8847
64
+ opportify_sdk/__init__.py,sha256=b5dO5TZ0ac8L7meGstmpAzIWXS9jwPqV1EruY32dffk,139
65
+ opportify_sdk/email_insights.py,sha256=SEy4idzV_kNNkIfZyjpoW4sYeANYhYqaLd4WrSLnqI4,6564
66
+ opportify_sdk/ip_insights.py,sha256=YNodu2Pq4HDfTVtLBST2JbD7nPY5LpTPzt8oITM1r38,5886
67
+ opportify_sdk-0.2.0.dist-info/METADATA,sha256=sZNndtYjOo1y3EXfSBFO7qJPtI_f-8DPkVNr7F3vrP0,6046
68
+ opportify_sdk-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
69
+ opportify_sdk-0.2.0.dist-info/top_level.txt,sha256=90CufmKPfMOr0lxs06ndbpvXPdVbmArXAorIu2p-giU,29
70
+ opportify_sdk-0.2.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (78.1.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,89 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Opportify Insights API
5
-
6
- ## Overview The **Opportify Insights API** provides access to a powerful and up-to-date platform. With advanced data warehousing and AI-driven capabilities, this API is designed to empower your business to make informed, data-driven decisions and effectively assess potential risks. ### Base URL Use the following base URL for all API requests: ```plaintext https://api.opportify.ai/insights/v1/<service>/<endpoint> ``` ### Features - [**Email Insights:**](/docs/api-reference/email-insights) - Validate email syntax. - Identify email types (free, disposable, corporate or unknown). - Real time verifications: - Reachable: Confirms if the email domain has valid MX DNS records using DNS lookup. - Deliverable: Simulates an SMTP handshake to check if the email address exists and is deliverable. - Catch-All: Detects if the domain accepts all emails (catch-all configuration). - Intelligent Error Correction: Automatically corrects well-known misspelled email addresses. - Risk Report: Provides an AI-driven normalized score (200-1000) to evaluate email risk, using predefined thresholds. [Access Documentation >>](/docs/api-reference/email-insights) - [**IP Insights:**](/docs/api-reference/ip-insights) - Connection types: Detects connection types such as `wired`, `mobile`, `enterprise`, `satellite`, `VPN`, `cloud-provider`, `open-proxy`, or `Tor`. - Geo location: Delivers detailed insights such as country, city, timezone, language preferences, and additional location-based information to enhance regional understanding. - WHOIS: Provides main details including RIR, ASN, organization, and abuse/admin/technical contacts. - Trusted Provider Recognition: Identifies if the IP is part of a known trusted provider (e.g., ZTNA - Zero Trust Network Access). - Blocklist Reports: Retrieves up-to-date blocklist statuses, active reports, and the latest detections. - Risk Report: Delivers an AI-driven normalized score (200-1000) to evaluate IP risk, supported by predefined thresholds. [Access Documentation >>](/docs/api-reference/ip-insights) ### Authentication & Security - **API Key:** Access to the API requires an API key, which must be included in the request headers. Businesses can generate unlimited API keys directly from their account, offering flexibility and ease of use. - **ACL Rules:** Enhance security with Access Control Lists (ACL), allowing you to restrict API access from specific IP addresses or ranges. This feature provides an additional layer of protection by ensuring only authorized IPs can interact with the API. - **No Query Parameters:** As a precautionary measure, our API avoids the use of query parameters for all operations, including authentication and handling Personally Identifiable Information (PII). This approach minimizes security risks by preventing sensitive data from being exposed in access logs, browser history, cached URLs, debugging tools, or inadvertently shared URLs. All sensitive information is securely transmitted through headers or the request body.
7
-
8
- The version of the OpenAPI document: 1.0.0
9
- Generated by OpenAPI Generator (https://openapi-generator.tech)
10
-
11
- Do not edit the class manually.
12
- """ # noqa: E501
13
-
14
-
15
- from __future__ import annotations
16
- import pprint
17
- import re # noqa: F401
18
- import json
19
-
20
- from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
21
- from typing import Any, ClassVar, Dict, List, Optional
22
- from typing import Optional, Set
23
- from typing_extensions import Self
24
-
25
- class RiskReport(BaseModel):
26
- """
27
- ### Risk Level Determination This documentation outlines how the risk level is determined based on a `normalizedScore` generated by a **multivariate linear regression model**. The risk level provides a static representation of thresholds to classify the severity of risk for an entity. --- > **IMPORTANT:** > The risk report model is not available in the free plan. To access this feature, you need to subscribe to a paid plan. --- #### How the Score is Generated The risk score (`normalizedScore`) is computed using a **multivariate linear regression model**, a machine learning approach that evaluates multiple input features to predict the risk score. ##### Key Features of the Model: 1. **Dynamic Scoring:** The model assigns weights to various risk factors, dynamically updating them based on training with new data. 2. **Constant Training:** The model is continuously retrained with the latest data to improve accuracy and adapt to evolving risk patterns. 3. **Scalability:** The model supports multiple features and their interactions, deriving a comprehensive and reliable risk score. The output score is normalized to a range of **200–1000** for easier interpretation and alignment with industry practices. --- #### Risk Level Thresholds The risk level is a static representation of the `normalizedScore`, categorized into five distinct levels: | **Risk Level** | **Score Range** | **Description** | |----------------|--------------------------|---------------------------------------------------------------------------------| | `highest` | `normalizedScore > 800` | Represents the most critical level of risk. Immediate attention is required. | | `high` | `600 < normalizedScore <= 800` | Indicates a high level of risk. Consider mitigation actions promptly. | | `medium` | `400 < normalizedScore <= 600` | Reflects a moderate level of risk. Monitoring and possible action advised. | | `low` | `300 < normalizedScore <= 400` | Denotes a low level of risk. Regular monitoring is sufficient. | | `lowest` | `normalizedScore <= 300` | The lowest level of risk. Risk is considered negligible or minimal. | --- #### Usage This risk level determination serves as a human-readable representation of the machine learning model's output. It enables: - **Risk Monitoring:** Identifying entities that require immediate attention. - **Action Prioritization:** Guiding mitigation efforts based on the severity of the risk. - **Decision-Making:** Providing clear thresholds for automated and manual workflows. --- #### Key Notes 1. **Dynamic Scoring, Static Levels:** - While the score is dynamically updated through a multivariate linear regression model, the risk levels remain static to maintain consistency and interpretability. 2. **Customizable Thresholds:** - The thresholds for the levels are configurable based on organizational needs or domain-specific requirements. 3. **Model Retraining:** - Regular updates to the model ensure that scores accurately reflect real-world risk trends, improving the reliability of level assignments. --- This approach combines the adaptability of multivariate linear regression with the simplicity of static thresholds, offering a robust framework for risk assessment and decision-making. --- ### Response Elements
28
- """ # noqa: E501
29
- score: Optional[StrictInt] = Field(default=None, description="Risk score normalized to a range of 200–1000.")
30
- level: Optional[StrictStr] = Field(default=None, description="Static representation of the risk level.")
31
- __properties: ClassVar[List[str]] = ["score", "level"]
32
-
33
- model_config = ConfigDict(
34
- populate_by_name=True,
35
- validate_assignment=True,
36
- protected_namespaces=(),
37
- )
38
-
39
-
40
- def to_str(self) -> str:
41
- """Returns the string representation of the model using alias"""
42
- return pprint.pformat(self.model_dump(by_alias=True))
43
-
44
- def to_json(self) -> str:
45
- """Returns the JSON representation of the model using alias"""
46
- # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
47
- return json.dumps(self.to_dict())
48
-
49
- @classmethod
50
- def from_json(cls, json_str: str) -> Optional[Self]:
51
- """Create an instance of RiskReport from a JSON string"""
52
- return cls.from_dict(json.loads(json_str))
53
-
54
- def to_dict(self) -> Dict[str, Any]:
55
- """Return the dictionary representation of the model using alias.
56
-
57
- This has the following differences from calling pydantic's
58
- `self.model_dump(by_alias=True)`:
59
-
60
- * `None` is only added to the output dict for nullable fields that
61
- were set at model initialization. Other fields with value `None`
62
- are ignored.
63
- """
64
- excluded_fields: Set[str] = set([
65
- ])
66
-
67
- _dict = self.model_dump(
68
- by_alias=True,
69
- exclude=excluded_fields,
70
- exclude_none=True,
71
- )
72
- return _dict
73
-
74
- @classmethod
75
- def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
76
- """Create an instance of RiskReport from a dict"""
77
- if obj is None:
78
- return None
79
-
80
- if not isinstance(obj, dict):
81
- return cls.model_validate(obj)
82
-
83
- _obj = cls.model_validate({
84
- "score": obj.get("score"),
85
- "level": obj.get("level")
86
- })
87
- return _obj
88
-
89
-
@@ -1,115 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: opportify_sdk
3
- Version: 0.1.3
4
- Summary: Opportify Insights API
5
- Home-page: https://github.com/opportify/opportify-sdk-python
6
- Author: Opportify & OpenAPI-Generator
7
- Author-email:
8
- Keywords: OpenAPI,OpenAPI-Generator,Opportify Insights API,Opportify
9
- Description-Content-Type: text/markdown
10
- Requires-Dist: urllib3<3.0.0,>=1.25.3
11
- Requires-Dist: python-dateutil>=2.8.2
12
- Requires-Dist: pydantic>=2
13
- Requires-Dist: typing-extensions>=4.7.1
14
- Dynamic: author
15
- Dynamic: description
16
- Dynamic: description-content-type
17
- Dynamic: home-page
18
- Dynamic: keywords
19
- Dynamic: requires-dist
20
- Dynamic: summary
21
-
22
- # Opportify-SDK-Python
23
-
24
- ## Overview
25
-
26
- The **Opportify Insights API** provides access to a powerful and up-to-date platform. With advanced data warehousing and AI-driven capabilities, this API is designed to empower your business to make informed, data-driven decisions and effectively assess potential risks.
27
-
28
- [Sign Up Free](https://www.opportify.ai)
29
-
30
- ### Base URL
31
- Use the following base URL for all API requests:
32
-
33
- ```plaintext
34
- https://api.opportify.ai/insights/v1/<service>/<endpoint>
35
- ```
36
-
37
- ## Requirements
38
-
39
- Requires Python v3.8 or later
40
-
41
- ## Getting Started
42
-
43
- First, install Opportify SDK via PyPI manager:
44
-
45
- ```
46
- pip install opportify-sdk
47
- ```
48
-
49
- ### Calling Email Insights
50
-
51
- ```python
52
- from opportify_sdk import EmailInsights
53
-
54
- # Initialize the wrapper with your API key
55
- api_key = "<YOUR-API-KEY-HERE>"
56
- email_insights = EmailInsights(api_key)
57
-
58
- # Optional: Configure host, version, and debug mode
59
- email_insights.set_version("v1")
60
-
61
- # Define request parameters
62
- params = {
63
- "email": "<SOME-EMAIL-HERE>",
64
- "enableAutoCorrection": True,
65
- "enableAi": True
66
- }
67
-
68
- # Call the API
69
- try:
70
- result = email_insights.analyze(params)
71
- print("Response:", result)
72
- except Exception as e:
73
- print(f"Error: {e}")
74
- ```
75
-
76
- ### Calling IP Insights
77
-
78
- ```python
79
-
80
- from opportify_sdk import IpInsights
81
-
82
- # Initialize the wrapper with your API key
83
- api_key = "<YOUR-API-KEY-HERE>"
84
- ip_insights = IpInsights(api_key)
85
-
86
- # Optional: Configure host, version, and debug mode
87
- ip_insights.set_version("v1")
88
-
89
- # Define request parameters
90
- params = {
91
- "ip": "<SOME-IP-HERE>",
92
- "enableAi": True
93
- }
94
-
95
- # Call the API
96
- try:
97
- result = ip_insights.analyze(params)
98
- print("Response:", result)
99
- except Exception as e:
100
- print(f"Error: {e}")
101
- ```
102
-
103
- ### Enable Debug Mode
104
-
105
- ```python
106
- ip_insights.set_version("v1").set_debug_mode(True)
107
- email_insights.set_version("v1").set_debug_mode(True)
108
- ```
109
-
110
- ## About this package
111
-
112
- This Python package is a customization of the base generated by:
113
-
114
- - [OpenAPI Generator](https://openapi-generator.tech) project.
115
-
@@ -1,53 +0,0 @@
1
- openapi_client/__init__.py,sha256=StzTZIaM5CNZPP5MDOf_TO1vkRkdS3tGsNv3_Qu3NQU,6356
2
- openapi_client/api_client.py,sha256=v_S3upItmHMMZXNSWYBtFIy2SSjt_MLAOcXpMiBST8g,30433
3
- openapi_client/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
4
- openapi_client/configuration.py,sha256=8U7Zd4rziMXTXvviDquxlSdDgSuSmsttGYeGDNOkod0,21544
5
- openapi_client/exceptions.py,sha256=tHCC6Ij9c8ScVmZyCL5thgYXpopuUG1NSpILlHI_-Sg,8938
6
- openapi_client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- openapi_client/rest.py,sha256=QwKi4N39ZgYVtBPrXQzw8bkhpiZbfUUPuWhi44tMst0,12378
8
- openapi_client/api/__init__.py,sha256=_2MpmNT7so7K9CyzP-_2Sd_1EU8-Gq10jtUKccY86-Q,176
9
- openapi_client/api/email_insights_api.py,sha256=hLzQQ__3skAxZSElPD-hzNylWmRAEawcfPzecLSZNZs,20799
10
- openapi_client/api/ip_insights_api.py,sha256=FpnXjak3cNO9zrRIoAVrHKOZ0g8qieFTabqKhMmzVC8,21921
11
- openapi_client/models/__init__.py,sha256=MgeOgO8BXAbb_ZqEj1bXmQcEzLj5vz2g_QHpefnNvM0,5684
12
- openapi_client/models/abuse_contact.py,sha256=MqF8oUU6hxU4vLXlC6ykcpJiZhjRw6EiJDfeDWYCBxQ,6560
13
- openapi_client/models/admin_contact.py,sha256=HOmd_CnYyKtOPR-mGL3hbMZ8E5_TKlBlFgMVZOvfGH8,6560
14
- openapi_client/models/analyze_email200_response.py,sha256=K_dG0wDv37iR4dmcRwUCshYlbnjT0JYIJpa81Z55ZeQ,8516
15
- openapi_client/models/analyze_email400_response.py,sha256=BrhikNZYFE0L1SScOlmZKh1CQNsOWi8m8e1fOzG9nus,5843
16
- openapi_client/models/analyze_email400_response_error.py,sha256=oxfixZuiMnwbqRwdDzO7q4MKhQgVyFwxjOKdXpVLc_E,8391
17
- openapi_client/models/analyze_email403_response.py,sha256=u2mVjGG6jgQjqPL7UOeXo17DyJswvZucsckO0sF3gFY,5843
18
- openapi_client/models/analyze_email403_response_error.py,sha256=hhu2Pe8evQ0yagEud6W5RwGgYG90x6Ky_D7qVBB3zZw,8306
19
- openapi_client/models/analyze_email500_response.py,sha256=gAKw0QyVwBZdr52qCrSbRA8kdtBcIn-oW83hvK411j0,5843
20
- openapi_client/models/analyze_email500_response_error.py,sha256=LuKvELP551F70uAKOnQ_0eVI9fK1V5RLdksgCMtTEwA,5615
21
- openapi_client/models/analyze_email_request.py,sha256=yzu8AV6wBKWhbBUO7GtsCuKgX_KYJAg9c8bIWjMPJc4,6063
22
- openapi_client/models/analyze_ip200_response.py,sha256=4Pz8nWAbPsBFLo6Ncwaqb2xfMPBsagf8VsmjF_PX_tM,9152
23
- openapi_client/models/analyze_ip400_response.py,sha256=aLPWgDU-QbKLzTD1KzHna3VURVRfqwP5m8WM4GINZPM,5819
24
- openapi_client/models/analyze_ip400_response_error.py,sha256=X2wjsiTtaSWmC-zeKYgwtlQ-N_onhB3Fv2pvFhsOWmg,8486
25
- openapi_client/models/analyze_ip404_response.py,sha256=mzS98l1DlVKFCFaOmhBc9XjUA7DdGJSXDBmFuL8Yjyk,5748
26
- openapi_client/models/analyze_ip500_response.py,sha256=FPgWlfRyaFWGNk4xmh6UBiG_Xiys-i7IMZOWu2HoCY8,5768
27
- openapi_client/models/analyze_ip_request.py,sha256=SZHr8Gd0mRrziip0VH5bgPZu84JCXGKjTSOzO8iSczc,5741
28
- openapi_client/models/asn.py,sha256=_PtsmGJCAogM2DryLp5SuIgKZ_5H4zkLQvBcYV8-F90,6237
29
- openapi_client/models/block_listed.py,sha256=UK0LxB8cPQzr6RP18p1GfLiLyVNJqPdYYrJyuhQiwdU,6815
30
- openapi_client/models/email_dns.py,sha256=0Ttu0-pEQke0lnwkA4Tq8ZKvED6nRn6abSGkPqVEa24,5546
31
- openapi_client/models/geo.py,sha256=GtTV2s0pDguxBBCbkViNidTmFmRsxfMqMwbb0IWnYkQ,9879
32
- openapi_client/models/internalerror.py,sha256=_LhOiY2kPKsN_WDU7tVuY65A9-mNiamedWqJddWKRZQ,5555
33
- openapi_client/models/invalidemail.py,sha256=-ofiTmHw2O61p_hzzELf_wpa9zgi5FjV_Kc-duJFY-o,5551
34
- openapi_client/models/invalidplan.py,sha256=uwgCaZ2MWv6fUkz2ptX8zivFz8gMLXVWzPjdi66Pi_U,5547
35
- openapi_client/models/invalidtoken.py,sha256=YxplE1S-VDOol7_zEBcRzpS_G630QeqQPHNz20LvN8o,5551
36
- openapi_client/models/ipvalidationfailed.py,sha256=Clmw3EqB48h6mfhUzNnWvgO5IzfLq03pMbtWfzxD8xo,5575
37
- openapi_client/models/malformedrequest.py,sha256=gaOr0Bh_d_Fy0gstnQzurGUD6JAF_kk2fi7Y7PnitB0,5567
38
- openapi_client/models/malformedrequest1.py,sha256=PZ1e26zin5yhpjwnsuht8XNIHweURLb3n1NwR8rTvV8,5571
39
- openapi_client/models/notfound.py,sha256=HifW-VdCOp0mn5RQdeM6QVQR1kZc5PlENAik0b9SGDo,5535
40
- openapi_client/models/organization.py,sha256=IcJr7vJXyKwE9VjlWwJh1PeRar3_gQ4sNkvniMSLQzk,7130
41
- openapi_client/models/risk_report.py,sha256=ANg1NOURvS-2mXbU8lNHgAlTNuNUYw4NkF43TR5ujsc,9132
42
- openapi_client/models/risk_report_email.py,sha256=Lz7DCiTIE4x1DCE5RsbdxlPB4yEwbDpA0RiK0zKh6lY,9789
43
- openapi_client/models/risk_report_ip.py,sha256=ctLbSRt1llA5a0KI3nJVir4Kj0BoHcUd-OKM4QD9f78,9138
44
- openapi_client/models/tech_contact.py,sha256=AF9myIFacYEMknGN_gGrqjRn8_mpiI7Y_fGhp1wHWpE,6549
45
- openapi_client/models/trusted_provider.py,sha256=DI33v3eTc6fUhx5NqbjOE7ZpA2VcKbNLSV5MWqodGB0,6174
46
- openapi_client/models/whois.py,sha256=Yoo9QsUHPMjo9nwSR_H8ZHMhP2fYNRug3jBk3Do6vcw,8833
47
- opportify_sdk/__init__.py,sha256=b5dO5TZ0ac8L7meGstmpAzIWXS9jwPqV1EruY32dffk,139
48
- opportify_sdk/email_insights.py,sha256=i4NaYLZiJfXeHaNRZz3V15q8nsgGMcC37iBG5AaDj-Q,3283
49
- opportify_sdk/ip_insights.py,sha256=hJOAqrETps6J8J5Gb5BWeisDLsdQ4ndUH9namV4f0G0,3007
50
- opportify_sdk-0.1.3.dist-info/METADATA,sha256=wjJ-x4MxXgqTL5WXo1Ej0JPPqvVkhA_VH-fmxXNzhV4,2606
51
- opportify_sdk-0.1.3.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
52
- opportify_sdk-0.1.3.dist-info/top_level.txt,sha256=90CufmKPfMOr0lxs06ndbpvXPdVbmArXAorIu2p-giU,29
53
- opportify_sdk-0.1.3.dist-info/RECORD,,