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.3.0.tar.gz (9.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.3.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: borealhost_sdk-0.3.0.tar.gz
  • Upload date:
  • Size: 9.9 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.3.0.tar.gz
Algorithm Hash digest
SHA256 b32a0a67181edfbba2bccc9c2f56ed917221d2a56b868e0e5c54e1d2401aa75a
MD5 a9907459b6d9edd6ce20dc1e07a6caab
BLAKE2b-256 5c69761d1d87d8296d84787e29cd414e0684dd2c89ac1d39129686552b4b0f13

See more details on using hashes here.

File details

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

File metadata

  • Download URL: borealhost_sdk-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0357f8bf30eef32de7ffc1bf8ee9904f45dfdcfec16d2b957e8cefe1b3a4730
MD5 9f17c947de3cea95b2af01a58d580cc8
BLAKE2b-256 fecd68bf6546020f469c544bead37bc9deae6cd04b7b9ae617ab528a1622e2db

See more details on using hashes here.

Release history Release notifications | RSS feed

0.5.1

2 files

0.4.0

2 files

This release

0.3.0 This release

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