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:
import boto3
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>')
s3.create_bucket(Bucket='<BUCKET-NAME>')
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 b2feedback@backblaze.com.
Articles in this section
- Relinking MSP360 Backups After a Cloud to B2 Migration
- How to use Synology Hyper Backup with Backblaze B2 Cloud Storage and B2 Fireball Rapid Ingest
- Veeam Cloud Repository Recovery from Backblaze B2
- Configuring Filezilla Pro to use Backblaze B2 Cloud Storage
- Configuring QNAP HybridMount to use Backblaze B2 Cloud Storage
- How to use SimpleBackups with Backblaze B2 Cloud Storage
- How to transfer your photos and videos from Facebook to Backblaze B2
- Copying Active Backup data to Backblaze B2 with Hyper Backup
- Quickstart Guide using S5cmd with B2 Cloud Storage
- Using Arcserve UDP with B2 Cloud Storage