PHPackages                             techyet/b2-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. techyet/b2-sdk

ActiveLibrary[API Development](/categories/api)

techyet/b2-sdk
==============

v0.1.3.4(8y ago)01.0k1MITPHPPHP ^7.0

Since Mar 13Pushed 8y ago1 watchersCompare

[ Source](https://github.com/alihamze/BackblazeB2)[ Packagist](https://packagist.org/packages/techyet/b2-sdk)[ RSS](/packages/techyet-b2-sdk/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (2)Versions (9)Used By (1)

Backblaze B2 PHP SDK
====================

[](#backblaze-b2-php-sdk)

This is a **work in progress** PHP SDK for Backblaze B2. Not all parameters are in the examples below.

```
use TechYet\B2\Client;

$client = new Client('accountId', 'applicationKey');

//Returns an array of Bucket objects indexed by the bucket name
$buckets = $client->listBuckets();

//Returns an array of File objects
$files = $buckets['testBucket']->listFileNames();

//Returns a File object
$file = $buckets['testBucket']->getFileByName('test.txt');

//Returns the file contents
$content = $file->download();

//Also returns the file contents
$content = $buckets['testBucket']->downloadFileByName('test.txt');

//Saves the file to disk and returns a success boolean
$success = $file->download([
    'SaveAs' => '/path/to/save/location',
]);

//Also saves the file to disk and returns a success boolean
$file = $buckets['testBucket']->downloadFileByName('test.txt', [
    'SaveAs' => '/path/to/save/location',
]);

//Returns a boolean value
$exists = $buckets['testBucket']->fileExists('test.txt');

//Returns a boolean value
$deleted = $buckets['testBucket']->getFileByName('test.txt')->delete();

//Returns a string containing the authorization token
$token = $buckets['testBucket']->getFileByName('test.txt')->getDownloadAuthorization([
    'validDurationInSeconds' => 86400,
]);

//Returns a file object
$file = $buckets['testBucket']->uploadFile('test.txt.', 'This is a test');
//You can also pass a file resource
$file = $buckets['testBucket']->uploadFile('test.txt.', fopen('/path/to/input', 'r'));
```

API Endpoints
=============

[](#api-endpoints)

- b2\_authorize\_account
- b2\_cancel\_large\_file
- b2\_create\_bucket
- b2\_create\_key
- b2\_delete\_bucket
- b2\_delete\_file\_version
- b2\_delete\_key
- b2\_download\_file\_by\_id
- b2\_download\_file\_by\_name
- b2\_get\_download\_authorization
- b2\_finish\_large\_file
- b2\_get\_file\_info
- b2\_get\_upload\_part\_url
- b2\_get\_upload\_url
- b2\_hide\_file
- b2\_list\_buckets
- b2\_list\_file\_names
- b2\_list\_file\_versions
- b2\_list\_keys
- b2\_list\_parts
- b2\_list\_unfinished\_large\_files
- b2\_start\_large\_file
- b2\_update\_bucket
- b2\_upload\_file
- b2\_upload\_part

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

8

Last Release

2976d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a1c43b0e20f4c79a02612b4d0047848d928117b4fc2b487968fb7568914ba66d?d=identicon)[alihamze](/maintainers/alihamze)

---

Top Contributors

[![alihamze](https://avatars.githubusercontent.com/u/1642068?v=4)](https://github.com/alihamze "alihamze (23 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/techyet-b2-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/techyet-b2-sdk/health.svg)](https://phpackages.com/packages/techyet-b2-sdk)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
