From fb5eb7042b59f4490fbe591531a5e60b09584fe3 Mon Sep 17 00:00:00 2001 From: jo Date: Fri, 19 Dec 2025 16:04:20 +0100 Subject: [PATCH 1/2] chore: define __all__ for all modules --- hcloud/__init__.py | 24 +++++++++++++++--------- hcloud/actions/client.py | 9 +++++++++ hcloud/actions/domain.py | 10 ++++++++++ hcloud/certificates/client.py | 7 +++++++ hcloud/certificates/domain.py | 8 ++++++++ hcloud/core/client.py | 6 ++++++ hcloud/core/domain.py | 7 +++++++ hcloud/datacenters/client.py | 6 ++++++ hcloud/datacenters/domain.py | 5 +++++ hcloud/deprecation/domain.py | 4 ++++ hcloud/exp/zone.py | 5 +++++ hcloud/firewalls/client.py | 7 +++++++ hcloud/firewalls/domain.py | 10 ++++++++++ hcloud/floating_ips/client.py | 6 ++++++ hcloud/floating_ips/domain.py | 7 +++++++ hcloud/helpers/labels.py | 4 ++++ hcloud/images/client.py | 7 +++++++ hcloud/images/domain.py | 7 +++++++ hcloud/isos/client.py | 6 ++++++ hcloud/isos/domain.py | 4 ++++ hcloud/load_balancer_types/client.py | 6 ++++++ hcloud/load_balancer_types/domain.py | 4 ++++ hcloud/load_balancers/client.py | 7 +++++++ hcloud/load_balancers/domain.py | 23 +++++++++++++++++++++++ hcloud/locations/client.py | 6 ++++++ hcloud/locations/domain.py | 4 ++++ hcloud/metrics/domain.py | 6 ++++++ hcloud/networks/client.py | 7 +++++++ hcloud/networks/domain.py | 8 ++++++++ hcloud/placement_groups/client.py | 6 ++++++ hcloud/placement_groups/domain.py | 5 +++++ hcloud/primary_ips/client.py | 7 +++++++ hcloud/primary_ips/domain.py | 6 ++++++ hcloud/rdns/domain.py | 4 ++++ hcloud/server_types/client.py | 6 ++++++ hcloud/server_types/domain.py | 5 +++++ hcloud/servers/client.py | 7 +++++++ hcloud/servers/domain.py | 19 +++++++++++++++++++ hcloud/ssh_keys/client.py | 6 ++++++ hcloud/ssh_keys/domain.py | 4 ++++ hcloud/storage_box_types/client.py | 6 ++++++ hcloud/storage_box_types/domain.py | 4 ++++ hcloud/storage_boxes/client.py | 10 ++++++++++ hcloud/storage_boxes/domain.py | 20 ++++++++++++++++++++ hcloud/volumes/client.py | 7 +++++++ hcloud/volumes/domain.py | 6 ++++++ hcloud/zones/client.py | 8 ++++++++ hcloud/zones/domain.py | 18 ++++++++++++++++++ 48 files changed, 365 insertions(+), 9 deletions(-) diff --git a/hcloud/__init__.py b/hcloud/__init__.py index 95709bb0..8a9fa148 100644 --- a/hcloud/__init__.py +++ b/hcloud/__init__.py @@ -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", +] diff --git a/hcloud/actions/client.py b/hcloud/actions/client.py index 26924ec1..176a6b18 100644 --- a/hcloud/actions/client.py +++ b/hcloud/actions/client.py @@ -11,6 +11,15 @@ from .._client import Client +__all__ = [ + "ActionsClient", + "ActionsPageResult", + "BoundAction", + "ResourceActionsClient", + "ActionSort", +] + + class BoundAction(BoundModelBase[Action], Action): _client: ActionsClient diff --git a/hcloud/actions/domain.py b/hcloud/actions/domain.py index 99267599..59b7f442 100644 --- a/hcloud/actions/domain.py +++ b/hcloud/actions/domain.py @@ -8,6 +8,16 @@ if TYPE_CHECKING: from .client import BoundAction +__all__ = [ + "ActionStatus", + "Action", + "ActionResource", + "ActionError", + "ActionException", + "ActionFailedException", + "ActionTimeoutException", +] + ActionStatus = Literal[ "running", "success", diff --git a/hcloud/certificates/client.py b/hcloud/certificates/client.py index cf89196d..46a6a538 100644 --- a/hcloud/certificates/client.py +++ b/hcloud/certificates/client.py @@ -22,6 +22,13 @@ from .._client import Client +__all__ = [ + "BoundCertificate", + "CertificatesPageResult", + "CertificatesClient", +] + + class BoundCertificate(BoundModelBase[Certificate], Certificate): _client: CertificatesClient diff --git a/hcloud/certificates/domain.py b/hcloud/certificates/domain.py index 455ea4ad..677ab8f2 100644 --- a/hcloud/certificates/domain.py +++ b/hcloud/certificates/domain.py @@ -9,6 +9,14 @@ from .client import BoundCertificate +__all__ = [ + "Certificate", + "ManagedCertificateStatus", + "ManagedCertificateError", + "CreateManagedCertificateResponse", +] + + class Certificate(BaseDomain, DomainIdentityMixin): """Certificate Domain diff --git a/hcloud/core/client.py b/hcloud/core/client.py index 86bb1bb7..4ff7f240 100644 --- a/hcloud/core/client.py +++ b/hcloud/core/client.py @@ -10,6 +10,12 @@ from .._client import Client, ClientBase from .domain import Meta +__all__ = [ + "ResourceClientBase", + "ClientEntityBase", + "BoundModelBase", +] + T = TypeVar("T") diff --git a/hcloud/core/domain.py b/hcloud/core/domain.py index de75ffc5..6659df80 100644 --- a/hcloud/core/domain.py +++ b/hcloud/core/domain.py @@ -5,6 +5,13 @@ from dateutil.parser import isoparse +__all__ = [ + "BaseDomain", + "DomainIdentityMixin", + "Pagination", + "Meta", +] + class BaseDomain: __api_properties__: tuple[str, ...] diff --git a/hcloud/datacenters/client.py b/hcloud/datacenters/client.py index 192abaf5..5d7fe964 100644 --- a/hcloud/datacenters/client.py +++ b/hcloud/datacenters/client.py @@ -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 diff --git a/hcloud/datacenters/domain.py b/hcloud/datacenters/domain.py index badd335d..4867915d 100644 --- a/hcloud/datacenters/domain.py +++ b/hcloud/datacenters/domain.py @@ -8,6 +8,11 @@ from ..locations import Location from ..server_types import BoundServerType +__all__ = [ + "Datacenter", + "DatacenterServerTypes", +] + class Datacenter(BaseDomain, DomainIdentityMixin): """Datacenter Domain diff --git a/hcloud/deprecation/domain.py b/hcloud/deprecation/domain.py index c34915b3..c78c43e6 100644 --- a/hcloud/deprecation/domain.py +++ b/hcloud/deprecation/domain.py @@ -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 diff --git a/hcloud/exp/zone.py b/hcloud/exp/zone.py index 08601286..c8dd3d01 100644 --- a/hcloud/exp/zone.py +++ b/hcloud/exp/zone.py @@ -5,6 +5,11 @@ from __future__ import annotations +__all__ = [ + "is_txt_record_quoted", + "format_txt_record", +] + def is_txt_record_quoted(value: str) -> bool: """ diff --git a/hcloud/firewalls/client.py b/hcloud/firewalls/client.py index 883c2dde..f314b68a 100644 --- a/hcloud/firewalls/client.py +++ b/hcloud/firewalls/client.py @@ -24,6 +24,13 @@ from .._client import Client +__all__ = [ + "BoundFirewall", + "FirewallsPageResult", + "FirewallsClient", +] + + class BoundFirewall(BoundModelBase[Firewall], Firewall): _client: FirewallsClient diff --git a/hcloud/firewalls/domain.py b/hcloud/firewalls/domain.py index d644a051..76a9b596 100644 --- a/hcloud/firewalls/domain.py +++ b/hcloud/firewalls/domain.py @@ -10,6 +10,16 @@ from .client import BoundFirewall +__all__ = [ + "Firewall", + "FirewallRule", + "FirewallResource", + "FirewallResourceAppliedToResources", + "FirewallResourceLabelSelector", + "CreateFirewallResponse", +] + + class Firewall(BaseDomain, DomainIdentityMixin): """Firewall Domain diff --git a/hcloud/floating_ips/client.py b/hcloud/floating_ips/client.py index 0ce29dd3..88e7ea42 100644 --- a/hcloud/floating_ips/client.py +++ b/hcloud/floating_ips/client.py @@ -19,6 +19,12 @@ from ..locations import Location from ..servers import BoundServer, Server +__all__ = [ + "BoundFloatingIP", + "FloatingIPsPageResult", + "FloatingIPsClient", +] + class BoundFloatingIP(BoundModelBase[FloatingIP], FloatingIP): _client: FloatingIPsClient diff --git a/hcloud/floating_ips/domain.py b/hcloud/floating_ips/domain.py index 6d24e77f..3946da7b 100644 --- a/hcloud/floating_ips/domain.py +++ b/hcloud/floating_ips/domain.py @@ -12,6 +12,13 @@ from .client import BoundFloatingIP +__all__ = [ + "FloatingIP", + "FloatingIPProtection", + "CreateFloatingIPResponse", +] + + class FloatingIP(BaseDomain, DomainIdentityMixin): """Floating IP Domain diff --git a/hcloud/helpers/labels.py b/hcloud/helpers/labels.py index 36041578..78f43142 100644 --- a/hcloud/helpers/labels.py +++ b/hcloud/helpers/labels.py @@ -2,6 +2,10 @@ import re +__all__ = [ + "LabelValidator", +] + class LabelValidator: KEY_REGEX = re.compile( diff --git a/hcloud/images/client.py b/hcloud/images/client.py index 9d9d6f1e..2566a96f 100644 --- a/hcloud/images/client.py +++ b/hcloud/images/client.py @@ -18,6 +18,13 @@ from .._client import Client +__all__ = [ + "BoundImage", + "ImagesPageResult", + "ImagesClient", +] + + class BoundImage(BoundModelBase[Image], Image): _client: ImagesClient diff --git a/hcloud/images/domain.py b/hcloud/images/domain.py index ee653628..915ace64 100644 --- a/hcloud/images/domain.py +++ b/hcloud/images/domain.py @@ -10,6 +10,13 @@ from .client import BoundImage +__all__ = [ + "Image", + "ImageProtection", + "CreateImageResponse", +] + + class Image(BaseDomain, DomainIdentityMixin): """Image Domain diff --git a/hcloud/isos/client.py b/hcloud/isos/client.py index 9c5ea5ac..b9c3a5a0 100644 --- a/hcloud/isos/client.py +++ b/hcloud/isos/client.py @@ -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 diff --git a/hcloud/isos/domain.py b/hcloud/isos/domain.py index c3ebd662..5fd50c6e 100644 --- a/hcloud/isos/domain.py +++ b/hcloud/isos/domain.py @@ -7,6 +7,10 @@ from ..core import BaseDomain, DomainIdentityMixin from ..deprecation import DeprecationInfo +__all__ = [ + "Iso", +] + class Iso(BaseDomain, DomainIdentityMixin): """Iso Domain diff --git a/hcloud/load_balancer_types/client.py b/hcloud/load_balancer_types/client.py index b639a37d..87d44e2f 100644 --- a/hcloud/load_balancer_types/client.py +++ b/hcloud/load_balancer_types/client.py @@ -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 diff --git a/hcloud/load_balancer_types/domain.py b/hcloud/load_balancer_types/domain.py index 8492ea7b..1e594e94 100644 --- a/hcloud/load_balancer_types/domain.py +++ b/hcloud/load_balancer_types/domain.py @@ -4,6 +4,10 @@ from ..core import BaseDomain, DomainIdentityMixin +__all__ = [ + "LoadBalancerType", +] + class LoadBalancerType(BaseDomain, DomainIdentityMixin): """LoadBalancerType Domain diff --git a/hcloud/load_balancers/client.py b/hcloud/load_balancers/client.py index e7305f22..1986905b 100644 --- a/hcloud/load_balancers/client.py +++ b/hcloud/load_balancers/client.py @@ -47,6 +47,13 @@ from ..networks import Network +__all__ = [ + "BoundLoadBalancer", + "LoadBalancersPageResult", + "LoadBalancersClient", +] + + class BoundLoadBalancer(BoundModelBase[LoadBalancer], LoadBalancer): _client: LoadBalancersClient diff --git a/hcloud/load_balancers/domain.py b/hcloud/load_balancers/domain.py index a5b62b50..c02e1100 100644 --- a/hcloud/load_balancers/domain.py +++ b/hcloud/load_balancers/domain.py @@ -16,6 +16,29 @@ from .client import BoundLoadBalancer +__all__ = [ + "LoadBalancer", + "LoadBalancerProtection", + "LoadBalancerService", + "LoadBalancerServiceHttp", + "LoadBalancerHealthCheck", + "LoadBalancerHealthCheckHttp", + "LoadBalancerHealtCheckHttp", + "LoadBalancerTarget", + "LoadBalancerTargetHealthStatus", + "LoadBalancerTargetLabelSelector", + "LoadBalancerTargetIP", + "LoadBalancerAlgorithm", + "PublicNetwork", + "IPv4Address", + "IPv6Network", + "PrivateNet", + "CreateLoadBalancerResponse", + "GetMetricsResponse", + "MetricsType", +] + + class LoadBalancer(BaseDomain, DomainIdentityMixin): """LoadBalancer Domain diff --git a/hcloud/locations/client.py b/hcloud/locations/client.py index 8c7b5e5e..5a71c0f6 100644 --- a/hcloud/locations/client.py +++ b/hcloud/locations/client.py @@ -5,6 +5,12 @@ from ..core import BoundModelBase, Meta, ResourceClientBase from .domain import Location +__all__ = [ + "BoundLocation", + "LocationsPageResult", + "LocationsClient", +] + class BoundLocation(BoundModelBase[Location], Location): _client: LocationsClient diff --git a/hcloud/locations/domain.py b/hcloud/locations/domain.py index dcdf7a95..b33b157b 100644 --- a/hcloud/locations/domain.py +++ b/hcloud/locations/domain.py @@ -2,6 +2,10 @@ from ..core import BaseDomain, DomainIdentityMixin +__all__ = [ + "Location", +] + class Location(BaseDomain, DomainIdentityMixin): """Location Domain diff --git a/hcloud/metrics/domain.py b/hcloud/metrics/domain.py index 69091d27..3213e279 100644 --- a/hcloud/metrics/domain.py +++ b/hcloud/metrics/domain.py @@ -5,6 +5,12 @@ from ..core import BaseDomain +__all__ = [ + "TimeSeries", + "Metrics", +] + + TimeSeries = dict[str, dict[Literal["values"], list[tuple[float, str]]]] diff --git a/hcloud/networks/client.py b/hcloud/networks/client.py index 54d04cbd..73b33e5d 100644 --- a/hcloud/networks/client.py +++ b/hcloud/networks/client.py @@ -17,6 +17,13 @@ from .._client import Client +__all__ = [ + "BoundNetwork", + "NetworksPageResult", + "NetworksClient", +] + + class BoundNetwork(BoundModelBase[Network], Network): _client: NetworksClient diff --git a/hcloud/networks/domain.py b/hcloud/networks/domain.py index 9f14a579..80c3badc 100644 --- a/hcloud/networks/domain.py +++ b/hcloud/networks/domain.py @@ -10,6 +10,14 @@ from ..servers import BoundServer from .client import BoundNetwork +__all__ = [ + "Network", + "NetworkProtection", + "NetworkSubnet", + "NetworkRoute", + "CreateNetworkResponse", +] + class Network(BaseDomain, DomainIdentityMixin): """Network Domain diff --git a/hcloud/placement_groups/client.py b/hcloud/placement_groups/client.py index f59e7e6c..041118d8 100644 --- a/hcloud/placement_groups/client.py +++ b/hcloud/placement_groups/client.py @@ -6,6 +6,12 @@ from ..core import BoundModelBase, Meta, ResourceClientBase from .domain import CreatePlacementGroupResponse, PlacementGroup +__all__ = [ + "BoundPlacementGroup", + "PlacementGroupsPageResult", + "PlacementGroupsClient", +] + class BoundPlacementGroup(BoundModelBase[PlacementGroup], PlacementGroup): _client: PlacementGroupsClient diff --git a/hcloud/placement_groups/domain.py b/hcloud/placement_groups/domain.py index 59958ace..1dc9b9dd 100644 --- a/hcloud/placement_groups/domain.py +++ b/hcloud/placement_groups/domain.py @@ -8,6 +8,11 @@ from ..actions import BoundAction from .client import BoundPlacementGroup +__all__ = [ + "PlacementGroup", + "CreatePlacementGroupResponse", +] + class PlacementGroup(BaseDomain, DomainIdentityMixin): """Placement Group Domain diff --git a/hcloud/primary_ips/client.py b/hcloud/primary_ips/client.py index 15acdbf6..6d6693dc 100644 --- a/hcloud/primary_ips/client.py +++ b/hcloud/primary_ips/client.py @@ -20,6 +20,13 @@ from ..locations import BoundLocation, Location +__all__ = [ + "BoundPrimaryIP", + "PrimaryIPsPageResult", + "PrimaryIPsClient", +] + + class BoundPrimaryIP(BoundModelBase[PrimaryIP], PrimaryIP): _client: PrimaryIPsClient diff --git a/hcloud/primary_ips/domain.py b/hcloud/primary_ips/domain.py index 58cd596f..96749be2 100644 --- a/hcloud/primary_ips/domain.py +++ b/hcloud/primary_ips/domain.py @@ -12,6 +12,12 @@ from ..rdns import DNSPtr from .client import BoundPrimaryIP +__all__ = [ + "PrimaryIP", + "PrimaryIPProtection", + "CreatePrimaryIPResponse", +] + class PrimaryIP(BaseDomain, DomainIdentityMixin): """Primary IP Domain diff --git a/hcloud/rdns/domain.py b/hcloud/rdns/domain.py index 0f8b0341..e0e5ac66 100644 --- a/hcloud/rdns/domain.py +++ b/hcloud/rdns/domain.py @@ -2,6 +2,10 @@ from typing import TypedDict +__all__ = [ + "DNSPtr", +] + class DNSPtr(TypedDict): ip: str diff --git a/hcloud/server_types/client.py b/hcloud/server_types/client.py index 33f5ebda..98da70af 100644 --- a/hcloud/server_types/client.py +++ b/hcloud/server_types/client.py @@ -6,6 +6,12 @@ from ..locations import BoundLocation from .domain import ServerType, ServerTypeLocation +__all__ = [ + "BoundServerType", + "ServerTypesPageResult", + "ServerTypesClient", +] + class BoundServerType(BoundModelBase[ServerType], ServerType): _client: ServerTypesClient diff --git a/hcloud/server_types/domain.py b/hcloud/server_types/domain.py index 1c470636..279d928d 100644 --- a/hcloud/server_types/domain.py +++ b/hcloud/server_types/domain.py @@ -7,6 +7,11 @@ from ..deprecation import DeprecationInfo from ..locations import BoundLocation +__all__ = [ + "ServerType", + "ServerTypeLocation", +] + class ServerType(BaseDomain, DomainIdentityMixin): """ServerType Domain diff --git a/hcloud/servers/client.py b/hcloud/servers/client.py index 847aa88a..cd3c2b07 100644 --- a/hcloud/servers/client.py +++ b/hcloud/servers/client.py @@ -56,6 +56,13 @@ from .domain import ServerCreatePublicNetwork +__all__ = [ + "BoundServer", + "ServersPageResult", + "ServersClient", +] + + class BoundServer(BoundModelBase[Server], Server): _client: ServersClient diff --git a/hcloud/servers/domain.py b/hcloud/servers/domain.py index 1a052886..ec019e4e 100644 --- a/hcloud/servers/domain.py +++ b/hcloud/servers/domain.py @@ -23,6 +23,25 @@ from .client import BoundServer +__all__ = [ + "Server", + "ServerProtection", + "CreateServerResponse", + "ResetPasswordResponse", + "EnableRescueResponse", + "RequestConsoleResponse", + "RebuildResponse", + "PublicNetwork", + "PublicNetworkFirewall", + "IPv4Address", + "IPv6Network", + "PrivateNet", + "ServerCreatePublicNetwork", + "GetMetricsResponse", + "MetricsType", +] + + class Server(BaseDomain, DomainIdentityMixin): """Server Domain diff --git a/hcloud/ssh_keys/client.py b/hcloud/ssh_keys/client.py index fe2be196..d88800a1 100644 --- a/hcloud/ssh_keys/client.py +++ b/hcloud/ssh_keys/client.py @@ -5,6 +5,12 @@ from ..core import BoundModelBase, Meta, ResourceClientBase from .domain import SSHKey +__all__ = [ + "BoundSSHKey", + "SSHKeysPageResult", + "SSHKeysClient", +] + class BoundSSHKey(BoundModelBase[SSHKey], SSHKey): _client: SSHKeysClient diff --git a/hcloud/ssh_keys/domain.py b/hcloud/ssh_keys/domain.py index 1d957ba1..c3fc7c60 100644 --- a/hcloud/ssh_keys/domain.py +++ b/hcloud/ssh_keys/domain.py @@ -2,6 +2,10 @@ from ..core import BaseDomain, DomainIdentityMixin +__all__ = [ + "SSHKey", +] + class SSHKey(BaseDomain, DomainIdentityMixin): """SSHKey Domain diff --git a/hcloud/storage_box_types/client.py b/hcloud/storage_box_types/client.py index 2f001e27..25c1e890 100644 --- a/hcloud/storage_box_types/client.py +++ b/hcloud/storage_box_types/client.py @@ -8,6 +8,12 @@ if TYPE_CHECKING: from .._client import Client +__all__ = [ + "BoundStorageBoxType", + "StorageBoxTypesPageResult", + "StorageBoxTypesClient", +] + class BoundStorageBoxType(BoundModelBase[StorageBoxType], StorageBoxType): _client: StorageBoxTypesClient diff --git a/hcloud/storage_box_types/domain.py b/hcloud/storage_box_types/domain.py index dc90a8d4..b393b153 100644 --- a/hcloud/storage_box_types/domain.py +++ b/hcloud/storage_box_types/domain.py @@ -5,6 +5,10 @@ from ..core import BaseDomain, DomainIdentityMixin from ..deprecation import DeprecationInfo +__all__ = [ + "StorageBoxType", +] + class StorageBoxType(BaseDomain, DomainIdentityMixin): """ diff --git a/hcloud/storage_boxes/client.py b/hcloud/storage_boxes/client.py index 299ce204..4d258b97 100644 --- a/hcloud/storage_boxes/client.py +++ b/hcloud/storage_boxes/client.py @@ -35,6 +35,16 @@ if TYPE_CHECKING: from .._client import Client +__all__ = [ + "BoundStorageBox", + "BoundStorageBoxSnapshot", + "BoundStorageBoxSubaccount", + "StorageBoxesPageResult", + "StorageBoxSnapshotsPageResult", + "StorageBoxSubaccountsPageResult", + "StorageBoxesClient", +] + class BoundStorageBox(BoundModelBase[StorageBox], StorageBox): _client: StorageBoxesClient diff --git a/hcloud/storage_boxes/domain.py b/hcloud/storage_boxes/domain.py index 85470954..03eaab1f 100644 --- a/hcloud/storage_boxes/domain.py +++ b/hcloud/storage_boxes/domain.py @@ -14,6 +14,26 @@ BoundStorageBoxSubaccount, ) +__all__ = [ + "StorageBox", + "StorageBoxAccessSettings", + "StorageBoxStats", + "StorageBoxSnapshotPlan", + "CreateStorageBoxResponse", + "DeleteStorageBoxResponse", + "StorageBoxFoldersResponse", + "StorageBoxSnapshot", + "StorageBoxSnapshotStats", + "CreateStorageBoxSnapshotResponse", + "DeleteStorageBoxSnapshotResponse", + "StorageBoxSubaccount", + "StorageBoxSubaccountAccessSettings", + "CreateStorageBoxSubaccountResponse", + "DeleteStorageBoxSubaccountResponse", + "StorageBoxStatus", +] + + StorageBoxStatus = Literal[ "active", "initializing", diff --git a/hcloud/volumes/client.py b/hcloud/volumes/client.py index 84900eb3..a4155cf2 100644 --- a/hcloud/volumes/client.py +++ b/hcloud/volumes/client.py @@ -20,6 +20,13 @@ from ..servers import BoundServer, Server +__all__ = [ + "BoundVolume", + "VolumesPageResult", + "VolumesClient", +] + + class BoundVolume(BoundModelBase[Volume], Volume): _client: VolumesClient diff --git a/hcloud/volumes/domain.py b/hcloud/volumes/domain.py index 1e2e4379..2ed33338 100644 --- a/hcloud/volumes/domain.py +++ b/hcloud/volumes/domain.py @@ -10,6 +10,12 @@ from ..servers import BoundServer, Server from .client import BoundVolume +__all__ = [ + "Volume", + "VolumeProtection", + "CreateVolumeResponse", +] + class Volume(BaseDomain, DomainIdentityMixin): """Volume Domain diff --git a/hcloud/zones/client.py b/hcloud/zones/client.py index e6a3ac3c..2f680286 100644 --- a/hcloud/zones/client.py +++ b/hcloud/zones/client.py @@ -29,6 +29,14 @@ if TYPE_CHECKING: from .._client import Client +__all__ = [ + "BoundZone", + "BoundZoneRRSet", + "ZonesPageResult", + "ZoneRRSetsPageResult", + "ZonesClient", +] + class BoundZone(BoundModelBase[Zone], Zone): _client: ZonesClient diff --git a/hcloud/zones/domain.py b/hcloud/zones/domain.py index ad24035f..77aee489 100644 --- a/hcloud/zones/domain.py +++ b/hcloud/zones/domain.py @@ -9,6 +9,24 @@ from .client import BoundZone, BoundZoneRRSet +__all__ = [ + "ZoneMode", + "ZoneStatus", + "ZoneRegistrar", + "Zone", + "ZonePrimaryNameserver", + "ZoneAuthoritativeNameservers", + "ZoneProtection", + "CreateZoneResponse", + "DeleteZoneResponse", + "ExportZonefileResponse", + "ZoneRRSet", + "ZoneRRSetProtection", + "ZoneRecord", + "CreateZoneRRSetResponse", + "DeleteZoneRRSetResponse", +] + ZoneMode = Literal["primary", "secondary"] ZoneStatus = Literal["ok", "updating", "error"] ZoneRegistrar = Literal["hetzner", "other", "unknown"] From 00c29dc3fc36822d180f3aed745dfb8c0552b4a5 Mon Sep 17 00:00:00 2001 From: jo Date: Fri, 19 Dec 2025 16:27:08 +0100 Subject: [PATCH 2/2] chore: update missing export in __init__ --- hcloud/actions/__init__.py | 16 ++++++++++------ hcloud/deprecation/__init__.py | 4 +++- hcloud/floating_ips/__init__.py | 3 ++- hcloud/helpers/__init__.py | 4 +++- hcloud/images/__init__.py | 3 ++- hcloud/load_balancers/__init__.py | 4 ++++ hcloud/networks/__init__.py | 2 ++ hcloud/primary_ips/__init__.py | 3 ++- hcloud/servers/__init__.py | 6 ++++++ hcloud/volumes/__init__.py | 3 ++- hcloud/zones/__init__.py | 20 ++++++++++++++++++++ 11 files changed, 56 insertions(+), 12 deletions(-) diff --git a/hcloud/actions/__init__.py b/hcloud/actions/__init__.py index 653ad9bd..ac677936 100644 --- a/hcloud/actions/__init__.py +++ b/hcloud/actions/__init__.py @@ -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", ] diff --git a/hcloud/deprecation/__init__.py b/hcloud/deprecation/__init__.py index db30b0fb..4dd0e91f 100644 --- a/hcloud/deprecation/__init__.py +++ b/hcloud/deprecation/__init__.py @@ -2,4 +2,6 @@ from .domain import DeprecationInfo -__all__ = ["DeprecationInfo"] +__all__ = [ + "DeprecationInfo", +] diff --git a/hcloud/floating_ips/__init__.py b/hcloud/floating_ips/__init__.py index 8c45c774..5ae08fca 100644 --- a/hcloud/floating_ips/__init__.py +++ b/hcloud/floating_ips/__init__.py @@ -5,12 +5,13 @@ FloatingIPsClient, FloatingIPsPageResult, ) -from .domain import CreateFloatingIPResponse, FloatingIP +from .domain import CreateFloatingIPResponse, FloatingIP, FloatingIPProtection __all__ = [ "BoundFloatingIP", "CreateFloatingIPResponse", "FloatingIP", + "FloatingIPProtection", "FloatingIPsClient", "FloatingIPsPageResult", ] diff --git a/hcloud/helpers/__init__.py b/hcloud/helpers/__init__.py index 044703bf..e8ec1dcb 100644 --- a/hcloud/helpers/__init__.py +++ b/hcloud/helpers/__init__.py @@ -2,4 +2,6 @@ from .labels import LabelValidator -__all__ = ["LabelValidator"] +__all__ = [ + "LabelValidator", +] diff --git a/hcloud/images/__init__.py b/hcloud/images/__init__.py index 071a92bc..c299722c 100644 --- a/hcloud/images/__init__.py +++ b/hcloud/images/__init__.py @@ -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", ] diff --git a/hcloud/load_balancers/__init__.py b/hcloud/load_balancers/__init__.py index f84c7e20..9b07d026 100644 --- a/hcloud/load_balancers/__init__.py +++ b/hcloud/load_balancers/__init__.py @@ -15,12 +15,14 @@ LoadBalancerHealtCheckHttp, LoadBalancerHealthCheck, LoadBalancerHealthCheckHttp, + LoadBalancerProtection, LoadBalancerService, LoadBalancerServiceHttp, LoadBalancerTarget, LoadBalancerTargetHealthStatus, LoadBalancerTargetIP, LoadBalancerTargetLabelSelector, + MetricsType, PrivateNet, PublicNetwork, ) @@ -32,6 +34,7 @@ "IPv4Address", "IPv6Network", "LoadBalancer", + "LoadBalancerProtection", "LoadBalancerAlgorithm", "LoadBalancerHealtCheckHttp", "LoadBalancerHealthCheckHttp", @@ -46,4 +49,5 @@ "LoadBalancersPageResult", "PrivateNet", "PublicNetwork", + "MetricsType", ] diff --git a/hcloud/networks/__init__.py b/hcloud/networks/__init__.py index fc86564b..f49b9934 100644 --- a/hcloud/networks/__init__.py +++ b/hcloud/networks/__init__.py @@ -4,6 +4,7 @@ from .domain import ( CreateNetworkResponse, Network, + NetworkProtection, NetworkRoute, NetworkSubnet, ) @@ -12,6 +13,7 @@ "BoundNetwork", "CreateNetworkResponse", "Network", + "NetworkProtection", "NetworkRoute", "NetworkSubnet", "NetworksClient", diff --git a/hcloud/primary_ips/__init__.py b/hcloud/primary_ips/__init__.py index 3dc5ed0a..99974046 100644 --- a/hcloud/primary_ips/__init__.py +++ b/hcloud/primary_ips/__init__.py @@ -1,12 +1,13 @@ from __future__ import annotations from .client import BoundPrimaryIP, PrimaryIPsClient, PrimaryIPsPageResult -from .domain import CreatePrimaryIPResponse, PrimaryIP +from .domain import CreatePrimaryIPResponse, PrimaryIP, PrimaryIPProtection __all__ = [ "BoundPrimaryIP", "CreatePrimaryIPResponse", "PrimaryIP", + "PrimaryIPProtection", "PrimaryIPsClient", "PrimaryIPsPageResult", ] diff --git a/hcloud/servers/__init__.py b/hcloud/servers/__init__.py index 0b02a110..c71c63ef 100644 --- a/hcloud/servers/__init__.py +++ b/hcloud/servers/__init__.py @@ -7,13 +7,16 @@ GetMetricsResponse, IPv4Address, IPv6Network, + MetricsType, PrivateNet, PublicNetwork, PublicNetworkFirewall, + RebuildResponse, RequestConsoleResponse, ResetPasswordResponse, Server, ServerCreatePublicNetwork, + ServerProtection, ) __all__ = [ @@ -29,7 +32,10 @@ "RequestConsoleResponse", "ResetPasswordResponse", "Server", + "ServerProtection", "ServerCreatePublicNetwork", "ServersClient", "ServersPageResult", + "RebuildResponse", + "MetricsType", ] diff --git a/hcloud/volumes/__init__.py b/hcloud/volumes/__init__.py index 046df102..17226236 100644 --- a/hcloud/volumes/__init__.py +++ b/hcloud/volumes/__init__.py @@ -1,12 +1,13 @@ from __future__ import annotations from .client import BoundVolume, VolumesClient, VolumesPageResult -from .domain import CreateVolumeResponse, Volume +from .domain import CreateVolumeResponse, Volume, VolumeProtection __all__ = [ "BoundVolume", "CreateVolumeResponse", "Volume", + "VolumeProtection", "VolumesClient", "VolumesPageResult", ] diff --git a/hcloud/zones/__init__.py b/hcloud/zones/__init__.py index 7871e100..4cbee7fb 100644 --- a/hcloud/zones/__init__.py +++ b/hcloud/zones/__init__.py @@ -3,16 +3,26 @@ from .client import ( BoundZone, BoundZoneRRSet, + ZoneRRSetsPageResult, ZonesClient, ZonesPageResult, ) from .domain import ( CreateZoneResponse, + CreateZoneRRSetResponse, + DeleteZoneResponse, + DeleteZoneRRSetResponse, + ExportZonefileResponse, Zone, ZoneAuthoritativeNameservers, + ZoneMode, ZonePrimaryNameserver, + ZoneProtection, ZoneRecord, + ZoneRegistrar, ZoneRRSet, + ZoneRRSetProtection, + ZoneStatus, ) __all__ = [ @@ -26,4 +36,14 @@ "ZoneRRSet", "ZonesClient", "ZonesPageResult", + "DeleteZoneRRSetResponse", + "ZoneRRSetProtection", + "DeleteZoneResponse", + "ZoneRegistrar", + "ZoneMode", + "ZoneRRSetsPageResult", + "ZoneProtection", + "ExportZonefileResponse", + "CreateZoneRRSetResponse", + "ZoneStatus", ]