PHPackages                             cosmosdb/cosmosdb - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. cosmosdb/cosmosdb

ActiveLibrary[HTTP &amp; Networking](/categories/http)

cosmosdb/cosmosdb
=================

Wrapper for Azure CosmosDB REST API

v1.1.0(3y ago)110MITPHPPHP &gt;=8.0

Since Apr 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/macsakini/CosmosDB)[ Packagist](https://packagist.org/packages/cosmosdb/cosmosdb)[ Docs](https://cosmosdb.macmaxwell.com)[ RSS](/packages/cosmosdb-cosmosdb/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (3)Versions (6)Used By (0)

cosmosdb
========

[](#cosmosdb)

This is a wrapper around the rest api to make it simpler to utilize azure cosmosdb from your php services such as Wordpress, Symphony and Laravel.

For more information around the wrapper for Azure Cosmos DB.

Installation
------------

[](#installation)

Include cosmosdb/cosmosdb in your project, by adding it to your composer.json file.

```
{
  "require": {
    "cosmosdb/cosmosdb": "1.1.0"
  }
}
```

or by running

```
composer require cosmosdb/cosmosdb
```

at the root of your project.

Usage
-----

[](#usage)

### Select Database

[](#select-database)

```
$database = new Database(
    'host',
    'primary_key'
);
$response = $database->get("DBNAME");
```

### Delete Database

[](#delete-database)

```
$database = new Database(
    'host',
    'primary_key'
);
$response = $database->delete("DBNAME");
```

### List Databases

[](#list-databases)

```
$database = new Database(
    'host',
    'primary_key'
);
$response = $database->list();
```

### Create a new Database

[](#create-a-new-database)

```
$database = new Database(
    'host',
    'primary_key'
);
$response = $database->create("DBNAME");
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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

Total

3

Last Release

1178d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2fa5edbc23b5da17b343d818a9b292d905ac35949f1301b53ed01a48519c8e67?d=identicon)[Macmaxwell](/maintainers/Macmaxwell)

---

Top Contributors

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

---

Tags

azure-cosmos-dbbuilder-patterncosmosdbrestazurecosmosdbdocumentdbazure cosmosdbazure documentdbcosmosdb restcosmosdb sql api rest

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  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)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[onesignal/onesignal-php-api

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

34216.9k2](/packages/onesignal-onesignal-php-api)[jupitern/cosmosdb

PHP wrapper for Azure Cosmos DB (formerly known as azure documentdb) using SQL rest api

1372.8k](/packages/jupitern-cosmosdb)[oat-sa/tao-core

TAO core extension

66143.7k120](/packages/oat-sa-tao-core)[zenditplatform/zendit-php-sdk

PHP client for Zendit API

1194.4k](/packages/zenditplatform-zendit-php-sdk)

PHPackages © 2026

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