Skip to main content

BorealHost Python SDK

Python SDK for the BorealHost.ai REST API.

BorealHost is an agent-native Quebec-based web hosting platform. This SDK wraps the full public REST API (/api/v1/*) — purchase hosting, deploy sites, manage DNS, register domains, run SSH commands, and scale infrastructure.

Install

pip install borealhost-sdk

Usage

from borealhost_sdk import Client

client = Client(api_key="bh_...")

# List plans (no auth needed)
plans = client.list_plans()

# Manage sites
sites = client.list_sites()
status = client.get_site("my-site")
client.deploy("my-site")

# DNS
client.add_domain_dns("example.com", record_type="A", value="1.2.3.4", subdomain="www")

Authentication

API keys are in the format bh_<48 hex chars>.

# Pass at construction
client = Client(api_key="bh_...")

# Or via environment variable
# export BOREALHOST_API_KEY="bh_..."
client = Client()

# Or set later
client = Client()
client.set_api_key("bh_...")

Custom base URL

client = Client(api_key="bh_...", base_url="https://staging.borealhost.ai")

Errors

All errors from the API raise ApiError:

from borealhost_sdk import Client, ApiError

try:
    client.deploy("unknown-site")
except ApiError as e:
    print(e.code)     # "NOT_FOUND"
    print(e.message)  # "Site 'unknown-site' not found"

Related packages

Links

Download files

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

Source Distribution

borealhost_sdk-0.4.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

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

borealhost_sdk-0.4.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

Details for the file borealhost_sdk-0.4.0.tar.gz.

File metadata

  • Download URL: borealhost_sdk-0.4.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.2

File hashes

Hashes for borealhost_sdk-0.4.0.tar.gz
Algorithm Hash digest
SHA256 9b3d0b9625a50cb1cead5b657152dd7b7f966295ea5f0b8c0f80f1cbde532a9d
MD5 9cf6fc7dbc35d1e9cd938f45e880ab5e
BLAKE2b-256 1def748ef99f9a5ea6f519c4e2ca4c7f73645ee63de6f521e1d4684d9a4d376a

See more details on using hashes here.

File details

Details for the file borealhost_sdk-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: borealhost_sdk-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.2

File hashes

Hashes for borealhost_sdk-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8afa5f977dbdb3f65b4cf974e428407551ed50c9870fc153c116dfad6b2ea2c0
MD5 39ea1bf0c72edee60794f66eaffdfe4d
BLAKE2b-256 d47fda90c13ff3924f32063feef7450fc19de659e2726f783d2ba5eed6de3b7a

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.1

2 files

This release

0.4.0 This release

2 files

0.3.0

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

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