B2 Blaze



B2 blazersLatest version

Released:

  1. Download this app from Microsoft Store for Windows 10, Windows 10 Mobile, Windows 10 Team (Surface Hub), HoloLens, Xbox One. See screenshots, read the latest customer reviews, and compare ratings for BackBlaze B2 Explorer.
  2. Backblaze B2 Cloud Storage offers several options for moving data including: Native and S3 compatible APIs, Web UI, and CLI. There are also hundreds of third party integrations. Backblaze B2 Cloud Storage is ¼ of the price of Amazon S3. With Backblaze B2, you pay only for what you use.
  3. Veeam Cloud Repository Recovery from Backblaze B2 Eric AdamsFebruary 24, 2021 19:52 Backblaze is a proud partner of Veeam and is fully compatible with Veeam Cloud Tier. Additionally, Backblaze is certified as Veeam Ready - Object and Veeam Ready - Object with Immutability.

On the other hand, TERA support has knowledge base access, email support, B2 cloud storage service, and 24-hour hotline throughout the week. The target response time for Backblaze is 4 business hours. PETA support is faster. It offers not only knowledge base access but also email support. Innovative Companies Build on B2 Cloud Storage Organizations around the world choose Backblaze to solve for their use cases while improving their cloud OpEx vs. Amazon S3 and others.

Forked from George Sibble's B2Blaze (0.1.10). All credits to author. Original package: https://github.com/sibblegp/b2blaze

Project description

Welcome to the b2blaze library for Python.

Backblaze B2 provides the cheapest cloud object storage and transfer available on the internet. Comparatively, AWS S3 is 320% more expensive to store and 400% more expensive to transfer to the internet.

B2 Backup

This library will allow you to easily interact with B2 buckets and files as first class objects in Python 2 and 3. It is licensed under the MIT license so feel free to use it anywhere! If you enjoy it, please feel free to contribute or request features.

Installation

To install b2blaze, run the following command in the proper environment:

Setup

You will need a key_id and an application_key to run b2blaze. You can obtain these in the B2 portal. Then, either pass them into B2() or set the environment variables B2_KEY_ID and B2_APPLICATION_KEY.

Example Usage

b2blaze is built around OOP principles and as such all buckets and files are objects which you can interact with. Let's see an example where we list all of our files in a bucket:

Files will be a list of B2File objects with all of their properties which can then be downloaded by running:

This is a BytesIO object that you can manipulate in any way include saving locally or serving on a website.

The B2 Object

The B2 object is how you access b2blaze's functionality. You can optionally pass in 'key_id' and 'application_key' as named arguments but you should probably set them as environment variable as described above.

Buckets

Buckets are essentially the highest level folders in B2, similar to how buckets are used in AWS S3.

Bucket Properties

List All Buckets

Create a Bucket

Buckets can either be public or private. This does not change the functionality of the library other than that you will need to manually authorize when using file URLs (see below).

Retrieve a bucket

Delete a bucket

This will delete both the bucket and all files within it. There is no confirmation. Use carefully.

Files

Files are the same files you store locally. They can be stored inside folders placed in buckets but this means they simply have a name like 'folder/test.txt'. There is no distinction between folders and files.

File Properties

Blaze

List All Files in a Bucket

NOTE: There may be tens of thousands of files (or more) in a bucket. This operation will get information and create objects for all of them. It may take quite some time and be computationally expensive to run.

Upload a File

NOTE: You don't have to call .read() and instead can send the file directly to contents. This will allow the file buffer directly over HTTP to B2 and save a significant amount of memory. Also, contents must be binary or a binary stream.

Upload a Large File

NOTE: You cannot call .read() on the file because the function will seek and buffer the file over num_threads for you. Per Backblaze recommendation, part_size defaults to recommendedPartSize from b2_authorize_account (typically 100MB). num_threads defaults to 4 threads. The minimum part size is 5MB and you must have must have at least 2 parts.

Retrieve a File's Information (Necessary before Downloading)

Download a file

This returns a BytesIO object which you can manipulate in Python using a tool like PIL, serve on a website, or easily save like this:

Delete a file version

This deletes a single version of a file. (See the docs on File Versions at Backblaze for explanation)

Backblaze Cloud Backup

Hide (aka 'Soft-delete') a file

This hides a file (aka 'soft-delete') so that downloading by name will not find the file, but previous versions of the file are still stored. (See the docs on Hiding file at Backblaze for details)

Testing

Unit testing with pytestBefore running, you must set the environment variables: B2_KEY_ID and B2_APPLICATION_KEY

** Run tests **

LICENSE

MIT License

Copyright (c) 2018 George Sibble

Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the 'Software'), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:

B2 Blaze Pizza

The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.

Release historyRelease notifications | RSS feed

0.2.1

0.1.10

0.1.9

Blaze Bioscience B2 Funding

0.1.8

0.1.7

0.1.6

0.1.5

0.1.4

0.1.3

0.1.2

0.1.1

0.1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

B2 blazer
Files for b2blaze, version 0.2.1
Filename, sizeFile typePython versionUpload dateHashes
Filename, size b2blaze-0.2.1-py3-none-any.whl (18.1 kB) File type Wheel Python version py3 Upload dateHashes
Filename, size b2blaze-0.2.1.tar.gz (16.3 kB) File type Source Python version None Upload dateHashes
BackblazeClose

Hashes for b2blaze-0.2.1-py3-none-any.whl

Hashes for b2blaze-0.2.1-py3-none-any.whl
AlgorithmHash digest
SHA2564cc7ac626ca3aed548ac4b4e893fc83ffd013fa4c134717c217c5174c9171d41
MD56a8d8fa34807ca07fe0d7fee5b715b27
BLAKE2-256ed238c1550df00840188e25c37a70de974aba99104ad4607913c862879c2783e
Close

Hashes for b2blaze-0.2.1.tar.gz

Hashes for b2blaze-0.2.1.tar.gz
AlgorithmHash digest
SHA256b105ddf55209fff520d418d623fc719ed826f58e53cc28eb7ba1becd9bb06a44
MD5e4c555ae41215c1bc1e1bb29f339e37d
BLAKE2-256a87dd1657085f9b872e304e2c0407095680a482e04d7301bc17a06d314e6fe8d