The S3 Compatible API allows developers to interact with B2 Cloud Storage when using the AWS SDK for Python. The endpoint_url simply needs to be pointed to the S3 Endpoint of the Backblaze B2 account you are connecting to, along with supplying an Application Key and Key ID for the account.
Here is an example of doing so and creating a bucket:
s3 = boto3.resource('s3',
endpoint_url = 'https://s3.us-west-002.backblazeb2.com',
aws_access_key_id = '<b2_keyId>',
aws_secret_access_key = '<b2_appKey>')
Backblaze also maintains a Python SDK for the B2 Native API. You can find this project here: https://github.com/Backblaze/b2-sdk-python
The S3 Compatible API for Backblaze B2 Cloud Storage allows 1000’s of integrations to work with B2 natively. If you’re new to the S3 Compatible API, please see our Getting Started Guide. If you have any trouble using the AWS SDK for Python with B2, please let us know by emailing us at firstname.lastname@example.org.
Articles in this section
- Object Lock FAQs
- Delivering Backblaze B2 Content Through Cloudflare CDN
- Bunny Integration Quick Start Guide
- Guide for using Fastly Compute @ Edge with Backblaze B2
- SSE Command Line and API Examples
- Does the B2 S3 Compatible API support Pre-Signed URLs?
- How to use Fastly CDN with B2
- Using the AWS SDK for Java (v2) with B2
- How to use the AWS SDK for Python with B2.
- Using the AWS SDK for PHP with Backblaze B2 Cloud Storage