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 3.
Installation
python3 -m pip install bolt-sdk
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)
Tests
Basic integration tests are provided for the modified Session/Client interfaces. They must be run in an environment with a properly configured Bolt deployment accessible.
python3 tests/tests.py
Release files for bolt-sdk 2.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bolt-sdk-2.1.7.tar.gz | 7.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bolt_sdk-2.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.1 kB
Release files / bolt-sdk-2.1.7.tar.gz
| Download URL | bolt-sdk-2.1.7.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8f49b6e93805b14a01adb877f9709078e79e8120196c2ecabb7019108f415c36
|
|
BLAKE2b-256 checksum How to use checksums |
ec79f94a376b6ad3171469f34dd9876505a24f6b582ecb147002358130eea631
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/41.2.0 requests-toolbelt/0.10.1 tqdm/4.64.1 CPython/2.7.18
|
Release files / bolt_sdk-2.1.7-py3-none-any.whl
| Download URL | bolt_sdk-2.1.7-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f444befeca5453e976b8eb557479be7c50c9f6e263374dc38e39dae1450bb982
|
|
BLAKE2b-256 checksum How to use checksums |
2289b34e7d722e70601d9770d0c67bb00d7b996860fea7f20e1a7691939ae76e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/41.2.0 requests-toolbelt/0.10.1 tqdm/4.64.1 CPython/2.7.18
|