V.2

Official Python SDK for BSG API (Version 2). Recommended SDK for all new Python integrations with BSG messaging and verification services.

Status

  • Version: V2

  • Status: Recommended

  • Package: bsg-sdk

  • Package page: https://pypi.org/project/bsg-sdk/

  • Distribution: PyPI

Overview

Python SDK V2 provides a structured client interface for working with BSG API services.

It is designed for modern integrations and supports current authentication and API patterns.

Use this SDK for all new Python-based projects.

Installation

Install from PyPI:

Install
pip install bsg-sdk

Verify installation:

Requirements

circle-info
  • Python 3.8+

  • pip

  • Internet access to BSG API endpoints

  • Active BSG API credentials

Authentication

SDK V2 uses API credentials issued for your account.

Credentials are provided during client initialization.

Example initialization pattern:

For production environments, store credentials in environment variables or secret storage.

Quick Start

Minimal client initialization example:

This example demonstrates basic client usage. Available service methods depend on enabled API products.

Typical SDK workflow

1

Initialize client

Initialize client with credentials.

2

Call service method

Call a service method or API wrapper.

3

Handle response

Process the response returned by the SDK.

4

Handle exceptions

Handle exceptions if the request fails.

Basic Usage Pattern

Example pattern:

Refer to package examples for service-specific method wrappers.

Configuration

Client configuration may support optional parameters such as:

  • base_url override

  • request timeout

  • retry policy

  • proxy configuration

Example pattern:

Available configuration options depend on SDK version.

Error Handling

SDK methods raise exceptions when:

  • network request fails

  • authentication fails

  • API returns an error response

  • invalid parameters are provided

Use standard Python exception handling:

Supported Services

Supported API services depend on your account permissions and enabled products, for example:

  • Messaging APIs

  • Number verification

  • Lookup services

  • Account queries

Refer to API Reference for available endpoints.

Versioning Notes

Python SDK V2 replaces legacy Python SDK integrations.

Legacy SDK remains available only for backward compatibility.

  • PyPI package: https://pypi.org/project/bsg-sdk/

  • Package source: see PyPI project links

  • API Reference: {{add_api_reference_link}}

  • Postman collection: {{add_postman_link}}

  • Support: contact your account manager

Was this helpful?