Skip to main content

Google's Business Communications: Python Client

Business Communications is an API for creating, managing, and launching agents for Google's Verified SMS and Business Messages platforms.

Documentation

The documentation for the Business Commmunications API can be found here.

Supported Python Versions

Python 3.5, 3.6 and 3.7, and 3.8 are fully supported and tested.

Quickstart

Before you begin

  1. Register with Business Messages.
  2. Once registered, follow the instructions to enable the APIs for your project.

Installation

Install this library in a virtualenv using pip. virtualenv is a tool to create isolated Python environments. The basic problem it addresses is one of dependencies and versions, and indirectly permissions.

With virtualenv, it's possible to install this library without needing system install permissions, and without clashing with the installed system dependencies.

Mac/Linux

pip install virtualenv
python -m venv <your-env>
source <your-env>/bin/activate
<your-env>/bin/pip install

Windows

pip install virtualenv
python -m venv <your-env>
<your-env>\Scripts\activate
<your-env>\Scripts\pip.exe install

Using the client library

from oauth2client.service_account import ServiceAccountCredentials
from businesscommunications.businesscommunications_v1_client import BusinesscommunicationsV1
from businesscommunications.businesscommunications_v1_messages import (
    Brand)

SCOPES = ['https://www.googleapis.com/auth/businesscommunications']

# Initialize the API authentication credentials
credentials = ServiceAccountCredentials.from_json_keyfile_name(
    'your-service-account-key-file-location', scopes=SCOPES)

# Create the client
client = BusinesscommunicationsV1(credentials=credentials)

# Create the service for brands
brands_service = BusinesscommunicationsV1.BrandsService(client)

# Create a new brand with the name "Test Brand" 
brand = brands_service.Create(Brand(displayName='Test Brand'))

# Print created brand object
print(brand)

Samples

See code examples to see example usage for most API features. The samples' README.md has instructions for running the samples.

Sample Source Code
Brand CRUD Operations source code
Agent CRUD Operations source code
Location CRUD Operations source code

Contributing

Contributions welcome! See the Contributing Guide.

License

Apache Version 2.0

See LICENSE

Metadata

Release files for google-businesscommunications 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for google-businesscommunications 2.1.0
File Size Uploaded Provenance Actions
google-businesscommunications-2.1.0.tar.gz 28.1 kB Without provenance Details for google-businesscommunications-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for google-businesscommunications 2.1.0
File Interpreter ABI Platform Actions
google_businesscommunications-2.1.0-py3-none-any.whl Python 3 none any Details for google_businesscommunications-2.1.0-py3-none-any.whl

Total release size: 55.9 kB

Release files / google-businesscommunications-2.1.0.tar.gz

Download URL google-businesscommunications-2.1.0.tar.gz
Size 28.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b8228a2d088454026f0bed96975646ceaefcc958e320bda448cd5ace0edb4db4
BLAKE2b-256 checksum
How to use checksums
c9e85b5412bc31977c71b2411293f0f292a99b98bae867f3b932d442c56206dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / google_businesscommunications-2.1.0-py3-none-any.whl

Download URL google_businesscommunications-2.1.0-py3-none-any.whl
Size 27.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0973407aecf252e028ff4ee64eaa91c9ce9ae1cfa9ddb71997ba489ffe32dc1f
BLAKE2b-256 checksum
How to use checksums
6a4a1f6b9cd4bdc3daf4d5f56e059f7bad9d68306afe0adf064e3f8cf04e8a5f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Security for google-businesscommunications 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page