axute/hetzner-cloud-php-sdk

An unofficial PHP SDK for the Hetzner Cloud API.

v3.0.0 2025-04-19 17:20 UTC

README

Latest Stable Version License Total Downloads Actions Status

Hetzner Cloud PHP (8.3+) SDK

A PHP (8.3+) SDK for the Hetzner Cloud API: https://docs.hetzner.cloud/

Installation

You can install the package via composer:

composer require axute/hetzner-cloud-php-sdk

Usage

$hetznerClient = new \LKDev\HetznerCloud\HetznerAPIClient($apiKey);
foreach ($hetznerClient->servers()->all() as $server) {
    echo 'ID: '.$server->id.' Name:'.$server->name.' Status: '.$server->status.PHP_EOL;
}

PHP Support

It is tested on PHP Versions 8.3 and 8.4.

Testing

You can just run phpunit. The whole library is based on unit tests and sample responses from the official Hetzner Cloud documentation.

Changelog

Please see CHANGELOG for more information what has changed recently.

Security

If you discover any security related issues, please use the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.