You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a simple and intuitive Python SDK for using [AbstractAPI's](https://www.abstractapi.com/) services.
4
7
5
8
Current supported services:
@@ -73,7 +76,7 @@ Pythonic way for handling responses.
73
76
The `EmailValidation` class's `check()` method expects the same parameters `email` and `auto_correct`.\
74
77
(No need to pass `api_key`. It is already passed during service instantiation.)
75
78
76
-
**Recommended**:\
79
+
**Recommended**:
77
80
- Check service class and service class response documentations.
78
81
- Response fields used in examples are not only the ones. Check documentation to see\
79
82
all the capabilities.
@@ -88,8 +91,8 @@ Pythonic way for handling responses.
88
91
if response.is_disposable_email:
89
92
print("Email is disposable, not this time :( ")
90
93
```
91
-
`EmailValidation` documentation can be found [here](TODO)\
92
-
`EmailValidationResponse` documentation can be found [here](TODO)
94
+
`EmailValidation` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.email_validation.email_validation.html#abstract_api.email_validation.email_validation.EmailValidation)\
95
+
`EmailValidationResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.email_validation.email_validation_response.html#abstract_api.email_validation.email_validation_response.EmailValidationResponse)
93
96
94
97
- Phone Validation
95
98
```python
@@ -99,8 +102,8 @@ Pythonic way for handling responses.
99
102
if response.valid:
100
103
print("Phone number is valid!")
101
104
```
102
-
`PhoneValidation` documentation can be found [here](TODO)\
103
-
`PhoneValidationResponse` documentation can be found [here](TODO)
105
+
`PhoneValidation` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.phone_validation.phone_validation.html#abstract_api.phone_validation.phone_validation.PhoneValidation)\
106
+
`PhoneValidationResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.phone_validation.phone_validation_response.html#abstract_api.phone_validation.phone_validation_response.PhoneValidationResponse)
104
107
105
108
- VAT Validation/Calculation/Inquiry
106
109
```python
@@ -110,10 +113,10 @@ Pythonic way for handling responses.
`VATValidationResponse` documentation can be found [here](TODO)\
115
-
`VATCalculationResponse` documentation can be found [here](TODO)\
116
-
`VATCategoriesResponse` documentation can be found [here](TODO)
116
+
`VAT` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.vat.vat.html#abstract_api.vat.vat.VAT)\
117
+
`VATValidationResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.vat.vat_validation_response.html#abstract_api.vat.vat_validation_response.VATValidationResponse)\
118
+
`VATCalculationResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.vat.vat_calculation_response.html#abstract_api.vat.vat_calculation_response.VATCalculationResponse)\
119
+
`VATCategoriesResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.vat.vat_categories_response.html#abstract_api.vat.vat_categories_response.VATCategoriesResponse)
117
120
118
121
- IBAN Validation
119
122
```python
@@ -123,8 +126,8 @@ Pythonic way for handling responses.
123
126
if response.is_valid:
124
127
print("IBAN is valid!")
125
128
```
126
-
`IBANValidation` documentation can be found [here](TODO)\
127
-
`IBANValidationResponse` documentation can be found [here](TODO)
129
+
`IBANValidation` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.iban_validation.iban_validation.html#abstract_api.iban_validation.iban_validation.IBANValidation)\
130
+
`IBANValidationResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.iban_validation.iban_validation_response.html#abstract_api.iban_validation.iban_validation_response.IBANValidationResponse)
128
131
129
132
- IP Geolocation
130
133
```python
@@ -133,8 +136,8 @@ Pythonic way for handling responses.
`IPGeolocation` documentation can be found [here](TODO)\
137
-
`IPGeolocationResponse` documentation can be found [here](TODO)
139
+
`IPGeolocation` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.ip_geolocation.ip_geolocation.html#abstract_api.ip_geolocation.ip_geolocation.IPGeolocation)\
140
+
`IPGeolocationResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.ip_geolocation.ip_geolocation_response.html#abstract_api.ip_geolocation.ip_geolocation_response.IPGeolocationResponse)
138
141
139
142
- Holidays Lookup
140
143
```python
@@ -143,8 +146,8 @@ Pythonic way for handling responses.
143
146
response = service.check("EG")
144
147
print(response.holidays)
145
148
```
146
-
`Holidays` documentation can be found [here](TODO)\
147
-
`HolidaysResponse` documentation can be found [here](TODO)
149
+
`Holidays` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.holidays.holidays.html#abstract_api.holidays.holidays.Holidays)\
150
+
`HolidaysResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.holidays.holidays_response.html#abstract_api.holidays.holidays_response.HolidaysResponse)
148
151
149
152
- Exchange Rates Live/Convert/Historical
150
153
```python
@@ -154,10 +157,10 @@ Pythonic way for handling responses.
`ExchangeRates` documentation can be found [here](TODO)\
158
-
`LiveExchangeRatesResponse` documentation can be found [here](TODO)\
159
-
`HistoricalExchangeRatesResponse` documentation can be found [here](TODO)\
160
-
`ExchangeRatesConversionResponse` documentation can be found [here](TODO)
160
+
`ExchangeRates` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.exchange_rates.exchange_rates.html#abstract_api.exchange_rates.exchange_rates.ExchangeRates)\
161
+
`LiveExchangeRatesResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.exchange_rates.live_exchange_rates_response.html#abstract_api.exchange_rates.live_exchange_rates_response.LiveExchangeRatesResponse)\
162
+
`HistoricalExchangeRatesResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.exchange_rates.historical_exchange_rates_response.html#abstract_api.exchange_rates.historical_exchange_rates_response.HistoricalExchangeRatesResponse)\
163
+
`ExchangeRatesConversionResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.exchange_rates.exchange_rates_conversion_response.html#abstract_api.exchange_rates.exchange_rates_conversion_response.ExchangeRatesConversionResponse)
161
164
162
165
- Company Enrichment
163
166
```python
@@ -166,8 +169,8 @@ Pythonic way for handling responses.
166
169
response = service.check("EG")
167
170
print(response.holidays)
168
171
```
169
-
`CompanyEnrichment` documentation can be found [here](TODO)\
170
-
`CompanyEnrichmentResponse` documentation can be found [here](TODO)
172
+
`CompanyEnrichment` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.company_enrichment.company_enrichment.html#abstract_api.company_enrichment.company_enrichment.CompanyEnrichment)\
173
+
`CompanyEnrichmentResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.company_enrichment.company_enrichment_response.html#abstract_api.company_enrichment.company_enrichment_response.CompanyEnrichmentResponse)
171
174
172
175
- Timezone Current/Conversion
173
176
```python
@@ -176,9 +179,9 @@ Pythonic way for handling responses.
`Timezone` documentation can be found [here](TODO)\
180
-
`CurrentTimezoneResponse` documentation can be found [here](TODO)\
181
-
`TimezoneConversionResponse` documentation can be found [here](TODO)
182
+
`Timezone` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.timezone.timezone.html#abstract_api.timezone.timezone.Timezone)\
183
+
`CurrentTimezoneResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.timezone.current_timezone_response.html#abstract_api.timezone.current_timezone_response.CurrentTimezoneResponse)\
184
+
`TimezoneConversionResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.timezone.timezone_conversion_response.html#abstract_api.timezone.timezone_conversion_response.TimezoneConversionResponse)
182
185
183
186
- Avatars Generation
184
187
```python
@@ -188,8 +191,8 @@ Pythonic way for handling responses.
188
191
file=open("logo.png", "wb+")
189
192
file.write(response.content)
190
193
```
191
-
`Avatars` documentation can be found [here](TODO)\
192
-
`AvatarsResponse` documentation can be found [here](TODO)
194
+
`Avatars` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.avatars.avatars.html#abstract_api.avatars.avatars.Avatars)\
195
+
`AvatarsResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.avatars.avatars_response.html#abstract_api.avatars.avatars_response.AvatarsResponse)
193
196
194
197
- Website Screenshot
195
198
```python
@@ -199,8 +202,8 @@ Pythonic way for handling responses.
199
202
file=open("github-home-screenshot.png", "wb+")
200
203
file.write(response.content)
201
204
```
202
-
`WebsiteScreenshot` documentation can be found [here](TODO)\
203
-
`WebsiteScreenshotResponse` documentation can be found [here](TODO)
205
+
`WebsiteScreenshot` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.website_screenshot.website_screenshot.html#abstract_api.website_screenshot.website_screenshot.WebsiteScreenshot)\
206
+
`WebsiteScreenshotResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.website_screenshot.website_screenshot_response.html#abstract_api.website_screenshot.website_screenshot_response.WebsiteScreenshotResponse)
204
207
205
208
- Website Scrape
206
209
```python
@@ -210,8 +213,8 @@ Pythonic way for handling responses.
210
213
file=open("github-home-screenshot.png", "wb+")
211
214
file.write(response.content)
212
215
```
213
-
`WebScraping` documentation can be found [here](TODO)\
214
-
`WebScrapingResponse` documentation can be found [here](TODO)
216
+
`WebScraping` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.web_scraping.web_scraping.html#abstract_api.web_scraping.web_scraping.WebScraping)\
217
+
`WebScrapingResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.web_scraping.web_scraping_response.html#abstract_api.web_scraping.web_scraping_response.WebScrapingResponse)
215
218
216
219
- Image Processing
217
220
```python
@@ -225,8 +228,8 @@ Pythonic way for handling responses.
`ImageProcessing` documentation can be found [here](TODO)\
229
-
`ImageProcessingResponse` documentation can be found [here](TODO)
231
+
`ImageProcessing` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.image_processing.image_processing.html#abstract_api.image_processing.image_processing.ImageProcessing)\
232
+
`ImageProcessingResponse` documentation can be found [here](https://abstractapi-python-sdk.readthedocs.io/en/latest/api_reference/abstract_api.image_processing.image_processing_response.html#abstract_api.image_processing.image_processing_response.ImageProcessingResponse)
230
233
231
234
### Handling Errors
232
235
1. If something wrong happened on client side:
@@ -239,7 +242,7 @@ Pythonic way for handling responses.
239
242
except ClientRequestError as e:
240
243
print("Some error happended from client's side")
241
244
print(str(e))
242
-
'quality must be in range from 1 to 100 (inclusive)'
245
+
#'quality must be in range from 1 to 100 (inclusive)'
243
246
```
244
247
2. If the service endpoint returns a status code that is not 200 or 204.\
245
248
(200 and 204 are -currently- the only accepted status codes.)
0 commit comments