⚠️ I am not affiliated in any way with Contabo
This is an UNOFFICIAL Python API client for contabo.com, which is a hosting provider for VPS and dedicated servers.
The goal of this client is to make management of your server instances more easy using a native Python API for the Contabo API. This Python package is automatically generated by the OpenAPI Generator project.
Python 2.7 and 3.4+
The simplest way to install the Contabo API client is by using the provided pip package:
pip install pfruck-contaboYou can also install the package directly from the GitHub Repo using pip:
pip install git+https://github.com/p-fruck/python-contabo.git(you may need to run pip with root permission: sudo pip install git+https://github.com/p-fruck/python-contabo.git)
Then import the package:
import pfruck_contaboInstall via Setuptools.
python setup.py install --user(or sudo python setup.py install to install the package for all users)
Then import the package:
import pfruck_contaboPlease follow the installation procedure and then run the following:
import pfruck_contabo
from pfruck_contabo.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.contabo.com
# See configuration.py for a list of all supported configuration parameters.
configuration = pfruck_contabo.Configuration(
host = "https://api.contabo.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure Bearer authorization (JWT): bearer
configuration = pfruck_contabo.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with pfruck_contabo.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = pfruck_contabo.ImagesApi(api_client)
x_request_id = '04e0f898-37b4-48bc-a794-1a57abe6aa31' # str | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
create_custom_image_request = pfruck_contabo.CreateCustomImageRequest() # CreateCustomImageRequest |
x_trace_id = 'x_trace_id_example' # str | Identifier to trace group of requests. (optional)
try:
# Provide a custom image
api_response = api_instance.create_custom_image(x_request_id, create_custom_image_request, x_trace_id=x_trace_id)
print("The response of ImagesApi->create_custom_image:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling ImagesApi->create_custom_image: %s\n" % e)All URIs are relative to https://api.contabo.com
- AddOnQuantityRequest
- AddOnRequest
- AddOnResponse
- AdditionalIp
- ApiPermissionsResponse
- ApplicationConfig
- ApplicationRequirements
- ApplicationResponse
- AssignInstancePrivateNetworkResponse
- AssignVipResponse
- AssignedTagResponse
- AssignmentAuditResponse
- AssignmentResponse
- AutoScalingTypeRequest
- AutoScalingTypeResponse
- CancelInstanceResponse
- CancelInstanceResponseData
- CancelObjectStorageResponse
- CancelObjectStorageResponseData
- ClientResponse
- ClientSecretResponse
- CreateAssignmentResponse
- CreateCustomImageFailResponse
- CreateCustomImageRequest
- CreateCustomImageResponse
- CreateCustomImageResponseData
- CreateInstanceAddons
- CreateInstanceRequest
- CreateInstanceResponse
- CreateInstanceResponseData
- CreateObjectStorageRequest
- CreateObjectStorageResponse
- CreateObjectStorageResponseData
- CreatePrivateNetworkRequest
- CreatePrivateNetworkResponse
- CreateRoleRequest
- CreateRoleResponse
- CreateRoleResponseData
- CreateSecretRequest
- CreateSecretResponse
- CreateSnapshotRequest
- CreateSnapshotResponse
- CreateTagRequest
- CreateTagResponse
- CreateTagResponseData
- CreateTicketRequest
- CreateTicketResponse
- CreateTicketResponseData
- CreateUserRequest
- CreateUserResponse
- CreateUserResponseData
- CredentialData
- CustomImagesStatsResponse
- CustomImagesStatsResponseData
- DataCenterResponse
- ExtraStorageRequest
- FindAssignmentResponse
- FindClientResponse
- FindCredentialResponse
- FindImageResponse
- FindInstanceResponse
- FindObjectStorageResponse
- FindPrivateNetworkResponse
- FindRoleResponse
- FindSecretResponse
- FindSnapshotResponse
- FindTagResponse
- FindUserIsPasswordSetResponse
- FindUserResponse
- FindVipResponse
- FindVncResponse
- FirewallingUpgradeRequest
- GenerateClientSecretResponse
- ImageAuditResponse
- ImageAuditResponseData
- ImageResponse
- InstanceAssignmentSelfLinks
- InstanceRescueActionResponse
- InstanceRescueActionResponseData
- InstanceResetPasswordActionResponse
- InstanceResetPasswordActionResponseData
- InstanceResponse
- InstanceRestartActionResponse
- InstanceRestartActionResponseData
- InstanceShutdownActionResponse
- InstanceShutdownActionResponseData
- InstanceStartActionResponse
- InstanceStartActionResponseData
- InstanceStatus
- InstanceStopActionResponse
- InstanceStopActionResponseData
- Instances
- InstancesActionsAuditResponse
- InstancesActionsRescueRequest
- InstancesAuditResponse
- InstancesResetPasswordActionsRequest
- IpConfig
- IpV4
- IpV41
- IpV6
- Links
- ListApiPermissionResponse
- ListApplicationsResponse
- ListAssignmentAuditsResponse
- ListAssignmentResponse
- ListCredentialResponse
- ListDataCenterResponse
- ListImageResponse
- ListImageResponseData
- ListInstancesActionsAuditResponse
- ListInstancesAuditResponse
- ListInstancesResponse
- ListInstancesResponseData
- ListObjectStorageAuditResponse
- ListObjectStorageResponse
- ListPrivateNetworkAuditResponse
- ListPrivateNetworkResponse
- ListPrivateNetworkResponseData
- ListRoleAuditResponse
- ListRoleResponse
- ListSecretAuditResponse
- ListSecretResponse
- ListSnapshotResponse
- ListSnapshotsAuditResponse
- ListTagAuditsResponse
- ListTagResponse
- ListUserAuditResponse
- ListUserResponse
- ListVipAuditResponse
- ListVipResponse
- ListVipResponseData
- MinimumRequirements
- ObjectStorageAuditResponse
- ObjectStorageResponse
- ObjectStoragesStatsResponse
- ObjectStoragesStatsResponseData
- OptimalRequirements
- PaginationMeta
- PatchInstanceRequest
- PatchInstanceResponse
- PatchInstanceResponseData
- PatchObjectStorageRequest
- PatchPrivateNetworkRequest
- PatchPrivateNetworkResponse
- PatchVncRequest
- PermissionRequest
- PermissionResponse
- PrivateIpConfig
- PrivateNetworkAuditResponse
- PrivateNetworkResponse
- ReinstallInstanceRequest
- ReinstallInstanceResponse
- ReinstallInstanceResponseData
- ResourcePermissionsResponse
- RoleAuditResponse
- RoleResponse
- RollbackSnapshotResponse
- SecretAuditResponse
- SecretResponse
- SelfLinks
- SnapshotResponse
- SnapshotsAuditResponse
- TagAssignmentSelfLinks
- TagAuditResponse
- TagResponse
- UnassignInstancePrivateNetworkResponse
- UpdateCustomImageRequest
- UpdateCustomImageResponse
- UpdateCustomImageResponseData
- UpdateRoleRequest
- UpdateRoleResponse
- UpdateSecretRequest
- UpdateSecretResponse
- UpdateSnapshotRequest
- UpdateSnapshotResponse
- UpdateTagRequest
- UpdateTagResponse
- UpdateUserRequest
- UpdateUserResponse
- UpgradeAutoScalingType
- UpgradeInstanceRequest
- UpgradeObjectStorageRequest
- UpgradeObjectStorageResponse
- UpgradeObjectStorageResponseData
- UserAuditResponse
- UserIsPasswordSetResponse
- UserResponse
- VipAuditResponse
- VipResponse
- VncResponse
Authentication schemes defined for the API:
- Type: Bearer authentication (JWT)
