Skip to main content

B2 python SDK Travis CI License python versions PyPI version

This repository contains a client library and a few handy utilities for easy access to all of the capabilities of B2 Cloud Storage.

B2 command-line tool is an example of how it can be used to provide command-line access to the B2 service, but there are many possible applications (including FUSE filesystems, storage backend drivers for backup applications etc).

Installation

The sdk can be installed with:

pip install b2sdk

If you see a message saying that the six library cannot be installed, which happens if you're installing with the system python on OS X El Capitan, try this:

pip install --ignore-installed b2sdk

Version policy

b2sdk follows Semantic Versioning policy, so in essence the version number is MAJOR.MINOR.PATCH (for example 1.2.3) and:

  • we increase MAJOR version when we make incompatible API changes
  • we increase MINOR version when we add functionality in a backwards-compatible manner, and
  • we increase PATCH version when we make backwards-compatible bug fixes (unless someone relies on the undocumented behavior of a fixed bug)

Therefore when setting up b2sdk as a dependency, please make sure to match the version appropriately, for example you could put this in your requirements.txt to make sure your code is compatible with the b2sdk version your user will get from pypi:

b2sdk>=0.0.0,<1.0.0

Release History

0.1.4 (2019-04-04)

Initial official release of SDK as a separate package (until now it was a part of B2 CLI)

Developer Info

We encourage outside contributors to perform changes on our codebase. Many such changes have been merged already. In order to make it easier to contribute, core developers of this project:

  • provide guidance (through the issue reporting system)
  • provide tool assisted code review (through the Pull Request system)
  • maintain a set of integration tests (run with a production cloud)
  • maintain a set of (well over a hundred) unit tests
  • automatically run unit tests on 14 versions of python (including osx, Jython and pypy)
  • format the code automatically using yapf
  • use static code analysis to find subtle/potential issues with maintainability
  • maintain other Continous Integration tools (coverage tracker)

You'll need to some Python packages installed. To get all the latest things:

  • pip install --upgrade --upgrade-strategy eager -r requirements.txt -r requirements-test.txt -r requirements-setup.txt

There is a Makefile with a rule to run the unit tests using the currently active Python:

make setup
make test

will install the required packages, then run the unit tests.

To test in multiple python virtual environments, set the enviroment variable PYTHON_VIRTUAL_ENVS to be a space-separated list of their root directories. When set, the makefile will run the unit tests in each of the environments.

Before checking in, use the pre-commit.sh script to check code formatting, run unit tests, run integration tests etc.

The integration tests need a file in your home directory called .b2_auth that contains two lines with nothing on them but your account ID and application key:

 accountId
 applicationKey

We marked the places in the code which are significantly less intuitive than others in a special way. To find them occurrences, use git grep '*magic*'.

Metadata

Release files for b2sdk 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for b2sdk 0.1.4
File Size Uploaded
b2sdk-0.1.4.tar.gz 98.3 kB Details

Release files / b2sdk-0.1.4.tar.gz

Download URL b2sdk-0.1.4.tar.gz
Size 98.3 kB
Tags Source
SHA-256 checksum
How to use checksums
04eed8b542068a070dd78a54764002dfdc167df571c5dbd7f9b575902cd80989
BLAKE2b-256 checksum
How to use checksums
e354cac268c319409cf4f5019d220794f8b53efe9d358a6c02320e2dc1c96b94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.9.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.5.6

Release history Release notifications | RSS feed

2.13.0

2 release files

2.11.0

2 release files

2.10.3

2 release files

2.10.2

2 release files

2.10.1

2 release files

2.10.0

2 release files

2.9.4

2 release files

2.9.3

2 release files

2.9.2

2 release files

2.9.1

2 release files

2.8.1

2 release files

2.8.0

2 release files

2.7.0

2 release files

2.6.0

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.33.0

2 release files

1.32.0

2 release files

1.31.0

2 release files

1.29.1

2 release files

1.29.0

2 release files

1.27.0

2 release files

1.26.0

2 release files

1.25.0

2 release files

1.24.1

2 release files

1.24.0

2 release files

1.23.0

2 release files

1.22.1

2 release files

1.22.0

2 release files

1.21.0

1 release file

1.20.0

1 release file

1.19.0

1 release file

1.18.0

1 release file

1.17.3

1 release file

1.17.2

1 release file

1.17.1

1 release file

1.17.0

1 release file

1.16.0

1 release file

1.15.0

1 release file

1.14.1

1 release file

1.14.0

1 release file

1.13.0

1 release file

1.12.0

1 release file

1.11.0

1 release file

1.10.0

1 release file

1.9.0

1 release file

1.8.0

1 release file

1.7.0

1 release file

1.6.0

1 release file

1.5.0

1 release file

1.4.0

1 release file

1.3.0

1 release file

1.2.0

1 release file

1.1.4

1 release file

1.1.2

1 release file

1.1.0

1 release file

1.0.2

1 release file

1.0.0

1 release file

0.1.8

1 release file

0.1.6

1 release file

This release

0.1.4 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page