apiverve-dnslookup 1.0.11__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,203 @@
1
+ Metadata-Version: 2.1
2
+ Name: apiverve-dnslookup
3
+ Version: 1.0.11
4
+ Summary: DNS Lookup is a simple tool for looking up the DNS records of a domain. It returns the A, MX, and other records of the domain.
5
+ Author-email: APIVerve <hello@apiverve.com>
6
+ Project-URL: Homepage, https://apiverve.com
7
+ Keywords: dns,dns lookup,dns records,dns lookup api,dns records api
8
+ Classifier: Development Status :: 5 - Production/Stable
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Financial and Insurance Industry
14
+ Classifier: Intended Audience :: Healthcare Industry
15
+ Classifier: Intended Audience :: Education
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: Intended Audience :: Information Technology
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Classifier: Topic :: Utilities
20
+ Classifier: Topic :: Scientific/Engineering
21
+ Classifier: Topic :: Education
22
+ Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
23
+ Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
24
+ Classifier: Topic :: Internet :: WWW/HTTP
25
+ Classifier: Topic :: Software Development :: Libraries
26
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
27
+ Classifier: Topic :: Internet
28
+ Classifier: Topic :: Communications
29
+ Classifier: Topic :: Office/Business
30
+ Classifier: Topic :: Text Processing
31
+ Classifier: Topic :: Security
32
+ Classifier: Topic :: Database
33
+ Classifier: Topic :: Software Development :: Code Generators
34
+ Classifier: Topic :: Software Development :: Pre-processors
35
+ Classifier: Topic :: Software Development :: Quality Assurance
36
+ Classifier: Topic :: Software Development :: Testing
37
+ Classifier: Natural Language :: English
38
+ Requires-Python: >=3.12
39
+ Description-Content-Type: text/markdown
40
+ License-File: LICENSE
41
+
42
+ DNS Lookup API
43
+ ============
44
+
45
+ DNS Lookup is a simple tool for looking up the DNS records of a domain. It returns the A, MX, and other records of the domain.
46
+
47
+ ![Build Status](https://img.shields.io/badge/build-passing-green)
48
+ ![Code Climate](https://img.shields.io/badge/maintainability-B-purple)
49
+ ![Prod Ready](https://img.shields.io/badge/production-ready-blue)
50
+
51
+ This is a Python API Wrapper for the [DNS Lookup API](https://apiverve.com/marketplace/api/dnslookup)
52
+
53
+ ---
54
+
55
+ ## Installation
56
+ pip install apiverve-dnslookup
57
+
58
+ ---
59
+
60
+ ## Configuration
61
+
62
+ Before using the dnslookup API client, you have to setup your account and obtain your API Key.
63
+ You can get it by signing up at [https://apiverve.com](https://apiverve.com)
64
+
65
+ ---
66
+
67
+ ## Usage
68
+
69
+ The DNS Lookup API documentation is found here: [https://docs.apiverve.com/api/dnslookup](https://docs.apiverve.com/api/dnslookup).
70
+ You can find parameters, example responses, and status codes documented here.
71
+
72
+ ### Setup
73
+
74
+ ```
75
+ # Import the client module
76
+ from apiverve_dnslookup.apiClient import DnslookupAPIClient
77
+
78
+ # Initialize the client with your APIVerve API key
79
+ api = DnslookupAPIClient("[YOUR_API_KEY]")
80
+ ```
81
+
82
+ ---
83
+
84
+
85
+ ### Perform Request
86
+ Using the API client, you can perform requests to the API.
87
+
88
+ ###### Define Query
89
+
90
+ ```
91
+ query = { "domain": "myspace.com" }
92
+ ```
93
+
94
+ ###### Simple Request
95
+
96
+ ```
97
+ # Make a request to the API
98
+ result = api.execute(query)
99
+
100
+ # Print the result
101
+ print(result)
102
+ ```
103
+
104
+ ###### Example Response
105
+
106
+ ```
107
+ {
108
+ "status": "ok",
109
+ "error": null,
110
+ "data": {
111
+ "domain": "myspace.com",
112
+ "records": {
113
+ "A": [
114
+ "34.111.176.156"
115
+ ],
116
+ "NS": [
117
+ "ns-cloud-a3.googledomains.com",
118
+ "ns-cloud-a4.googledomains.com",
119
+ "ns-cloud-a2.googledomains.com",
120
+ "ns-cloud-a1.googledomains.com"
121
+ ],
122
+ "SOA": {
123
+ "nsname": "ns-cloud-a1.googledomains.com",
124
+ "hostmaster": "cloud-dns-hostmaster.google.com",
125
+ "serial": 2,
126
+ "refresh": 21600,
127
+ "retry": 3600,
128
+ "expire": 259200,
129
+ "minttl": 300
130
+ },
131
+ "TXT": [
132
+ [
133
+ "qpdYoeakhlmAxsnmxgAVFmJgUSibqb/y+Eu6GGn8pdmLf+mFGIB3jhRAxIC5KObsPMES9MW2c+oOrpOo/lCQVw=="
134
+ ],
135
+ [
136
+ "v=spf1 mx ip4:63.208.226.34 ip4:204.16.32.0/22 ip4:67.134.143.0/24 ip4:216.205.243.0/24 ip4:34.85.156.5/32 ip4:35.245.108.108/32 ip4:34.86.129.193/32 ip4:34.86.134.94/32 ip4:34.85.222.234/32 ip4:34.86.176.234/32 ip4:34.86.125.212/32 ip4:34.85.224.60/32 ip4:34.86.160.49/32 ip4:35.245.64.166/32 ip4:35.188.226.11/32 ip4:34.86.208.228/32 ip4:34.85.216.144/32 ip4:35.221.22.153/32 ip4:34.86.137.108/32 ip4:34.86.51.35/32 ip4:34.150.221.40/32 ip4:34.85.216.70/32 ip4:34.86.37.191/32 ip4:34.85.214.215/32 ip4:35.236.234.82/32 ip4:34.86.161.241/32 ip4:216.32.181.16 ip4:216.178.32.0/20 ip4:168.235.224.0/24 include:_netblocks.mimecast.com -all"
137
+ ],
138
+ [
139
+ "al4upe6q5cl13sg4srvfivflvg"
140
+ ],
141
+ [
142
+ "cj65vjpq0s1v9u7vfo020c6rel"
143
+ ],
144
+ [
145
+ "cr40m536tje9on1slld9bi81bg"
146
+ ],
147
+ [
148
+ "google-site-verification=q0iWqpcfOBclAJaCeWh83v62QQ4uCgbWObQ08p37qgU"
149
+ ],
150
+ [
151
+ "MS=ms89904786"
152
+ ],
153
+ [
154
+ "google-site-verification=eu-3gW1JePvsGRRCaEvH17YUOTFJNofm4lnz2Pk0LTc"
155
+ ],
156
+ [
157
+ "oZ19a+EOIwWVDPJ7POj14UAGBfzk9xcJMmsTUAMUy7H82sDuVCxvw9rZqdg3znFrdTH04+49zd1djhEAt0ooiA=="
158
+ ]
159
+ ],
160
+ "MX": [
161
+ {
162
+ "exchange": "us-smtp-inbound-1.mimecast.com",
163
+ "priority": 10
164
+ },
165
+ {
166
+ "exchange": "us-smtp-inbound-2.mimecast.com",
167
+ "priority": 10
168
+ }
169
+ ]
170
+ }
171
+ }
172
+ }
173
+ ```
174
+
175
+ ---
176
+
177
+ ## Customer Support
178
+
179
+ Need any assistance? [Get in touch with Customer Support](https://apiverve.com/contact).
180
+
181
+ ---
182
+
183
+ ## Updates
184
+ Stay up to date by following [@apiverveHQ](https://twitter.com/apiverveHQ) on Twitter.
185
+
186
+ ---
187
+
188
+ ## Legal
189
+
190
+ All usage of the APIVerve website, API, and services is subject to the [APIVerve Terms of Service](https://apiverve.com/terms) and all legal documents and agreements.
191
+
192
+ ---
193
+
194
+ ## License
195
+ Licensed under the The MIT License (MIT)
196
+
197
+ Copyright (&copy;) 2024 APIVerve, and Evlar LLC
198
+
199
+ 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:
200
+
201
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
202
+
203
+ 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,162 @@
1
+ DNS Lookup API
2
+ ============
3
+
4
+ DNS Lookup is a simple tool for looking up the DNS records of a domain. It returns the A, MX, and other records of the domain.
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 [DNS Lookup API](https://apiverve.com/marketplace/api/dnslookup)
11
+
12
+ ---
13
+
14
+ ## Installation
15
+ pip install apiverve-dnslookup
16
+
17
+ ---
18
+
19
+ ## Configuration
20
+
21
+ Before using the dnslookup API client, you have to setup your account and obtain your API Key.
22
+ You can get it by signing up at [https://apiverve.com](https://apiverve.com)
23
+
24
+ ---
25
+
26
+ ## Usage
27
+
28
+ The DNS Lookup API documentation is found here: [https://docs.apiverve.com/api/dnslookup](https://docs.apiverve.com/api/dnslookup).
29
+ You can find parameters, example responses, and status codes documented here.
30
+
31
+ ### Setup
32
+
33
+ ```
34
+ # Import the client module
35
+ from apiverve_dnslookup.apiClient import DnslookupAPIClient
36
+
37
+ # Initialize the client with your APIVerve API key
38
+ api = DnslookupAPIClient("[YOUR_API_KEY]")
39
+ ```
40
+
41
+ ---
42
+
43
+
44
+ ### Perform Request
45
+ Using the API client, you can perform requests to the API.
46
+
47
+ ###### Define Query
48
+
49
+ ```
50
+ query = { "domain": "myspace.com" }
51
+ ```
52
+
53
+ ###### Simple Request
54
+
55
+ ```
56
+ # Make a request to the API
57
+ result = api.execute(query)
58
+
59
+ # Print the result
60
+ print(result)
61
+ ```
62
+
63
+ ###### Example Response
64
+
65
+ ```
66
+ {
67
+ "status": "ok",
68
+ "error": null,
69
+ "data": {
70
+ "domain": "myspace.com",
71
+ "records": {
72
+ "A": [
73
+ "34.111.176.156"
74
+ ],
75
+ "NS": [
76
+ "ns-cloud-a3.googledomains.com",
77
+ "ns-cloud-a4.googledomains.com",
78
+ "ns-cloud-a2.googledomains.com",
79
+ "ns-cloud-a1.googledomains.com"
80
+ ],
81
+ "SOA": {
82
+ "nsname": "ns-cloud-a1.googledomains.com",
83
+ "hostmaster": "cloud-dns-hostmaster.google.com",
84
+ "serial": 2,
85
+ "refresh": 21600,
86
+ "retry": 3600,
87
+ "expire": 259200,
88
+ "minttl": 300
89
+ },
90
+ "TXT": [
91
+ [
92
+ "qpdYoeakhlmAxsnmxgAVFmJgUSibqb/y+Eu6GGn8pdmLf+mFGIB3jhRAxIC5KObsPMES9MW2c+oOrpOo/lCQVw=="
93
+ ],
94
+ [
95
+ "v=spf1 mx ip4:63.208.226.34 ip4:204.16.32.0/22 ip4:67.134.143.0/24 ip4:216.205.243.0/24 ip4:34.85.156.5/32 ip4:35.245.108.108/32 ip4:34.86.129.193/32 ip4:34.86.134.94/32 ip4:34.85.222.234/32 ip4:34.86.176.234/32 ip4:34.86.125.212/32 ip4:34.85.224.60/32 ip4:34.86.160.49/32 ip4:35.245.64.166/32 ip4:35.188.226.11/32 ip4:34.86.208.228/32 ip4:34.85.216.144/32 ip4:35.221.22.153/32 ip4:34.86.137.108/32 ip4:34.86.51.35/32 ip4:34.150.221.40/32 ip4:34.85.216.70/32 ip4:34.86.37.191/32 ip4:34.85.214.215/32 ip4:35.236.234.82/32 ip4:34.86.161.241/32 ip4:216.32.181.16 ip4:216.178.32.0/20 ip4:168.235.224.0/24 include:_netblocks.mimecast.com -all"
96
+ ],
97
+ [
98
+ "al4upe6q5cl13sg4srvfivflvg"
99
+ ],
100
+ [
101
+ "cj65vjpq0s1v9u7vfo020c6rel"
102
+ ],
103
+ [
104
+ "cr40m536tje9on1slld9bi81bg"
105
+ ],
106
+ [
107
+ "google-site-verification=q0iWqpcfOBclAJaCeWh83v62QQ4uCgbWObQ08p37qgU"
108
+ ],
109
+ [
110
+ "MS=ms89904786"
111
+ ],
112
+ [
113
+ "google-site-verification=eu-3gW1JePvsGRRCaEvH17YUOTFJNofm4lnz2Pk0LTc"
114
+ ],
115
+ [
116
+ "oZ19a+EOIwWVDPJ7POj14UAGBfzk9xcJMmsTUAMUy7H82sDuVCxvw9rZqdg3znFrdTH04+49zd1djhEAt0ooiA=="
117
+ ]
118
+ ],
119
+ "MX": [
120
+ {
121
+ "exchange": "us-smtp-inbound-1.mimecast.com",
122
+ "priority": 10
123
+ },
124
+ {
125
+ "exchange": "us-smtp-inbound-2.mimecast.com",
126
+ "priority": 10
127
+ }
128
+ ]
129
+ }
130
+ }
131
+ }
132
+ ```
133
+
134
+ ---
135
+
136
+ ## Customer Support
137
+
138
+ Need any assistance? [Get in touch with Customer Support](https://apiverve.com/contact).
139
+
140
+ ---
141
+
142
+ ## Updates
143
+ Stay up to date by following [@apiverveHQ](https://twitter.com/apiverveHQ) on Twitter.
144
+
145
+ ---
146
+
147
+ ## Legal
148
+
149
+ All usage of the APIVerve website, API, and services is subject to the [APIVerve Terms of Service](https://apiverve.com/terms) and all legal documents and agreements.
150
+
151
+ ---
152
+
153
+ ## License
154
+ Licensed under the The MIT License (MIT)
155
+
156
+ Copyright (&copy;) 2024 APIVerve, and Evlar LLC
157
+
158
+ 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:
159
+
160
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
161
+
162
+ 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,45 @@
1
+ [project]
2
+ name = "apiverve-dnslookup"
3
+ version = "1.0.11"
4
+ authors = [
5
+ { name="APIVerve", email="hello@apiverve.com" },
6
+ ]
7
+ description = "DNS Lookup is a simple tool for looking up the DNS records of a domain. It returns the A, MX, and other records of the domain."
8
+ keywords = ["dns","dns lookup","dns records","dns lookup api","dns records api"]
9
+ readme = "README.md"
10
+ requires-python = ">=3.12"
11
+ classifiers = [
12
+ "Development Status :: 5 - Production/Stable",
13
+ "Programming Language :: Python :: 3",
14
+ "License :: OSI Approved :: MIT License",
15
+ "Operating System :: OS Independent",
16
+ "Intended Audience :: Developers",
17
+ "Intended Audience :: Financial and Insurance Industry",
18
+ "Intended Audience :: Healthcare Industry",
19
+ "Intended Audience :: Education",
20
+ "Intended Audience :: Science/Research",
21
+ "Intended Audience :: Information Technology",
22
+ "Topic :: Software Development :: Libraries :: Python Modules",
23
+ "Topic :: Utilities",
24
+ "Topic :: Scientific/Engineering",
25
+ "Topic :: Education",
26
+ "Topic :: Internet :: WWW/HTTP :: Indexing/Search",
27
+ "Topic :: Internet :: WWW/HTTP :: Site Management",
28
+ "Topic :: Internet :: WWW/HTTP",
29
+ "Topic :: Software Development :: Libraries",
30
+ "Topic :: Software Development :: Libraries :: Application Frameworks",
31
+ "Topic :: Internet",
32
+ "Topic :: Communications",
33
+ "Topic :: Office/Business",
34
+ "Topic :: Text Processing",
35
+ "Topic :: Security",
36
+ "Topic :: Database",
37
+ "Topic :: Software Development :: Code Generators",
38
+ "Topic :: Software Development :: Pre-processors",
39
+ "Topic :: Software Development :: Quality Assurance",
40
+ "Topic :: Software Development :: Testing",
41
+ "Natural Language :: English",
42
+ ]
43
+
44
+ [project.urls]
45
+ Homepage = "https://apiverve.com"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1 @@
1
+ from .apiClient import DnslookupAPIClient
@@ -0,0 +1,38 @@
1
+ import requests
2
+
3
+ class DnslookupAPIClient:
4
+ def __init__(self, api_key, secure=True):
5
+ """
6
+ Initialize the DnslookupAPIClient with the API key and secure flag
7
+ :param api_key: API key
8
+ :param secure: Deprecated. Always set to True
9
+ """
10
+
11
+ self.api_key = api_key
12
+ self.secure = secure
13
+ self.base_url = 'https://api.apiverve.com/v1/dnslookup'
14
+ self.headers = {
15
+ 'x-api-key': self.api_key,
16
+ 'auth-mode': 'pypi'
17
+ }
18
+
19
+ def execute(self, params=None):
20
+ """
21
+ Execute the API request
22
+ :param params: API parameters, if any
23
+ :return: API response
24
+ """
25
+
26
+ method = "GET"
27
+
28
+ try:
29
+ if method.upper() == 'POST':
30
+ response = requests.post(self.base_url, headers=self.headers, json=params)
31
+ else:
32
+ response = requests.get(self.base_url, headers=self.headers, params=params)
33
+
34
+ response.raise_for_status()
35
+ return response.json()
36
+ except requests.exceptions.RequestException as e:
37
+ print(f"An error occurred: {e}")
38
+ raise e
@@ -0,0 +1,3 @@
1
+ class DnslookupDNSLookupAPIError(Exception):
2
+ """A custom exception for API errors"""
3
+ pass
@@ -0,0 +1,21 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name='apiverve_dnslookup',
5
+ version='1.0.11',
6
+ packages=find_packages(),
7
+ include_package_data=True,
8
+ install_requires=[
9
+ 'requests',
10
+ 'setuptools'
11
+ ],
12
+ description='DNS Lookup is a simple tool for looking up the DNS records of a domain. It returns the A, MX, and other records of the domain.',
13
+ author='APIVerve',
14
+ author_email='hello@apiverve.com',
15
+ url='https://apiverve.com',
16
+ classifiers=[
17
+ 'Programming Language :: Python :: 3',
18
+ 'Operating System :: OS Independent',
19
+ ],
20
+ python_requires='>=3.6',
21
+ )
@@ -0,0 +1 @@
1
+ # Initialize test module
@@ -0,0 +1,19 @@
1
+ import unittest
2
+ from apiverve_dnslookup.apiClient import DnslookupAPIClient
3
+
4
+ class TestClient(unittest.TestCase):
5
+
6
+ def setUp(self):
7
+ self.api_key = 'test_api_key'
8
+ self.client = DnslookupAPIClient(self.api_key)
9
+
10
+ def test_get(self):
11
+ # Assuming there's an endpoint 'test_endpoint' for testing purposes
12
+ try:
13
+ response = self.client.get('test_endpoint')
14
+ self.assertIsInstance(response, dict)
15
+ except Exception as e:
16
+ self.fail(f"GET request failed with exception {e}")
17
+
18
+ if __name__ == '__main__':
19
+ unittest.main()
@@ -0,0 +1,203 @@
1
+ Metadata-Version: 2.1
2
+ Name: apiverve-dnslookup
3
+ Version: 1.0.11
4
+ Summary: DNS Lookup is a simple tool for looking up the DNS records of a domain. It returns the A, MX, and other records of the domain.
5
+ Author-email: APIVerve <hello@apiverve.com>
6
+ Project-URL: Homepage, https://apiverve.com
7
+ Keywords: dns,dns lookup,dns records,dns lookup api,dns records api
8
+ Classifier: Development Status :: 5 - Production/Stable
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Intended Audience :: Financial and Insurance Industry
14
+ Classifier: Intended Audience :: Healthcare Industry
15
+ Classifier: Intended Audience :: Education
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: Intended Audience :: Information Technology
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Classifier: Topic :: Utilities
20
+ Classifier: Topic :: Scientific/Engineering
21
+ Classifier: Topic :: Education
22
+ Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
23
+ Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
24
+ Classifier: Topic :: Internet :: WWW/HTTP
25
+ Classifier: Topic :: Software Development :: Libraries
26
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
27
+ Classifier: Topic :: Internet
28
+ Classifier: Topic :: Communications
29
+ Classifier: Topic :: Office/Business
30
+ Classifier: Topic :: Text Processing
31
+ Classifier: Topic :: Security
32
+ Classifier: Topic :: Database
33
+ Classifier: Topic :: Software Development :: Code Generators
34
+ Classifier: Topic :: Software Development :: Pre-processors
35
+ Classifier: Topic :: Software Development :: Quality Assurance
36
+ Classifier: Topic :: Software Development :: Testing
37
+ Classifier: Natural Language :: English
38
+ Requires-Python: >=3.12
39
+ Description-Content-Type: text/markdown
40
+ License-File: LICENSE
41
+
42
+ DNS Lookup API
43
+ ============
44
+
45
+ DNS Lookup is a simple tool for looking up the DNS records of a domain. It returns the A, MX, and other records of the domain.
46
+
47
+ ![Build Status](https://img.shields.io/badge/build-passing-green)
48
+ ![Code Climate](https://img.shields.io/badge/maintainability-B-purple)
49
+ ![Prod Ready](https://img.shields.io/badge/production-ready-blue)
50
+
51
+ This is a Python API Wrapper for the [DNS Lookup API](https://apiverve.com/marketplace/api/dnslookup)
52
+
53
+ ---
54
+
55
+ ## Installation
56
+ pip install apiverve-dnslookup
57
+
58
+ ---
59
+
60
+ ## Configuration
61
+
62
+ Before using the dnslookup API client, you have to setup your account and obtain your API Key.
63
+ You can get it by signing up at [https://apiverve.com](https://apiverve.com)
64
+
65
+ ---
66
+
67
+ ## Usage
68
+
69
+ The DNS Lookup API documentation is found here: [https://docs.apiverve.com/api/dnslookup](https://docs.apiverve.com/api/dnslookup).
70
+ You can find parameters, example responses, and status codes documented here.
71
+
72
+ ### Setup
73
+
74
+ ```
75
+ # Import the client module
76
+ from apiverve_dnslookup.apiClient import DnslookupAPIClient
77
+
78
+ # Initialize the client with your APIVerve API key
79
+ api = DnslookupAPIClient("[YOUR_API_KEY]")
80
+ ```
81
+
82
+ ---
83
+
84
+
85
+ ### Perform Request
86
+ Using the API client, you can perform requests to the API.
87
+
88
+ ###### Define Query
89
+
90
+ ```
91
+ query = { "domain": "myspace.com" }
92
+ ```
93
+
94
+ ###### Simple Request
95
+
96
+ ```
97
+ # Make a request to the API
98
+ result = api.execute(query)
99
+
100
+ # Print the result
101
+ print(result)
102
+ ```
103
+
104
+ ###### Example Response
105
+
106
+ ```
107
+ {
108
+ "status": "ok",
109
+ "error": null,
110
+ "data": {
111
+ "domain": "myspace.com",
112
+ "records": {
113
+ "A": [
114
+ "34.111.176.156"
115
+ ],
116
+ "NS": [
117
+ "ns-cloud-a3.googledomains.com",
118
+ "ns-cloud-a4.googledomains.com",
119
+ "ns-cloud-a2.googledomains.com",
120
+ "ns-cloud-a1.googledomains.com"
121
+ ],
122
+ "SOA": {
123
+ "nsname": "ns-cloud-a1.googledomains.com",
124
+ "hostmaster": "cloud-dns-hostmaster.google.com",
125
+ "serial": 2,
126
+ "refresh": 21600,
127
+ "retry": 3600,
128
+ "expire": 259200,
129
+ "minttl": 300
130
+ },
131
+ "TXT": [
132
+ [
133
+ "qpdYoeakhlmAxsnmxgAVFmJgUSibqb/y+Eu6GGn8pdmLf+mFGIB3jhRAxIC5KObsPMES9MW2c+oOrpOo/lCQVw=="
134
+ ],
135
+ [
136
+ "v=spf1 mx ip4:63.208.226.34 ip4:204.16.32.0/22 ip4:67.134.143.0/24 ip4:216.205.243.0/24 ip4:34.85.156.5/32 ip4:35.245.108.108/32 ip4:34.86.129.193/32 ip4:34.86.134.94/32 ip4:34.85.222.234/32 ip4:34.86.176.234/32 ip4:34.86.125.212/32 ip4:34.85.224.60/32 ip4:34.86.160.49/32 ip4:35.245.64.166/32 ip4:35.188.226.11/32 ip4:34.86.208.228/32 ip4:34.85.216.144/32 ip4:35.221.22.153/32 ip4:34.86.137.108/32 ip4:34.86.51.35/32 ip4:34.150.221.40/32 ip4:34.85.216.70/32 ip4:34.86.37.191/32 ip4:34.85.214.215/32 ip4:35.236.234.82/32 ip4:34.86.161.241/32 ip4:216.32.181.16 ip4:216.178.32.0/20 ip4:168.235.224.0/24 include:_netblocks.mimecast.com -all"
137
+ ],
138
+ [
139
+ "al4upe6q5cl13sg4srvfivflvg"
140
+ ],
141
+ [
142
+ "cj65vjpq0s1v9u7vfo020c6rel"
143
+ ],
144
+ [
145
+ "cr40m536tje9on1slld9bi81bg"
146
+ ],
147
+ [
148
+ "google-site-verification=q0iWqpcfOBclAJaCeWh83v62QQ4uCgbWObQ08p37qgU"
149
+ ],
150
+ [
151
+ "MS=ms89904786"
152
+ ],
153
+ [
154
+ "google-site-verification=eu-3gW1JePvsGRRCaEvH17YUOTFJNofm4lnz2Pk0LTc"
155
+ ],
156
+ [
157
+ "oZ19a+EOIwWVDPJ7POj14UAGBfzk9xcJMmsTUAMUy7H82sDuVCxvw9rZqdg3znFrdTH04+49zd1djhEAt0ooiA=="
158
+ ]
159
+ ],
160
+ "MX": [
161
+ {
162
+ "exchange": "us-smtp-inbound-1.mimecast.com",
163
+ "priority": 10
164
+ },
165
+ {
166
+ "exchange": "us-smtp-inbound-2.mimecast.com",
167
+ "priority": 10
168
+ }
169
+ ]
170
+ }
171
+ }
172
+ }
173
+ ```
174
+
175
+ ---
176
+
177
+ ## Customer Support
178
+
179
+ Need any assistance? [Get in touch with Customer Support](https://apiverve.com/contact).
180
+
181
+ ---
182
+
183
+ ## Updates
184
+ Stay up to date by following [@apiverveHQ](https://twitter.com/apiverveHQ) on Twitter.
185
+
186
+ ---
187
+
188
+ ## Legal
189
+
190
+ All usage of the APIVerve website, API, and services is subject to the [APIVerve Terms of Service](https://apiverve.com/terms) and all legal documents and agreements.
191
+
192
+ ---
193
+
194
+ ## License
195
+ Licensed under the The MIT License (MIT)
196
+
197
+ Copyright (&copy;) 2024 APIVerve, and Evlar LLC
198
+
199
+ 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:
200
+
201
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
202
+
203
+ 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,14 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/apiverve_dnslookup/__init__.py
5
+ src/apiverve_dnslookup/apiClient.py
6
+ src/apiverve_dnslookup/exceptions.py
7
+ src/apiverve_dnslookup/setup.py
8
+ src/apiverve_dnslookup.egg-info/PKG-INFO
9
+ src/apiverve_dnslookup.egg-info/SOURCES.txt
10
+ src/apiverve_dnslookup.egg-info/dependency_links.txt
11
+ src/apiverve_dnslookup.egg-info/top_level.txt
12
+ src/apiverve_dnslookup/tests/__init__.py
13
+ src/apiverve_dnslookup/tests/test_api.py
14
+ tests/test_api.py
@@ -0,0 +1,27 @@
1
+ import unittest
2
+ from apiverve_dnslookup.apiClient import DnslookupAPIClient
3
+ from unittest.mock import patch
4
+
5
+ class TestDnslookupAPIClient(unittest.TestCase):
6
+
7
+ def setUp(self):
8
+ self.api_key = 'test_api_key'
9
+ self.client = DnslookupAPIClient(self.api_key)
10
+
11
+ @patch('apiverve_dnslookup.apiClient.requests.get')
12
+ def test_make_request_success(self, mock_get):
13
+ # Assuming there's an endpoint 'test_endpoint' for testing purposes
14
+ mock_get.return_value.status_code = 200
15
+ mock_get.return_value.json.return_value = {'test': 'test'}
16
+ response = self.client.get('test_endpoint')
17
+ self.assertIsInstance(response, dict)
18
+
19
+ @patch('apiverve_dnslookup.apiClient.requests.get')
20
+ def test_make_request_failure(self, mock_get):
21
+ # Assuming there's an endpoint 'test_endpoint' for testing purposes
22
+ mock_get.return_value.status_code = 404
23
+ with self.assertRaises(Exception):
24
+ self.client.get('test_endpoint')
25
+
26
+ if __name__ == '__main__':
27
+ unittest.main()