b2sdk
Backblaze B2 SDK
What it is and what it does
B2SDK is a production-stable Python client for Backblaze B2 Cloud Storage. It wraps the B2 REST API to let you programmatically upload, download, list, and manage files and buckets from Python code. The library depends on requests for HTTP communication and includes utilities for logging and type annotations.
Typical use cases include building backup tools, storage backend drivers, FUSE filesystems, or any application that needs to interact with B2 Cloud Storage. The project is actively maintained, supports current Python versions (3.10 through 3.14), and follows semantic versioning so you can safely pin dependencies with version constraints like `b2sdk>=2,<3`.
Use it for:
- Build a backup application that uploads files to B2 Cloud Storage programmatically.
- Integrate B2 storage as a backend for a FUSE filesystem or virtual drive.
- Automate file management tasks like batch uploads, deletions, or lifecycle policies.
- Create a storage driver for backup software to use B2 as a destination.
- Sync local directories to B2 buckets with custom logic and error handling.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
B2SDK is a Python client library for Backblaze B2 Cloud Storage that provides programmatic access to upload, download, list, and manage files and buckets in B2.
Yes. B2SDK is production-stable, actively maintained, has no known vulnerabilities, low install friction, and a permissive MIT license. Install it if you need to programmatically interact with Backblaze B2 Cloud Storage from Python. Pin to a major version (e.g., `b2sdk>=2,<3`) to avoid breaking changes.
Install
b2sdk on PyPI
pip
pip install b2sdkuv
uv add b2sdkpoetry
poetry add b2sdkInstalling b2sdk
Before you install
Installation is straightforward with low friction—a single wheel distribution and four lightweight runtime dependencies (annotated-types, logfury, requests, typing-extensions). The project is actively maintained with recent commits and follows semantic versioning, making it safe to pin to a major version.
License in practice
Licensed under MIT (permissive), so you can use, modify, and distribute b2sdk freely in both open-source and commercial projects without restriction.
Quickstart
pip install b2sdk
from b2sdk.v2 import InMemoryAccountInfo, B2Api
info = InMemoryAccountInfo()
api = B2Api(info)
api.authorize_account('production', 'app_key_id', 'app_key')
Requires Python 3.10 or later; you must have valid Backblaze B2 credentials (app key ID and app key) to authorize.
Verify before relying
- Whether the library supports async/await patterns or is synchronous-only.
- Performance characteristics for large file uploads or bulk operations.
- Whether retry logic and rate-limiting are built in or require manual handling.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — annotated-types, logfury, requests, typing-extensions |
| Maintenance | actively maintained — 101 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 536,015/month — #6,128 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: b2sdk-2.12.0-py3-none-any.whl
Keywords: b2, backblaze, cloud, storage
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
b2Command-line interface for managing files,…
permissive · top 15,000 on PyPI
kbcstoragePython client for the Keboola Storage API that…
permissive · top 15,000 on PyPI
gsutilgsutil is a command-line tool for managing…
permissive · top 5,000 on PyPI
storage3Async Python client library for uploading,…
permissive · top 1,000 on PyPI
s3fss3fs provides a Python filesystem interface to…
permissive · top 100 on PyPI
hatchHatch is a modern Python project manager that…
permissive · top 1,000 on PyPI
aws-cdk.aws-s3Defines AWS S3 buckets and related resources as…
permissive · top 15,000 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
azure-storage-file-datalakeProvides Python client library for Azure Data…
permissive · top 1,000 on PyPI
google-cloud-storagePython client library for Google Cloud Storage…
permissive · top 1,000 on PyPI