Skip to main content

Python SDK for the BorealHost.ai REST API — agent-native web hosting

Project description

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

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

borealhost_sdk-0.1.0.tar.gz (8.2 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.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for borealhost_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 47b4a93768a3453d6005627c79f4894007343d1ada102dc961994e76150e4a77
MD5 341e47152fa6d098818322a63fed71d7
BLAKE2b-256 a38bc3a96e3f3040ebf56bf6fef723960e16aa438d0edf3eb722e72698045bea

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for borealhost_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 26559d90b50604f33f0aa48fe8b539a69456f4c6d3374924394474308fe2f0f6
MD5 47d20603799e3a2359ebaf5a8a98ef7f
BLAKE2b-256 7f1d2f33b0e0376bc4e439111c9fd6530b346a7b44c6b32eb4a00b7bd3007cfc

See more details on using hashes here.

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