Python SDK

Install and start using the Python SDK.

Intro

The Verizon SDK provides access to the Verizon REST APIs.

"The Connection Planner is a service that provides devices windows to connect to their backend APIs. The service validates device access permissions and processes valid devices asynchronously. For each batch, it retrieves device connectivity windows from the RAN KPI Data Application, and sends callbacks back to customers via UWS-Callback for both successful and failed device requests."

Installation

To install the SDK from PyPI, with whichever package manager your project uses:

Terminal
pip install vz-apimatic-v-4-sdk
Terminal
uv add vz-apimatic-v-4-sdk
Terminal
poetry add vz-apimatic-v-4-sdk

To install from the SDK source instead, give the tool a path containing a slash — a bare folder name is looked up on PyPI, and resolves to whatever project holds that name there:

Terminal
pip install <path-to-sdk>

Quick Start

Synchronous client

Construct VerizonClient with keyword arguments, and call close() when you are done. Every argument is optional.

Python
from verizon import VerizonClient
from verizon.core import ClientCredentials

client = VerizonClient(
    thingspace_oauth=ClientCredentials(client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"),
    vz_m2_m_token="YOUR_API_KEY",
    session_token="YOUR_API_KEY",
    environment="production",
)

client.close()

Alternatively, scope it — with VerizonClient(...) as client: closes the pool on exit.

Asynchronous client

AsyncVerizonClient mirrors VerizonClient with identical method names, and every endpoint method is a coroutine. It takes the same arguments, with some differences — for example, the transport argument is custom_async_http_client.

Python
from asyncio import run

from verizon import AsyncVerizonClient
from verizon.core import ClientCredentials


async def main() -> None:
    client = AsyncVerizonClient(
        thingspace_oauth=ClientCredentials(client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"),
        vz_m2_m_token="YOUR_API_KEY",
        session_token="YOUR_API_KEY",
        environment="production",
    )
    await client.aclose()


run(main())

Alternatively, scope it — async with AsyncVerizonClient(...) as client: closes the pool on exit.

On this page