PHPackages                             f2h2h1/couchdb-client - 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. f2h2h1/couchdb-client

ActiveLibrary

f2h2h1/couchdb-client
=====================

a simple couchdb client base on php

0.0.1(5y ago)06MPL-2.0PHPCI failing

Since Jun 9Pushed 5y ago1 watchersCompare

[ Source](https://github.com/f2h2h1/couchdb-client)[ Packagist](https://packagist.org/packages/f2h2h1/couchdb-client)[ RSS](/packages/f2h2h1-couchdb-client/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

Simple CouchDB Clinet
=====================

[](#simple-couchdb-clinet)

快速开始
----

[](#快速开始)

安装 couchdb

```
docker run -p 5984:5984 -e COUCHDB_USER=admin -e COUCHDB_PASSWORD=password --name couchdb -d couchdb:3.1
```

声明依赖

```
composer require f2h2h1/couchdb-client
```

使用例子

```
use F2h2h1\CouchDB\SimpleClinet;

require_once(__DIR__ . '/../vendor/autoload.php');

$dbname = 'test_' . substr(md5(uniqid(microtime(true), true)), 0, mt_rand(3, 6));
$config = [
    'address' => 'http://127.0.0.1:5984',
    'user' => 'admin',
    'password' => 'password',
    'dbname' => $dbname,
];

$client = new SimpleClinet($config);

$client->deleteDatabase();
$client->createDatabase();
echo 'create database success' . PHP_EOL;

$data = ['name' => 'tony', 'age' => 23];
list($id, $rev) = $client->postDocument($data);
var_dump($id, $rev);

$docs = $client->findDocument($id);
var_dump($docs);

$data['age'] = 24;
list($id, $rev) = $client->putDocument($data, $id, $rev);
var_dump($id, $rev);

$docs = $client->findDocument($id);
var_dump($docs);

$client->deleteDocument($id, $rev);
echo 'delete document success' . PHP_EOL;

$client->deleteDatabase();
echo 'delete database success' . PHP_EOL;
```

开发
--

[](#开发)

克隆仓库

```
git clone https://github.com/f2h2h1/orm.git
```

运行 composer

```
composer install
```

运行测试用例

```
composer exec -v phpunit tests/CouchDBClientTest.php
```

[![License: MPL-2.0](https://camo.githubusercontent.com/0a34271b130f15aa109c3625a51302a3c6b584e3e1df0d19cd53b9741ac02dd5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d504c2d2d322e302d677265656e)](https://www.mozilla.org/en-US/MPL/2.0/)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Unknown

Total

1

Last Release

2160d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/06682446378945dd961277ae4299d1c6aa1d8ad442075916c328fe3f24a3eb0f?d=identicon)[f2h2h1](/maintainers/f2h2h1)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/f2h2h1-couchdb-client/health.svg)

```
[![Health](https://phpackages.com/badges/f2h2h1-couchdb-client/health.svg)](https://phpackages.com/packages/f2h2h1-couchdb-client)
```

###  Alternatives

[temporal/sdk

Temporal SDK

4002.2M18](/packages/temporal-sdk)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

50570.7k1](/packages/web-auth-webauthn-framework)[internal/dload

Downloads binaries.

98142.7k10](/packages/internal-dload)[acquia/orca

A tool for testing a company's software packages together in the context of a realistic, functioning, best practices Drupal build

32902.4k](/packages/acquia-orca)[mahocommerce/maho

Free and open source ecommerce platform, created in 2024 on the M1 platform, PHP 8.3+

1322.1k12](/packages/mahocommerce-maho)

PHPackages © 2026

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