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 2y 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 1mo ago

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 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

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

Total

3

Last Release

1131d 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

[shopify/shopify-api

Shopify API Library for PHP

4634.8M16](/packages/shopify-shopify-api)[jupitern/cosmosdb

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

1366.0k](/packages/jupitern-cosmosdb)[onesignal/onesignal-php-api

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

34170.2k2](/packages/onesignal-onesignal-php-api)[ory/hydra-client

Documentation for all of Ory Hydra's APIs.

17435.9k](/packages/ory-hydra-client)[zenditplatform/zendit-php-sdk

PHP client for Zendit API

1204.3k](/packages/zenditplatform-zendit-php-sdk)[elasticemail/elasticemail-php

This API is based on the REST API architecture, allowing the user to easily manage their data with this resource-based approach. Every API call is established on which specific request type (GET, POST, PUT, DELETE) will be used. The API has a limit of 20 concurrent connections and a hard timeout of 600 seconds per request. To start using this API, you will need your Access Token (available &lt;a target='\_blank' href='https://app.elasticemail.com/marketing/settings/new/manage-api'&gt;here&lt;/a&gt;). Remember to keep it safe. Required access levels are listed in the given request’s description. Downloadable library clients can be found in our Github repository &lt;a target='\_blank' href='https://github.com/ElasticEmail?tab=repositories&amp;q=%22rest+api%22+in%3Areadme'&gt;here&lt;/a&gt;

1595.0k2](/packages/elasticemail-elasticemail-php)

PHPackages © 2026

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