PHPackages                             bachi/couchdb - 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. [Database &amp; ORM](/categories/database)
4. /
5. bachi/couchdb

ActiveLibrary[Database &amp; ORM](/categories/database)

bachi/couchdb
=============

CouchDB Client for PHP &gt;=5.5

1.1.0(11y ago)122733[11 issues](https://github.com/Baachi/CouchDB/issues)MITPHPPHP &gt;=5.5.0

Since Jun 30Pushed 1y ago2 watchersCompare

[ Source](https://github.com/Baachi/CouchDB)[ Packagist](https://packagist.org/packages/bachi/couchdb)[ Docs](https://github.com/Baachi/CouchDB)[ RSS](/packages/bachi-couchdb/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)Dependencies (2)Versions (8)Used By (0)

CouchDB
=======

[](#couchdb)

A CouchDB Client for &gt;=PHP 5.5 with event system.

Inspired by [Doctrine/MongoDB](https://github.com/Doctrine/mongodb) and [Doctrine/CouchDB](https://github.com/Doctrine/couchdb-odm)

ServiceStatusTravis CI[![Build Status](https://camo.githubusercontent.com/873a078d3da8d5c7b0305f01dd593063aa6ad3331e346aa5f7951ff675fbe0c1/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f4261616368692f436f75636844422e706e67)](http://travis-ci.org/Baachi/CouchDB)Scrutinizer[![Scrutinizer Quality Score](https://camo.githubusercontent.com/863a2ec93da217c877d612d141a86a0e897f5b3eaf18815556747baa4b0a2036/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4261616368692f436f75636844422f6261646765732f7175616c6974792d73636f72652e706e673f733d35633530313363333938646535303937373933633132313061383761366439343439333030366632)](https://scrutinizer-ci.com/g/Baachi/CouchDB/)Code Coverage[![Code Coverage](https://camo.githubusercontent.com/3eca81a85648157e19e1d836ccb95be46a218a1ca993eb1399b10896de4cda8a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4261616368692f436f75636844422f6261646765732f636f7665726167652e706e673f733d36316531386430623538353065373032343432626566383966653636616565383330613465636434)](https://scrutinizer-ci.com/g/Baachi/CouchDB/)SensioLabsInsight[![SensioLabsInsight](https://camo.githubusercontent.com/bddc9ac96deb1c59c3e1a6b8a8aeab9749778977c88f4b2c165a70989568d60f/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f39613936373633632d633933382d343861362d613966612d6163373765666237313937642f6d696e692e706e67)](https://insight.sensiolabs.com/projects/9a96763c-c938-48a6-a9fa-ac77efb7197d)Style CI[![StyleCI](https://camo.githubusercontent.com/bd815b1b6a03bcb8d1887f1bf7a71203687197ac06ae05d0cf87b94461851651/68747470733a2f2f7374796c6563692e696f2f7265706f732f333034363337322f736869656c64)](https://styleci.io/repos/3046372)Installation
------------

[](#installation)

**Composer**

You can install CouchDB Client over composer. Add the following line into your `composer.json` file.

```
$ composer require bachi/couchdb

```

**Don't use composer?**

Start to disover composer now!

Usage
-----

[](#usage)

### Initialize

[](#initialize)

```
$client = new \GuzzleHttp\Client(['base_uri' => 'http://localhost:5984', 'http_errors' => false]);
$connection = new \CouchDB\Connection($client);
```

### Creates a database

[](#creates-a-database)

```
$database = $conn->createDatabase('foobar');
// or with magic method
$database = $conn->foobar;
```

### Get a database instance

[](#get-a-database-instance)

```
$database = $conn->selectDatabase('foobar');
// or with magic method
$database = $conn->foobar;
```

### Delete a database

[](#delete-a-database)

```
if (true === $conn->hasDatabase('foobar')) {
    $conn->dropDatabase('foobar');
}
// or with magic methods
if (isset($conn->foobar)){
    unset($conn->foobar);
}
```

Unit Tests (PHPUnit)
--------------------

[](#unit-tests-phpunit)

The testsuite can you find in the `tests` folder.

Run the testsuite:

```
phpunit

```

It is green?

Credits
-------

[](#credits)

- Markus Bachmann
- \[All contributors\] ()

License
-------

[](#license)

CouchDB Client is released under the MIT License. See the bundled LICENSE file for details.

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance12

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 98.7% 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 ~0 days

Total

5

Last Release

4020d ago

### Community

Maintainers

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

---

Top Contributors

[![Baachi](https://avatars.githubusercontent.com/u/833645?v=4)](https://github.com/Baachi "Baachi (152 commits)")[![h4cc](https://avatars.githubusercontent.com/u/2981491?v=4)](https://github.com/h4cc "h4cc (1 commits)")[![michaelcullum](https://avatars.githubusercontent.com/u/211740?v=4)](https://github.com/michaelcullum "michaelcullum (1 commits)")

---

Tags

couchdb-clientphpdatabasenosqlcouchdb

### Embed Badge

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

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

###  Alternatives

[aws/aws-sdk-php

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

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M736](/packages/sylius-sylius)[kreait/firebase-php

Firebase Admin SDK

2.4k44.4M86](/packages/kreait-firebase-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M47](/packages/tencentcloud-tencentcloud-sdk-php)[concrete5/core

Concrete core subtree split

20166.1k52](/packages/concrete5-core)

PHPackages © 2026

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