PHPackages                             decodelabs/hydro - 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. decodelabs/hydro

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

decodelabs/hydro
================

Simple PSR18 HTTP client wrapper around Guzzle

v0.2.5(7mo ago)11.0k2MITPHPPHP ^8.4CI passing

Since Oct 16Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/decodelabs/hydro)[ Packagist](https://packagist.org/packages/decodelabs/hydro)[ RSS](/packages/decodelabs-hydro/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (19)Used By (2)

Hydro
=====

[](#hydro)

[![PHP from Packagist](https://camo.githubusercontent.com/2de01810ad5074c6df409886761b020410a8fb28735b250b2c496fc81a490bd8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6465636f64656c6162732f687964726f3f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/hydro)[![Latest Version](https://camo.githubusercontent.com/0d6cf2bef513d9becbd93a8bac844d4d3e1858a7d8ea412d4c1664664037c5b5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6465636f64656c6162732f687964726f2e7376673f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/hydro)[![Total Downloads](https://camo.githubusercontent.com/f5bfbce0611d44c58a8aa973847fd200e0274c122c494267eb518a5e2842c476/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6465636f64656c6162732f687964726f2e7376673f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/hydro)[![GitHub Workflow Status](https://camo.githubusercontent.com/ced2488d68fcd5c0761cc33221ac970b5b52dcbb8e3b878df6027d89d7774779/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6465636f64656c6162732f687964726f2f696e746567726174652e796d6c3f6272616e63683d646576656c6f70)](https://github.com/decodelabs/hydro/actions/workflows/integrate.yml)[![PHPStan](https://camo.githubusercontent.com/e25c14ce011edabdd0fbd2e10415b41cc5d66ed11ef3e5b7edd074c5bdd35a2d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d3434434331312e7376673f6c6f6e6743616368653d74727565267374796c653d666c6174)](https://github.com/phpstan/phpstan)[![License](https://camo.githubusercontent.com/8161fd34a674e431c51347782b423ea7371c015158cfc0c94ddbaabeeb17462f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6465636f64656c6162732f687964726f3f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/hydro)

### Simple HTTP client wrapper around Guzzle

[](#simple-http-client-wrapper-around-guzzle)

Hydro provides a simple interface to common HTTP client functionality using Guzzle under the hood.

---

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

[](#installation)

This package requires PHP 8.4 or higher.

Install via Composer:

```
composer require decodelabs/hydro
```

Usage
-----

[](#usage)

Basic usage for different types of files:

```
use DecodeLabs\Hydro;
use DecodeLabs\Monarch;

$hydro = Monarch::getService(Hydro::class);

$memoryFile = $hydro->get('https://example.com/file.txt'); // Atlas file
$string = $hydro->getString('https://example.com/file.txt'); // String
$file = $hydro->getFile('https://example.com/file.txt', '/path/to/save/file.txt'); // Local file
$tempFile = $hydro->getTempFile('https://example.com/file.txt'); // Temp file
$json = $hydro->getJson('https://example.com/file.json'); // Decoded JSON array
$tree = $hydro->getJsonTree('https://example.com/file.json'); // Decoded JSON Collections/Tree
```

### Options

[](#options)

Pass an array of options (including URL) to the underlying client:

```
$hydro->get([
    'url' => 'https://example.com/file.txt',
    'timeout' => 10
]);
```

### Errors

[](#errors)

Handle error status responses (or return alternative response):

```
$file = $hydro->get('https://example.com/file.txt', function($response) {
    switch($response->getStatusCode()) {
        case 404:
            throw Exceptional::Notfound(
                message: 'File not found'
            );

        case 500:
            throw Exceptional::Runtime(
                message: 'Server error'
            );

        default:
            return $hydro->request('GET', 'https://example.com/other.txt');
    }
});
```

Licensing
---------

[](#licensing)

Hydro is licensed under the proprietary License. See [LICENSE](./LICENSE) for the full license text.

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance68

Regular maintenance activity

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity59

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

Recently: every ~8 days

Total

17

Last Release

217d ago

PHP version history (3 changes)v0.1.0PHP ^8.0

v0.1.2PHP ^8.1

v0.1.6PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a241d64d12b3b5ee94197862ec1ec30b82ed2efa34a0cd7f4c3565a021daddd?d=identicon)[betterthanclay](/maintainers/betterthanclay)

---

Top Contributors

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

---

Tags

clienthttpphp

### Embed Badge

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

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

###  Alternatives

[shopify/shopify-api

Shopify API Library for PHP

4634.8M16](/packages/shopify-shopify-api)[laudis/neo4j-php-client

Neo4j-PHP-Client is the most advanced PHP Client for Neo4j

184616.9k31](/packages/laudis-neo4j-php-client)[akamai-open/edgegrid-client

Implements the Akamai {OPEN} EdgeGrid Authentication specified by https://developer.akamai.com/introduction/Client\_Auth.html

482.5M6](/packages/akamai-open-edgegrid-client)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[huaweicloud/huaweicloud-sdk-php

Huawei Cloud SDK for PHP

1829.2k2](/packages/huaweicloud-huaweicloud-sdk-php)[art4/requests-psr18-adapter

Use WordPress/Requests as a PSR-18 HTTP client

153.3k](/packages/art4-requests-psr18-adapter)

PHPackages © 2026

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