# `sc_crawler.vendors._hcloud`

> Inventory of Hetzner Cloud via its API and manual data entry: servers, storages, traffic and IPv4 addresses, with their prices.

# `sc_crawler.vendors._hcloud`

**Functions:**

- [**inventory_compliance_frameworks**](#inventory_compliance_frameworks) – Manual list of known compliance frameworks at Hetzner.
- [**inventory_regions**](#inventory_regions) – List all regions via API call.
- [**inventory_zones**](#inventory_zones) – List all regions as availability zones.
- [**inventory_servers**](#inventory_servers) – List all server types from API and manual data entry from the Hetzner Cloud homepage.
- [**inventory_server_prices**](#inventory_server_prices) – List server prices per location from the server types API.
- [**inventory_server_prices_spot**](#inventory_server_prices_spot) – There are no spot instances at Hetzner.
- [**inventory_storages**](#inventory_storages) – Block storage volume information collected manually.
- [**inventory_storage_prices**](#inventory_storage_prices) – Block storage volume pricing information collected manually.
- [**inventory_traffic_prices**](#inventory_traffic_prices) – Traffic price collected manually.
- [**inventory_ipv4_prices**](#inventory_ipv4_prices) – IPv4 price collected manually.
- [**inventory_databases**](#inventory_databases) – Hetzner Cloud does not offer managed PostgreSQL.

## func <code class="doc-name">inventory_compliance_frameworks</code> [_hcloud.py:370–374](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_hcloud.py#L370-L374)

```python
inventory_compliance_frameworks(vendor)
```

Manual list of known compliance frameworks at Hetzner.

Data collected from <https://www.hetzner.com/unternehmen/zertifizierung>.

## func <code class="doc-name">inventory_regions</code> [_hcloud.py:377–421](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_hcloud.py#L377-L421)

```python
inventory_regions(vendor)
```

List all regions via API call.

Using the unique location `name` (e.g. `fsn1`) as the region id
instead of the numeric location id, as the numeric ids were
renumbered when the datacenters endpoint got deprecated, while
the names are stable and are also used to reference locations in
the server type prices, and can be passed instead of the `id` in
most `hcloud` API endpoints via the `id_or_name` method.
The former datacenter region ids (and their zones) are archived via
[sc_crawler.archive_rules](https://docs.sparecores.com/crawler/reference/archive_rules.md).

All regions are powered by green energy as per
<https://www.hetzner.com/unternehmen/umweltschutz/>.

## func <code class="doc-name">inventory_zones</code> [_hcloud.py:424–444](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_hcloud.py#L424-L444)

```python
inventory_zones(vendor)
```

List all regions as availability zones.

There is no concept of having multiple availability zones within
a location at Hetzner Cloud, so creating 1-1 dummy Zones reusing
the Region id and name.

## func <code class="doc-name">inventory_servers</code> [_hcloud.py:447–529](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_hcloud.py#L447-L529)

```python
inventory_servers(vendor)
```

List all server types from API and manual data entry from the Hetzner Cloud homepage.

CPU information is recorded from <https://www.hetzner.com/cloud/> as not exposed via API.

Lifecycle (per-location server type fields): `deprecation.unavailable_after` in
past -> RETIRED, `deprecation` present -> PLANNED_FOR_RETIREMENT,
empty locations -> INACTIVE, otherwise (including sold out) ACTIVE.
See `_hcloud_server_status`. Known types removed from the API -> RETIRED,
see `_retired_servers`. The retirement date is the latest
`deprecation.unavailable_after`, see `_hcloud_server_retirement_date`.

## func <code class="doc-name">inventory_server_prices</code> [_hcloud.py:532–574](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_hcloud.py#L532-L574)

```python
inventory_server_prices(vendor)
```

List server prices per location from the server types API.

`prices[].location` and `locations[].location.name` are both the
location name, which is also used as our Region id.

## func <code class="doc-name">inventory_server_prices_spot</code> [_hcloud.py:577–579](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_hcloud.py#L577-L579)

```python
inventory_server_prices_spot(vendor)
```

There are no spot instances at Hetzner.

## func <code class="doc-name">inventory_storages</code> [_hcloud.py:582–605](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_hcloud.py#L582-L605)

```python
inventory_storages(vendor)
```

Block storage volume information collected manually.

There is not information shared vie the API, so information
was collected manually from:

- <https://www.hetzner.com/cloud/>
- <https://docs.hetzner.cloud/#volumes-create-a-volume>
- <https://docs.hetzner.com/cloud/volumes/overview/>

## func <code class="doc-name">inventory_storage_prices</code> [_hcloud.py:608–625](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_hcloud.py#L608-L625)

```python
inventory_storage_prices(vendor)
```

Block storage volume pricing information collected manually.

Source: <https://www.hetzner.com/cloud/block-storage/>

## func <code class="doc-name">inventory_traffic_prices</code> [_hcloud.py:628–657](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_hcloud.py#L628-L657)

```python
inventory_traffic_prices(vendor)
```

Traffic price collected manually.

Source: <https://docs.hetzner.com/robot/general/traffic/>

## func <code class="doc-name">inventory_ipv4_prices</code> [_hcloud.py:660–676](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_hcloud.py#L660-L676)

```python
inventory_ipv4_prices(vendor)
```

IPv4 price collected manually.

Source: <https://docs.hetzner.com/cloud/servers/overview#network-options>

## func <code class="doc-name">inventory_databases</code> [_hcloud.py:679–681](https://github.com/SpareCores/sc-crawler/blob/81bb61ea164dda526de4aa6de298810007274f21/src/sc_crawler/vendors/_hcloud.py#L679-L681)

```python
inventory_databases(vendor)
```

Hetzner Cloud does not offer managed PostgreSQL.
