Bolt Python SDK
Project description
Bolt SDK
This SDK provides an authentication solution for programatically interacting with Bolt. It wraps the boto3 interface so project wide integration is as easy as refactoring import boto3 to import bolt as boto3.
The package affects the signing and routing protocol of the boto3 S3 client, therefore any non S3 clients created through this SDK will be un-affected by the wrapper.
Prerequisites
The minimum supported version of Python is version 2.
Installation
python -m pip install boto3==1.17.112
python -m pip install bolt-sdk==1.0.0
Configuration
For the client to work it must have knowledge of Bolt's service discovery url (BOLT_URL)
These are parameterized by the region of Bolt's deployment. A preferred availability zone ID can also be provided for AZ-aware routing.
There are two ways to expose Bolt's URL to the SDK:
- Declare the ENV variable:
BOLT_CUSTOM_DOMAIN, which constructs Bolt URL and hostname based on default naming
export BOLT_CUSTOM_DOMAIN="example.com"
- Directly declare the ENV variables:
BOLT_URLBOLT_URLmust be formatted as follows:
https://<subdomain>{region}<domain>
An example is:
https://bolt.{region}.google.com
Where the {region} within the URL is a string literal placeholder that will be replaced by the python sdk
export BOLT_URL="<url>"
There are two ways to expose Bolt's region/preferred availability zone to the SDK:
- If running on an EC2 instance the SDK will by default use that instance's region and zone ID
- With the ENV variables:
AWS_REGIONandAWS_ZONE_ID.
export AWS_REGION='<region>'
export AWS_ZONE_ID='<az-id>'
Debugging
Import the default logger and set its level to DEBUG
logging.getLogger().setLevel(logging.DEBUG)
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bolt-sdk-py2-1.0.0.tar.gz.
File metadata
- Download URL: bolt-sdk-py2-1.0.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a2025b88f0dd25b06afe0b87ad0f92edfa95518aa7c6a0acaef9f3812f31145
|
|
| MD5 |
6eaae2064266ee59e1c0bc1b727eff41
|
|
| BLAKE2b-256 |
2642f2261e6a993b63c6c792212879f05a7e250e6f6218971bb5c70730134938
|
File details
Details for the file bolt_sdk_py2-1.0.0-py2-none-any.whl.
File metadata
- Download URL: bolt_sdk_py2-1.0.0-py2-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddd56905b05327ce4cd1e045c8f30d0865098bd0bf19eebab62e6f9ad8e75d7c
|
|
| MD5 |
3460a5dbd85ddab9e3048ada2412c6d5
|
|
| BLAKE2b-256 |
3ee278dfdbfbc177bc5d3f5910834e3413983f653f987bda6c0b8b4cbb9ea1df
|