PHPackages                             xinningsu/baidu-bos - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. xinningsu/baidu-bos

ActiveLibrary[File &amp; Storage](/categories/file-storage)

xinningsu/baidu-bos
===================

Baidu BOS client 百度对象存储API的基本调用

v1.0.2(9mo ago)41.8k1MITPHPPHP &gt;=5.6

Since Mar 4Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/xinningsu/baidu-bos)[ Packagist](https://packagist.org/packages/xinningsu/baidu-bos)[ Docs](https://github.com/xinningsu/baidu-bos)[ RSS](/packages/xinningsu-baidu-bos/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (1)

百度对象存储
======

[](#百度对象存储)

百度对象存储 BOS(Baidu Object Storage) API 针对指定bucket的一些基本操作。

[![MIT licensed](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](./LICENSE)[![Build Status](https://camo.githubusercontent.com/0d463c06f172508ae24daab60251cfe25935fd06cc45b421aa8141957d40cd24/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f78696e6e696e6773752f62616964752d626f732f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/xinningsu/baidu-bos/build-status/master)[![Code Coverage](https://camo.githubusercontent.com/df13c5823670ce1a9fc86337ac8352603dfb725dc2b588053500c5ac7289ad7e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f78696e6e696e6773752f62616964752d626f732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/xinningsu/baidu-bos/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4ca408607956cb9b5d7f856e3e40232eec8b953359d83afd79d09a3ea8d533bb/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f78696e6e696e6773752f62616964752d626f732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/xinningsu/baidu-bos)[![Code Intelligence Status](https://camo.githubusercontent.com/95e186f582f08711b46c61d23fff171a7c14d00a94617cb340928b2707b4ab66/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f78696e6e696e6773752f62616964752d626f732f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/g/xinningsu/baidu-bos)[![Maintainability](https://camo.githubusercontent.com/8972c4b44e63e1d8cc8efb14aed2f95b57da3664c3d804dee199e528afd91d6e/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f65303562633336366438396136313539616261322f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/xinningsu/baidu-bos/maintainability)

安装
==

[](#安装)

```
composer require xinningsu/baidu-bos

```

例子
==

[](#例子)

```
require 'vendor/autoload.php';

// 实例化
$client = new \Sulao\BaiduBos\Client([
    'access_key' => 'access key',
    'secret_key' => 'secret key',
    'bucket' => 'bucket',
    'region' => 'region',
    'options' => ['connect_timeout' => 10] // Optional, guzzle request options
]);

// 添加或更新对象
$client->putObject('/object_name.txt', 'contents');

// 获取对象内容
$content = $client->getObject('/object_name.txt');

// 获取对象Meta信息
$meta = $client->getObjectMeta('/object_name.txt');

// 复制对象
$client->copyObject('/object_name.txt', '/new_object_name.txt');

// 追加数据
$client->appendObject('/object_name.txt', 'more contents');

// URL抓取资源
$client->fetchObject('/object_name.txt', 'https://www.baidu.com');

// 设置ACL
$client->putObjectAcl('/object_name.txt', 'public-read');

// 获取ACL
$acl = $client->getObjectAcl('/object_name.txt');

// 删除ACL
$client->deleteObjectAcl('/object_name.txt');

// 对象列表
$lists = $client->listObjects();

// 删除对象
$client->deleteObject('/object_name.txt');

// 批量删除对象
$client->deleteObjects(['/object_name.txt', '/object_name2.txt']);
```

整合
==

[](#整合)

- [Flysystem Baidu BOS](https://github.com/xinningsu/flysystem-baidu-bos)
- [Larvel Filesystem Baidu BOS](https://github.com/xinningsu/laravel-filesystem-baidu-bos)

参考
==

[](#参考)

-

License
=======

[](#license)

[MIT](./LICENSE)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance58

Moderate activity, may be stable

Popularity24

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

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 ~808 days

Total

3

Last Release

279d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7513c529acb322b54c46bef8011275fe734f9d00944c3f3921cebc21c0cd2ed0?d=identicon)[xinningsu](/maintainers/xinningsu)

---

Top Contributors

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

---

Tags

baidubaidu-bosbaidu-object-storagebosbosbaidubaidu bosbaidu object storage

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/xinningsu-baidu-bos/health.svg)

```
[![Health](https://phpackages.com/badges/xinningsu-baidu-bos/health.svg)](https://phpackages.com/packages/xinningsu-baidu-bos)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k511.3M2.2k](/packages/aws-aws-sdk-php)[google/cloud

Google Cloud Client Library

1.2k16.2M53](/packages/google-cloud)[stechstudio/laravel-zipstream

A fast and simple streaming zip file downloader for Laravel.

4633.7M3](/packages/stechstudio-laravel-zipstream)[fof/upload

The file upload extension for the Flarum forum with insane intelligence.

188171.7k15](/packages/fof-upload)[uploadcare/uploadcare-php

Uploadcare PHP integration handles uploads and further operations with files by wrapping Upload and REST APIs.

1022.5M6](/packages/uploadcare-uploadcare-php)[azure-oss/storage

Azure Blob Storage PHP SDK

37985.0k5](/packages/azure-oss-storage)

PHPackages © 2026

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