Metadata-Version: 2.4
Name: vonage-identity-insights
Version: 1.0.0
Summary: Vonage Identity Insights package
Author-email: Vonage <devrel@vonage.com>
Project-URL: homepage, https://github.com/Vonage/vonage-python-sdk
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: vonage-http-client>=1.5.0
Requires-Dist: vonage-utils>=1.1.4
Requires-Dist: pydantic>=2.9.2

# Vonage Identity Insights Package

This package contains the code to use the [Vonage Identity Insights API](https://developer.vonage.com/en/identity-insights/overview) in Python. The API provides real-time access to a broad range of attributes related to the carrier, subscriber, or device associated with a phone number. To use it you will need a Vonage account. Sign up [for free at vonage.com][signup].

## Usage

It is recommended to use this as part of the main `vonage` package. The examples below assume you've created an instance of the `vonage.Vonage` class called `vonage_client`.

### Make a Standard Identity Insights Request

```python
from vonage import Vonage, Auth, HttpClientOptions
from vonage_identity_insights import (
    IdentityInsightsRequest,
    InsightsRequest,
    EmptyInsight,
    SimSwapInsight,
)

options = HttpClientOptions(api_host="api-eu.vonage.com", timeout=30)

client = Vonage(auth=auth, http_client_options=options)

request = IdentityInsightsRequest(
    phone_number="1234567890",
    purpose="FraudPreventionAndDetection",
    insights=InsightsRequest(
        format=EmptyInsight(), sim_swap=SimSwapInsight(period=240)
    ),
)

response = client.identity_insights.requests(request)

```

