abstract_api.phone_validation package#

Submodules#

Module contents#

class abstract_api.phone_validation.PhoneValidation(api_key: str | None = None)[source]#

Bases: BaseService[PhoneValidationResponse]

AbstractAPI phone validation and verification service.

Used to validate and verify a phone number.

Attributes:

_subdomain: Phone validation service subdomain.

check(phone: str) PhoneValidationResponse[source]#

Validates and verifies a phone number.

Args:

phone: An phone number to be validated and verified.

Returns:

PhoneValidationResponse representing API call response.

class abstract_api.phone_validation.PhoneValidationResponse(response: Response)[source]#

Bases: NestedEntitiesMixin, JSONResponse

Phone validation service response.

property carrier: str | None#

The carrier that the number is registered with.

property country: Country | None#

The of the phone number’s country.

property format: Format | None#

International and local formats of the submitted number.

property location: str | None#

As much location details as are available from AbstractAPI’s data.

This can include the region, state / province, and in some cases down to the city.

property phone: str | None#

The phone number submitted for validation and verification.

property type: str | None#

The type of phone number.

The possible values are: Landline, Mobile, Satellite, Premium, Paging, Special, Toll_Free, and Unknown.

property valid: bool | None#

Is true if the phone number submitted is valid.