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.2.0.tar.gz (8.9 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.2.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for borealhost_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 82de45c6c7a96f654cae39eb08a37d7c39d0ca9089c81b2e7422f01188cee1b4
MD5 222f002db2d5ac8a184e959886de8eda
BLAKE2b-256 4886b05ccc1dfca51ed02e126dc69c2ddd93078551aec85b240f9aa7b23923cd

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for borealhost_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26827881e2819481d5c86eede437a4f3887bbb40b8f498b1ed92593243500e8d
MD5 1f9cb4921e258e28825d474547cb1fb7
BLAKE2b-256 7b8fcaa2cb66cc39fc8b81b0ffb3d9e5159f3a5390ae827095eeddffa170710a

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.1

2 files

0.4.0

2 files

0.3.0

2 files

This release

0.2.0 This release

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