Skip to main content

Python SDK for the HostAfrica API

Project description

ha-sdk-python

A Python SDK client for the api.hostafrica.com API.

This Python package is automatically generated by the OpenAPI Generator project:

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/hostafrica/ha-sdk-python.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/hostafrica/ha-sdk-python.git)

Then import the package:

import ha_sdk_python

Setuptools

Install 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 ha_sdk_python

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import ha_sdk_python
from ha_sdk_python.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.hostafrica.com
# See configuration.py for a list of all supported configuration parameters.
configuration = ha_sdk_python.Configuration(
    host = "https://api.hostafrica.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: BearerAuth
configuration = ha_sdk_python.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with ha_sdk_python.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ha_sdk_python.BackupsApi(api_client)
    create_backup_request_content = ha_sdk_python.CreateBackupRequestContent() # CreateBackupRequestContent | 

    try:
        api_response = api_instance.create_backup(create_backup_request_content)
        print("The response of BackupsApi->create_backup:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling BackupsApi->create_backup: %s\n" % e)

Documentation

API Reference Documentation

Documentation per api/operation

Documentation For Authorization

Authentication schemes defined for the API:

BearerAuth

  • Type: Bearer authentication

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ha_sdk_python-1.0.10.tar.gz (90.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ha_sdk_python-1.0.10-py3-none-any.whl (346.4 kB view details)

Uploaded Python 3

File details

Details for the file ha_sdk_python-1.0.10.tar.gz.

File metadata

  • Download URL: ha_sdk_python-1.0.10.tar.gz
  • Upload date:
  • Size: 90.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ha_sdk_python-1.0.10.tar.gz
Algorithm Hash digest
SHA256 8dda1e75e87dc47582f005be6040476959349ea2e6f8b87f9258484ad44a7728
MD5 60f61536e74906a5d1e988550d0fd287
BLAKE2b-256 5a54f55a738e01671b1a17a506e67113355bd1479a3e661ad1cf521d7d107847

See more details on using hashes here.

Provenance

The following attestation bundles were made for ha_sdk_python-1.0.10.tar.gz:

Publisher: release.yml on hostafrica-dev/ha-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ha_sdk_python-1.0.10-py3-none-any.whl.

File metadata

  • Download URL: ha_sdk_python-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 346.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ha_sdk_python-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 1a538b0e47690e9603023f79accab7aa57efa733bf3fae4edd1714560aa93c91
MD5 9a46c1c344abd1a2493f852890c13215
BLAKE2b-256 a36d921be40022d1c348613a1aeb5eefc3c22620028ed11d1f712167491d63ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for ha_sdk_python-1.0.10-py3-none-any.whl:

Publisher: release.yml on hostafrica-dev/ha-sdk-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page