verizon-ap-is-sdk


Nameverizon-ap-is-sdk JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryUse the Verizon API for connectivity management, device diagnostics, device location, edge discovery service, edge performance, software management and much more.
upload_time2023-07-12 14:30:18
maintainer
docs_urlNone
author
requires_python>=3.7
license
keywords verizon 5gedge thingspace
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Getting Started with Verizon

## Introduction

The Verizon Edge Discovery Service API can direct your application clients to connect to the optimal service endpoints for your Multi-access Edge Computing (MEC) applications for every session. The Edge Discovery Service takes into account the current location of a device, its IP anchor location, current network traffic and other factors to determine which 5G Edge platform a device should connect to.

Verizon Terms of Service: [https://www.verizon.com/business/5g-edge-portal/legal.html](https://www.verizon.com/business/5g-edge-portal/legal.html)

## Install the Package

The package is compatible with Python versions `3 >=3.7, <= 3.11`.
Install the package from PyPi using the following pip command:

```python
pip install verizon-ap-is-sdk==1.0.0
```

You can also view the package at:
https://pypi.python.org/pypi/verizon-ap-is-sdk/1.0.0

## Initialize the API Client

**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/client.md)

The following parameters are configurable for the API Client:

| Parameter | Type | Description |
|  --- | --- | --- |
| `vz_m2m_token` | `string` | M2M Session Token |
| `environment` | Environment | The API environment. <br> **Default: `Environment.PRODUCTION`** |
| `http_client_instance` | `HttpClient` | The Http Client passed from the sdk user for making requests |
| `override_http_client_configuration` | `bool` | The value which determines to override properties of the passed Http Client from the sdk user |
| `http_call_back` | `HttpCallBack` | The callback value that is invoked before and after an HTTP call is made to an endpoint |
| `timeout` | `float` | The value to use for connection timeout. <br> **Default: 60** |
| `max_retries` | `int` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |
| `backoff_factor` | `float` | A backoff factor to apply between attempts after the second try. <br> **Default: 2** |
| `retry_statuses` | `Array of int` | The http statuses on which retry is to be done. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
| `retry_methods` | `Array of string` | The http methods on which retry is to be done. <br> **Default: ['GET', 'PUT']** |
| `oauth_client_id` | `string` | OAuth 2 Client ID |
| `oauth_client_secret` | `string` | OAuth 2 Client Secret |
| `oauth_token` | `OauthToken` | Object for storing information about the OAuth token |
| `oauth_scopes` | `OauthScopeEnum` |  |

The API client can be initialized as follows:

```python
from verizon.verizon_client import VerizonClient
from verizon.configuration import Environment

client = VerizonClient(
    vz_m2m_token='VZ-M2M-Token',
    oauth_client_id='OAuthClientId',
    oauth_client_secret='OAuthClientSecret',
    oauth_scopes=[OauthScopeEnum.DISCOVERYREAD, OauthScopeEnum.SERVICEPROFILEREAD]
)
```

API calls return an `ApiResponse` object that includes the following fields:

| Field | Description |
|  --- | --- |
| `status_code` | Status code of the HTTP response |
| `reason_phrase` | Reason phrase of the HTTP response |
| `headers` | Headers of the HTTP response as a dictionary |
| `text` | The body of the HTTP response as a string |
| `request` | HTTP request info |
| `errors` | Errors, if they exist |
| `body` | The deserialized body of the HTTP response |

## Authorization

This API uses `OAuth 2 Client Credentials Grant`.

## Client Credentials Grant

Your application must obtain user authorization before it can execute an endpoint call in case this SDK chooses to use *OAuth 2.0 Client Credentials Grant*. This authorization includes the following steps

The `fetch_token()` method will exchange the OAuth client credentials for an *access token*. The access token is an object containing information for authorizing client requests and refreshing the token itself.

You must have initialized the client with [scopes]($h/__authorize/Scopes) for which you need permission to access.

```python
try:
    client.auth_managers['global'].fetch_token()
except OauthProviderException as ex:
    # handle exception
except APIException as ex:
    # handle exception
```

The client can now make authorized endpoint calls.

### Scopes

Scopes enable your application to only request access to the resources it needs while enabling users to control the amount of access they grant to your application. Available scopes are defined in the `OauthScopeEnum` enumeration.

| Scope Name | Description |
|  --- | --- |
| `DISCOVERYREAD` | Grant read-only access to discovery data |
| `SERVICEPROFILEREAD` | Grant read-only access to service profile data |
| `SERVICEPROFILEWRITE` | Grant write access to service profile data |
| `SERVICEREGISTRYREAD` | Grant read-only access to Service registry data |
| `SERVICEREGISTRYWRITE` | Grant write access to Service registry data |
| `TS_MEC_FULLACCESS` | Full access for /serviceprofiles and /serviceendpoints. |
| `TS_MEC_LIMITACCESS` | Limited access. Will not allow use of /serviceprofiles and /serviceendpoints but will allow discovery. |
| `TS_APPLICATION_RO` |  |
| `EDGEDISCOVERYREAD` |  |
| `EDGESERVICEPROFILEREAD` |  |
| `EDGESERVICEPROFILEWRITE` |  |
| `EDGESERVICEREGISTRYREAD` |  |
| `EDGESERVICEREGISTRYWRITE` |  |
| `READ` | read access |
| `WRITE` | read/write access |

### Storing an access token for reuse

It is recommended that you store the access token for reuse.

```python
# store token
save_token_to_database(client.config.oauth_token)
```

### Creating a client from a stored token

To authorize a client from a stored access token, just set the access token in Configuration along with the other configuration parameters before creating the client:

```python
client = VerizonClient()
client.config.oauth_token = load_token_from_database()
```

### Complete example

```python
from verizon.verizon_client import VerizonClient
from verizon.models.oauth_scope_enum import OauthScopeEnum
from verizon.exceptions.oauth_provider_exception import OauthProviderException

from verizon.exceptions.api_exception import APIException

# function for storing token to database
def save_token_to_database(oauth_token):
    # code to save the token to database

# function for loading token from database
def load_token_from_database():
    # load token from database and return it (return None if no token exists)
    pass

from verizon.verizon_client import VerizonClient
from verizon.configuration import Environment

client = VerizonClient(
    vz_m2m_token='VZ-M2M-Token',
    oauth_client_id='OAuthClientId',
    oauth_client_secret='OAuthClientSecret',
    oauth_scopes=[OauthScopeEnum.DISCOVERYREAD, OauthScopeEnum.SERVICEPROFILEREAD]
)
# obtain access token, needed for client to be authorized
previous_token = load_token_from_database()
if previous_token:
    # restore previous access token
    config = client.config.clone_with(oauth_token=previous_token)
    client = VerizonClient(config)
else:
    # obtain new access token
    try:
        token = client.auth_managers['global'].fetch_token()
        save_token_to_database(token)
        config = client.config.clone_with(oauth_token=token)
        client = VerizonClient(config)
    except OauthProviderException as ex:
        # handle exception
    except APIException as ex:
        # handle exception

# the client is now authorized and you can use controllers to make endpoint calls
```

## List of APIs

* [5G Edge Platforms](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/5g-edge-platforms.md)
* [Service Endpoints](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-endpoints.md)
* [Service Profiles](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-profiles.md)
* [Device Management](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/device-management.md)
* [Device Groups](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/device-groups.md)
* [Session Management](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/session-management.md)
* [Connectivity Callbacks](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/connectivity-callbacks.md)
* [Account Requests](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/account-requests.md)
* [Service Plans](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-plans.md)
* [Device Profile Management](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/device-profile-management.md)
* [Device Monitoring](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/device-monitoring.md)
* [UICC Device Profile Management](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/uicc-device-profile-management.md)
* [Devices Locations](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/devices-locations.md)
* [Devices Location Subscriptions](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/devices-location-subscriptions.md)
* [Device Location Callbacks](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/device-location-callbacks.md)
* [Usage Trigger Management](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/usage-trigger-management.md)
* [Software Management Subscriptions V1](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-subscriptions-v1.md)
* [Software Management Licenses V1](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-licenses-v1.md)
* [Firmware V1](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/firmware-v1.md)
* [Software Management Callbacks V1](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-callbacks-v1.md)
* [Software Management Reports V1](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-reports-v1.md)
* [Software Management Subscriptions V2](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-subscriptions-v2.md)
* [Software Management Licenses V2](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-licenses-v2.md)
* [Campaigns V2](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/campaigns-v2.md)
* [Software Management Callbacks V2](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-callbacks-v2.md)
* [Software Management Reports V2](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-reports-v2.md)
* [Client Logging](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/client-logging.md)
* [Server Logging](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/server-logging.md)
* [Configuration Files](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/configuration-files.md)
* [Software Management Subscriptions V3](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-subscriptions-v3.md)
* [Software Management Licenses V3](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-licenses-v3.md)
* [Campaigns V3](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/campaigns-v3.md)
* [Software Management Reports V3](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-reports-v3.md)
* [Firmware V3](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/firmware-v3.md)
* [Account Devices](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/account-devices.md)
* [Software Management Callbacks V3](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-callbacks-v3.md)
* [SIM Securefor Io T Licenses](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/sim-securefor-io-t-licenses.md)
* [Account Subscriptions](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/account-subscriptions.md)
* [Performance Metrics](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/performance-metrics.md)
* [Diagnostics Subscriptions](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/diagnostics-subscriptions.md)
* [Diagnostics Observations](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/diagnostics-observations.md)
* [Diagnostics History](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/diagnostics-history.md)
* [Diagnostics Settings](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/diagnostics-settings.md)
* [Diagnostics Callbacks](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/diagnostics-callbacks.md)
* [Diagnostics Factory Reset](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/diagnostics-factory-reset.md)
* [Cloud Connector Subscriptions](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/cloud-connector-subscriptions.md)
* [Cloud Connector Devices](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/cloud-connector-devices.md)
* [Device Service Management](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/device-service-management.md)
* [Device Reports](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/device-reports.md)
* [Hyper Precise Location Callbacks](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/hyper-precise-location-callbacks.md)
* [Anomaly Settings](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/anomaly-settings.md)
* [Anomaly Triggers](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/anomaly-triggers.md)
* [MEC Sites](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/mec-sites.md)
* [Service Launch Profiles](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-launch-profiles.md)
* [Service Launch Requests](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-launch-requests.md)
* [Service Instances](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-instances.md)
* [Service Instance Operations](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-instance-operations.md)
* [Service Onboarding](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-onboarding.md)
* [Service Metadata](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-metadata.md)
* [CSP Profiles](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/csp-profiles.md)
* [Service Claims](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-claims.md)
* [OAuth Authorization](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/oauth-authorization.md)
* [Accounts](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/accounts.md)
* [SMS](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/sms.md)
* [Exclusions](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/exclusions.md)
* [Billing](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/billing.md)
* [Targets](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/targets.md)
* [Repositories](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/repositories.md)

## Classes Documentation

* [Utility Classes](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/utility-classes.md)
* [HttpResponse](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/http-response.md)
* [HttpRequest](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/http-request.md)


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "verizon-ap-is-sdk",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "verizon,5gedge,thingspace",
    "author": "",
    "author_email": "developer-sdksio <developer+sdksio@apimatic.io>",
    "download_url": "https://files.pythonhosted.org/packages/50/7f/5f68717916cb07bcc3512a1095861e1b4f67cd0b3188edf341259827bd7e/verizon-ap-is-sdk-1.0.0.tar.gz",
    "platform": null,
    "description": "\n# Getting Started with Verizon\n\n## Introduction\n\nThe Verizon Edge Discovery Service API can direct your application clients to connect to the optimal service endpoints for your Multi-access Edge Computing (MEC) applications for every session. The Edge Discovery Service takes into account the current location of a device, its IP anchor location, current network traffic and other factors to determine which 5G Edge platform a device should connect to.\n\nVerizon Terms of Service: [https://www.verizon.com/business/5g-edge-portal/legal.html](https://www.verizon.com/business/5g-edge-portal/legal.html)\n\n## Install the Package\n\nThe package is compatible with Python versions `3 >=3.7, <= 3.11`.\nInstall the package from PyPi using the following pip command:\n\n```python\npip install verizon-ap-is-sdk==1.0.0\n```\n\nYou can also view the package at:\nhttps://pypi.python.org/pypi/verizon-ap-is-sdk/1.0.0\n\n## Initialize the API Client\n\n**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/client.md)\n\nThe following parameters are configurable for the API Client:\n\n| Parameter | Type | Description |\n|  --- | --- | --- |\n| `vz_m2m_token` | `string` | M2M Session Token |\n| `environment` | Environment | The API environment. <br> **Default: `Environment.PRODUCTION`** |\n| `http_client_instance` | `HttpClient` | The Http Client passed from the sdk user for making requests |\n| `override_http_client_configuration` | `bool` | The value which determines to override properties of the passed Http Client from the sdk user |\n| `http_call_back` | `HttpCallBack` | The callback value that is invoked before and after an HTTP call is made to an endpoint |\n| `timeout` | `float` | The value to use for connection timeout. <br> **Default: 60** |\n| `max_retries` | `int` | The number of times to retry an endpoint call if it fails. <br> **Default: 0** |\n| `backoff_factor` | `float` | A backoff factor to apply between attempts after the second try. <br> **Default: 2** |\n| `retry_statuses` | `Array of int` | The http statuses on which retry is to be done. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |\n| `retry_methods` | `Array of string` | The http methods on which retry is to be done. <br> **Default: ['GET', 'PUT']** |\n| `oauth_client_id` | `string` | OAuth 2 Client ID |\n| `oauth_client_secret` | `string` | OAuth 2 Client Secret |\n| `oauth_token` | `OauthToken` | Object for storing information about the OAuth token |\n| `oauth_scopes` | `OauthScopeEnum` |  |\n\nThe API client can be initialized as follows:\n\n```python\nfrom verizon.verizon_client import VerizonClient\nfrom verizon.configuration import Environment\n\nclient = VerizonClient(\n    vz_m2m_token='VZ-M2M-Token',\n    oauth_client_id='OAuthClientId',\n    oauth_client_secret='OAuthClientSecret',\n    oauth_scopes=[OauthScopeEnum.DISCOVERYREAD, OauthScopeEnum.SERVICEPROFILEREAD]\n)\n```\n\nAPI calls return an `ApiResponse` object that includes the following fields:\n\n| Field | Description |\n|  --- | --- |\n| `status_code` | Status code of the HTTP response |\n| `reason_phrase` | Reason phrase of the HTTP response |\n| `headers` | Headers of the HTTP response as a dictionary |\n| `text` | The body of the HTTP response as a string |\n| `request` | HTTP request info |\n| `errors` | Errors, if they exist |\n| `body` | The deserialized body of the HTTP response |\n\n## Authorization\n\nThis API uses `OAuth 2 Client Credentials Grant`.\n\n## Client Credentials Grant\n\nYour application must obtain user authorization before it can execute an endpoint call in case this SDK chooses to use *OAuth 2.0 Client Credentials Grant*. This authorization includes the following steps\n\nThe `fetch_token()` method will exchange the OAuth client credentials for an *access token*. The access token is an object containing information for authorizing client requests and refreshing the token itself.\n\nYou must have initialized the client with [scopes]($h/__authorize/Scopes) for which you need permission to access.\n\n```python\ntry:\n    client.auth_managers['global'].fetch_token()\nexcept OauthProviderException as ex:\n    # handle exception\nexcept APIException as ex:\n    # handle exception\n```\n\nThe client can now make authorized endpoint calls.\n\n### Scopes\n\nScopes enable your application to only request access to the resources it needs while enabling users to control the amount of access they grant to your application. Available scopes are defined in the `OauthScopeEnum` enumeration.\n\n| Scope Name | Description |\n|  --- | --- |\n| `DISCOVERYREAD` | Grant read-only access to discovery data |\n| `SERVICEPROFILEREAD` | Grant read-only access to service profile data |\n| `SERVICEPROFILEWRITE` | Grant write access to service profile data |\n| `SERVICEREGISTRYREAD` | Grant read-only access to Service registry data |\n| `SERVICEREGISTRYWRITE` | Grant write access to Service registry data |\n| `TS_MEC_FULLACCESS` | Full access for /serviceprofiles and /serviceendpoints. |\n| `TS_MEC_LIMITACCESS` | Limited access. Will not allow use of /serviceprofiles and /serviceendpoints but will allow discovery. |\n| `TS_APPLICATION_RO` |  |\n| `EDGEDISCOVERYREAD` |  |\n| `EDGESERVICEPROFILEREAD` |  |\n| `EDGESERVICEPROFILEWRITE` |  |\n| `EDGESERVICEREGISTRYREAD` |  |\n| `EDGESERVICEREGISTRYWRITE` |  |\n| `READ` | read access |\n| `WRITE` | read/write access |\n\n### Storing an access token for reuse\n\nIt is recommended that you store the access token for reuse.\n\n```python\n# store token\nsave_token_to_database(client.config.oauth_token)\n```\n\n### Creating a client from a stored token\n\nTo authorize a client from a stored access token, just set the access token in Configuration along with the other configuration parameters before creating the client:\n\n```python\nclient = VerizonClient()\nclient.config.oauth_token = load_token_from_database()\n```\n\n### Complete example\n\n```python\nfrom verizon.verizon_client import VerizonClient\nfrom verizon.models.oauth_scope_enum import OauthScopeEnum\nfrom verizon.exceptions.oauth_provider_exception import OauthProviderException\n\nfrom verizon.exceptions.api_exception import APIException\n\n# function for storing token to database\ndef save_token_to_database(oauth_token):\n    # code to save the token to database\n\n# function for loading token from database\ndef load_token_from_database():\n    # load token from database and return it (return None if no token exists)\n    pass\n\nfrom verizon.verizon_client import VerizonClient\nfrom verizon.configuration import Environment\n\nclient = VerizonClient(\n    vz_m2m_token='VZ-M2M-Token',\n    oauth_client_id='OAuthClientId',\n    oauth_client_secret='OAuthClientSecret',\n    oauth_scopes=[OauthScopeEnum.DISCOVERYREAD, OauthScopeEnum.SERVICEPROFILEREAD]\n)\n# obtain access token, needed for client to be authorized\nprevious_token = load_token_from_database()\nif previous_token:\n    # restore previous access token\n    config = client.config.clone_with(oauth_token=previous_token)\n    client = VerizonClient(config)\nelse:\n    # obtain new access token\n    try:\n        token = client.auth_managers['global'].fetch_token()\n        save_token_to_database(token)\n        config = client.config.clone_with(oauth_token=token)\n        client = VerizonClient(config)\n    except OauthProviderException as ex:\n        # handle exception\n    except APIException as ex:\n        # handle exception\n\n# the client is now authorized and you can use controllers to make endpoint calls\n```\n\n## List of APIs\n\n* [5G Edge Platforms](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/5g-edge-platforms.md)\n* [Service Endpoints](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-endpoints.md)\n* [Service Profiles](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-profiles.md)\n* [Device Management](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/device-management.md)\n* [Device Groups](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/device-groups.md)\n* [Session Management](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/session-management.md)\n* [Connectivity Callbacks](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/connectivity-callbacks.md)\n* [Account Requests](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/account-requests.md)\n* [Service Plans](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-plans.md)\n* [Device Profile Management](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/device-profile-management.md)\n* [Device Monitoring](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/device-monitoring.md)\n* [UICC Device Profile Management](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/uicc-device-profile-management.md)\n* [Devices Locations](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/devices-locations.md)\n* [Devices Location Subscriptions](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/devices-location-subscriptions.md)\n* [Device Location Callbacks](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/device-location-callbacks.md)\n* [Usage Trigger Management](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/usage-trigger-management.md)\n* [Software Management Subscriptions V1](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-subscriptions-v1.md)\n* [Software Management Licenses V1](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-licenses-v1.md)\n* [Firmware V1](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/firmware-v1.md)\n* [Software Management Callbacks V1](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-callbacks-v1.md)\n* [Software Management Reports V1](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-reports-v1.md)\n* [Software Management Subscriptions V2](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-subscriptions-v2.md)\n* [Software Management Licenses V2](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-licenses-v2.md)\n* [Campaigns V2](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/campaigns-v2.md)\n* [Software Management Callbacks V2](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-callbacks-v2.md)\n* [Software Management Reports V2](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-reports-v2.md)\n* [Client Logging](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/client-logging.md)\n* [Server Logging](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/server-logging.md)\n* [Configuration Files](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/configuration-files.md)\n* [Software Management Subscriptions V3](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-subscriptions-v3.md)\n* [Software Management Licenses V3](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-licenses-v3.md)\n* [Campaigns V3](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/campaigns-v3.md)\n* [Software Management Reports V3](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-reports-v3.md)\n* [Firmware V3](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/firmware-v3.md)\n* [Account Devices](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/account-devices.md)\n* [Software Management Callbacks V3](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/software-management-callbacks-v3.md)\n* [SIM Securefor Io T Licenses](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/sim-securefor-io-t-licenses.md)\n* [Account Subscriptions](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/account-subscriptions.md)\n* [Performance Metrics](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/performance-metrics.md)\n* [Diagnostics Subscriptions](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/diagnostics-subscriptions.md)\n* [Diagnostics Observations](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/diagnostics-observations.md)\n* [Diagnostics History](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/diagnostics-history.md)\n* [Diagnostics Settings](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/diagnostics-settings.md)\n* [Diagnostics Callbacks](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/diagnostics-callbacks.md)\n* [Diagnostics Factory Reset](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/diagnostics-factory-reset.md)\n* [Cloud Connector Subscriptions](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/cloud-connector-subscriptions.md)\n* [Cloud Connector Devices](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/cloud-connector-devices.md)\n* [Device Service Management](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/device-service-management.md)\n* [Device Reports](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/device-reports.md)\n* [Hyper Precise Location Callbacks](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/hyper-precise-location-callbacks.md)\n* [Anomaly Settings](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/anomaly-settings.md)\n* [Anomaly Triggers](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/anomaly-triggers.md)\n* [MEC Sites](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/mec-sites.md)\n* [Service Launch Profiles](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-launch-profiles.md)\n* [Service Launch Requests](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-launch-requests.md)\n* [Service Instances](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-instances.md)\n* [Service Instance Operations](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-instance-operations.md)\n* [Service Onboarding](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-onboarding.md)\n* [Service Metadata](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-metadata.md)\n* [CSP Profiles](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/csp-profiles.md)\n* [Service Claims](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/service-claims.md)\n* [OAuth Authorization](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/oauth-authorization.md)\n* [Accounts](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/accounts.md)\n* [SMS](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/sms.md)\n* [Exclusions](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/exclusions.md)\n* [Billing](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/billing.md)\n* [Targets](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/targets.md)\n* [Repositories](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/controllers/repositories.md)\n\n## Classes Documentation\n\n* [Utility Classes](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/utility-classes.md)\n* [HttpResponse](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/http-response.md)\n* [HttpRequest](https://www.github.com/sdks-io/verizon-apis-python-sdk/tree/1.0.0/doc/http-request.md)\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Use the Verizon API for connectivity management, device diagnostics, device location, edge discovery service, edge performance, software management and much more.",
    "version": "1.0.0",
    "project_urls": {
        "Documentation": "https://www.verizon.com/business/5g-edge-portal/api-documentation.html"
    },
    "split_keywords": [
        "verizon",
        "5gedge",
        "thingspace"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "201b34a59d35860f71a1752d7cc0712f08afa681feb1f6d256d92550b1d9404e",
                "md5": "3d18c4444e9388b8f159d4a56db6b812",
                "sha256": "ca96b190c78bb9b2224760f9cc4745637a7cb790b9920ccf19301ca83fd5abd7"
            },
            "downloads": -1,
            "filename": "verizon_ap_is_sdk-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3d18c4444e9388b8f159d4a56db6b812",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 789606,
            "upload_time": "2023-07-12T14:30:16",
            "upload_time_iso_8601": "2023-07-12T14:30:16.267161Z",
            "url": "https://files.pythonhosted.org/packages/20/1b/34a59d35860f71a1752d7cc0712f08afa681feb1f6d256d92550b1d9404e/verizon_ap_is_sdk-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "507f5f68717916cb07bcc3512a1095861e1b4f67cd0b3188edf341259827bd7e",
                "md5": "e62cc6f16ab621853ce024a0710cf6d5",
                "sha256": "99c8444ad4fd121b3f0c9fbc73ace60cdb6b3aa3cb9bce59dde87132d64d24eb"
            },
            "downloads": -1,
            "filename": "verizon-ap-is-sdk-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e62cc6f16ab621853ce024a0710cf6d5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 269772,
            "upload_time": "2023-07-12T14:30:18",
            "upload_time_iso_8601": "2023-07-12T14:30:18.385506Z",
            "url": "https://files.pythonhosted.org/packages/50/7f/5f68717916cb07bcc3512a1095861e1b4f67cd0b3188edf341259827bd7e/verizon-ap-is-sdk-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-12 14:30:18",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "verizon-ap-is-sdk"
}
        
Elapsed time: 0.18376s