Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions hcloud/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
from __future__ import annotations

from ._client import ( # noqa pylint: disable=C0414
Client as Client,
constant_backoff_function as constant_backoff_function,
exponential_backoff_function as exponential_backoff_function,
from ._client import (
Client,
constant_backoff_function,
exponential_backoff_function,
)
from ._exceptions import ( # noqa pylint: disable=C0414
APIException as APIException,
HCloudException as HCloudException,
)
from ._version import __version__ # noqa
from ._exceptions import APIException, HCloudException
from ._version import __version__

__all__ = [
"__version__",
"Client",
"constant_backoff_function",
"exponential_backoff_function",
"APIException",
"HCloudException",
]
16 changes: 10 additions & 6 deletions hcloud/actions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,25 @@
)
from .domain import (
Action,
ActionError,
ActionException,
ActionFailedException,
ActionResource,
ActionStatus,
ActionTimeoutException,
)

__all__ = [
"Action",
"ActionStatus",
"ActionException",
"ActionFailedException",
"ActionTimeoutException",
"ActionsClient",
"ActionSort",
"ActionsPageResult",
"BoundAction",
"ResourceActionsClient",
"ActionSort",
"ActionStatus",
"Action",
"ActionResource",
"ActionError",
"ActionException",
"ActionFailedException",
"ActionTimeoutException",
]
9 changes: 9 additions & 0 deletions hcloud/actions/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
from .._client import Client


__all__ = [
"ActionsClient",
"ActionsPageResult",
"BoundAction",
"ResourceActionsClient",
"ActionSort",
]


class BoundAction(BoundModelBase[Action], Action):
_client: ActionsClient

Expand Down
10 changes: 10 additions & 0 deletions hcloud/actions/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@
if TYPE_CHECKING:
from .client import BoundAction

__all__ = [
"ActionStatus",
"Action",
"ActionResource",
"ActionError",
"ActionException",
"ActionFailedException",
"ActionTimeoutException",
]

ActionStatus = Literal[
"running",
"success",
Expand Down
7 changes: 7 additions & 0 deletions hcloud/certificates/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
from .._client import Client


__all__ = [
"BoundCertificate",
"CertificatesPageResult",
"CertificatesClient",
]


class BoundCertificate(BoundModelBase[Certificate], Certificate):
_client: CertificatesClient

Expand Down
8 changes: 8 additions & 0 deletions hcloud/certificates/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
from .client import BoundCertificate


__all__ = [
"Certificate",
"ManagedCertificateStatus",
"ManagedCertificateError",
"CreateManagedCertificateResponse",
]


class Certificate(BaseDomain, DomainIdentityMixin):
"""Certificate Domain

Expand Down
6 changes: 6 additions & 0 deletions hcloud/core/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
from .._client import Client, ClientBase
from .domain import Meta

__all__ = [
"ResourceClientBase",
"ClientEntityBase",
"BoundModelBase",
]


T = TypeVar("T")

Expand Down
7 changes: 7 additions & 0 deletions hcloud/core/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@

from dateutil.parser import isoparse

__all__ = [
"BaseDomain",
"DomainIdentityMixin",
"Pagination",
"Meta",
]


class BaseDomain:
__api_properties__: tuple[str, ...]
Expand Down
6 changes: 6 additions & 0 deletions hcloud/datacenters/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
from ..server_types import BoundServerType
from .domain import Datacenter, DatacenterServerTypes

__all__ = [
"BoundDatacenter",
"DatacentersPageResult",
"DatacentersClient",
]


class BoundDatacenter(BoundModelBase[Datacenter], Datacenter):
_client: DatacentersClient
Expand Down
5 changes: 5 additions & 0 deletions hcloud/datacenters/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
from ..locations import Location
from ..server_types import BoundServerType

__all__ = [
"Datacenter",
"DatacenterServerTypes",
]


class Datacenter(BaseDomain, DomainIdentityMixin):
"""Datacenter Domain
Expand Down
4 changes: 3 additions & 1 deletion hcloud/deprecation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

from .domain import DeprecationInfo

__all__ = ["DeprecationInfo"]
__all__ = [
"DeprecationInfo",
]
4 changes: 4 additions & 0 deletions hcloud/deprecation/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

from ..core import BaseDomain

__all__ = [
"DeprecationInfo",
]


class DeprecationInfo(BaseDomain):
"""Describes if, when & how the resources was deprecated. If this field is set to ``None`` the resource is not
Expand Down
5 changes: 5 additions & 0 deletions hcloud/exp/zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

from __future__ import annotations

__all__ = [
"is_txt_record_quoted",
"format_txt_record",
]


def is_txt_record_quoted(value: str) -> bool:
"""
Expand Down
7 changes: 7 additions & 0 deletions hcloud/firewalls/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
from .._client import Client


__all__ = [
"BoundFirewall",
"FirewallsPageResult",
"FirewallsClient",
]


class BoundFirewall(BoundModelBase[Firewall], Firewall):
_client: FirewallsClient

Expand Down
10 changes: 10 additions & 0 deletions hcloud/firewalls/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@
from .client import BoundFirewall


__all__ = [
"Firewall",
"FirewallRule",
"FirewallResource",
"FirewallResourceAppliedToResources",
"FirewallResourceLabelSelector",
"CreateFirewallResponse",
]


class Firewall(BaseDomain, DomainIdentityMixin):
"""Firewall Domain

Expand Down
3 changes: 2 additions & 1 deletion hcloud/floating_ips/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
FloatingIPsClient,
FloatingIPsPageResult,
)
from .domain import CreateFloatingIPResponse, FloatingIP
from .domain import CreateFloatingIPResponse, FloatingIP, FloatingIPProtection

__all__ = [
"BoundFloatingIP",
"CreateFloatingIPResponse",
"FloatingIP",
"FloatingIPProtection",
"FloatingIPsClient",
"FloatingIPsPageResult",
]
6 changes: 6 additions & 0 deletions hcloud/floating_ips/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
from ..locations import Location
from ..servers import BoundServer, Server

__all__ = [
"BoundFloatingIP",
"FloatingIPsPageResult",
"FloatingIPsClient",
]


class BoundFloatingIP(BoundModelBase[FloatingIP], FloatingIP):
_client: FloatingIPsClient
Expand Down
7 changes: 7 additions & 0 deletions hcloud/floating_ips/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@
from .client import BoundFloatingIP


__all__ = [
"FloatingIP",
"FloatingIPProtection",
"CreateFloatingIPResponse",
]


class FloatingIP(BaseDomain, DomainIdentityMixin):
"""Floating IP Domain

Expand Down
4 changes: 3 additions & 1 deletion hcloud/helpers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

from .labels import LabelValidator

__all__ = ["LabelValidator"]
__all__ = [
"LabelValidator",
]
4 changes: 4 additions & 0 deletions hcloud/helpers/labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

import re

__all__ = [
"LabelValidator",
]


class LabelValidator:
KEY_REGEX = re.compile(
Expand Down
3 changes: 2 additions & 1 deletion hcloud/images/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from __future__ import annotations

from .client import BoundImage, ImagesClient, ImagesPageResult
from .domain import CreateImageResponse, Image
from .domain import CreateImageResponse, Image, ImageProtection

__all__ = [
"BoundImage",
"CreateImageResponse",
"Image",
"ImageProtection",
"ImagesClient",
"ImagesPageResult",
]
7 changes: 7 additions & 0 deletions hcloud/images/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
from .._client import Client


__all__ = [
"BoundImage",
"ImagesPageResult",
"ImagesClient",
]


class BoundImage(BoundModelBase[Image], Image):
_client: ImagesClient

Expand Down
7 changes: 7 additions & 0 deletions hcloud/images/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
from .client import BoundImage


__all__ = [
"Image",
"ImageProtection",
"CreateImageResponse",
]


class Image(BaseDomain, DomainIdentityMixin):
"""Image Domain

Expand Down
6 changes: 6 additions & 0 deletions hcloud/isos/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
from ..core import BoundModelBase, Meta, ResourceClientBase
from .domain import Iso

__all__ = [
"BoundIso",
"IsosPageResult",
"IsosClient",
]


class BoundIso(BoundModelBase[Iso], Iso):
_client: IsosClient
Expand Down
4 changes: 4 additions & 0 deletions hcloud/isos/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
from ..core import BaseDomain, DomainIdentityMixin
from ..deprecation import DeprecationInfo

__all__ = [
"Iso",
]


class Iso(BaseDomain, DomainIdentityMixin):
"""Iso Domain
Expand Down
6 changes: 6 additions & 0 deletions hcloud/load_balancer_types/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
from ..core import BoundModelBase, Meta, ResourceClientBase
from .domain import LoadBalancerType

__all__ = [
"BoundLoadBalancerType",
"LoadBalancerTypesPageResult",
"LoadBalancerTypesClient",
]


class BoundLoadBalancerType(BoundModelBase[LoadBalancerType], LoadBalancerType):
_client: LoadBalancerTypesClient
Expand Down
4 changes: 4 additions & 0 deletions hcloud/load_balancer_types/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

from ..core import BaseDomain, DomainIdentityMixin

__all__ = [
"LoadBalancerType",
]


class LoadBalancerType(BaseDomain, DomainIdentityMixin):
"""LoadBalancerType Domain
Expand Down
Loading
Loading