Google's Business Communications API client library
Project description
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
- Register with Business Messages.
- 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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file google-businesscommunications-2.1.0.tar.gz
.
File metadata
- Download URL: google-businesscommunications-2.1.0.tar.gz
- Upload date:
- Size: 28.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8228a2d088454026f0bed96975646ceaefcc958e320bda448cd5ace0edb4db4 |
|
MD5 | a4b5bf75263e80aafc1e8342c5a0267c |
|
BLAKE2b-256 | c9e85b5412bc31977c71b2411293f0f292a99b98bae867f3b932d442c56206dc |
File details
Details for the file google_businesscommunications-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: google_businesscommunications-2.1.0-py3-none-any.whl
- Upload date:
- Size: 27.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0973407aecf252e028ff4ee64eaa91c9ce9ae1cfa9ddb71997ba489ffe32dc1f |
|
MD5 | 88ef01f51bc509dfdd0eaaf7885607f6 |
|
BLAKE2b-256 | 6a4a1f6b9cd4bdc3daf4d5f56e059f7bad9d68306afe0adf064e3f8cf04e8a5f |