Skip to main content

SecurHost Python SDK

Official Python SDK for the SecurHost AI Gateway. Provides intelligent LLM routing, real-time voice sessions, autonomous job agents, custom personas, website chatbots, enterprise ERP connectors, automated failover, and cost telemetry.

Release License: MIT


📦 Installation

Direct Install via GitHub (Recommended)

pip install git+https://github.com/Zhost-Consulting-Private-Limited/securhost-python.git

Install from PyPI

pip install securhost

🚀 Quickstart

from securhost import SecurHostClient

# Zero URL configuration needed - defaults to https://securhost.com
client = SecurHostClient(api_key="nxs_live_...")

response = client.chat.complete(
    messages=[{"role": "user", "content": "Analyze customer support trends."}],
    model="gpt-4o",
    request_type="summarization",  # Enables smart cost routing
)

print("AI Response:", response.output_text)
print(f"Cost: ${response.cost.amount:.6f} | Saved: ${response.cost.saved:.6f} (Model served: {response.cost.model})")

Async Client

import asyncio
from securhost.aio import AsyncSecurHostClient

async def main():
    async with AsyncSecurHostClient(api_key="nxs_live_...") as client:
        reply = await client.chat.complete([{"role": "user", "content": "Hello"}])
        print(reply.output_text)

asyncio.run(main())

🎙️ Voice Agents & Real-Time Telephony

# Create real-time voice streaming session
session = client.voice.create_session(
    persona_id=12,
    voice_id="alloy",
    model="gpt-4o-realtime",
    system_prompt="You are a helpful customer concierge."
)

# Outbound telephony AI call
call = client.voice.initiate_call(
    to_number="+14155552671",
    persona_id=12,
    prompt="Confirm scheduled reservation."
)

🤖 Autonomous Job Agents

# Deploy background AI worker
agent = client.job_agents.create(
    name="Lead Researcher",
    role_brief={"objective": "Scrape and enrich qualified leads"},
    autonomy_level=1,
    daily_action_cap=100,
    sandbox=False,
    tools=["web_search", "crm_sync"]
)

# Emergency pause / resume
client.job_agents.pause(agent_id=agent["id"], reason="Maintenance window")
client.job_agents.resume(agent_id=agent["id"])

🛠️ Build & Publishing Guide

Building Package Locally

python -m pip install --upgrade build twine
python -m build

This produces dist/securhost-0.1.0-py3-none-any.whl and dist/securhost-0.1.0.tar.gz.

Publishing to PyPI

twine upload dist/*

(Or configure PYPI_API_TOKEN secret in GitHub repository settings to publish automatically on release tag)


📄 License

MIT License. Copyright (c) 2026 SecurHost.

Download files

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

Source Distribution

securhost-0.1.2.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

securhost-0.1.2-py3-none-any.whl (14.0 kB view details)

Uploaded Python 3

File details

Details for the file securhost-0.1.2.tar.gz.

File metadata

  • Download URL: securhost-0.1.2.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for securhost-0.1.2.tar.gz
Algorithm Hash digest
SHA256 eba5ac41c6bdbed33b0ed688b5f0a82913cf2cc0ba958818062f66c1ba2978a4
MD5 6fc11d200b114ddff9fa12a85472a1b7
BLAKE2b-256 d2b3aa58565d2af2ad254744fd42540b007f83e93662e6285f4e3f73958eac15

See more details on using hashes here.

Provenance

The following attestation bundles were made for securhost-0.1.2.tar.gz:

Publisher: release.yml on Zhost-Consulting-Private-Limited/securhost-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 securhost-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: securhost-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for securhost-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9e47f97ebea0a24a0221c9560d0a688f2df33afbe79a0d36cf84dc8c66d37cbb
MD5 3978b3346ab3c5124b05d5bbb1f3eef4
BLAKE2b-256 dee96544173bc88a948b4b8e6d68df91864abe80d7bde17e94b816c2ed6ddb89

See more details on using hashes here.

Provenance

The following attestation bundles were made for securhost-0.1.2-py3-none-any.whl:

Publisher: release.yml on Zhost-Consulting-Private-Limited/securhost-python

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

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page