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

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.

Metadata

Release files for securhost 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for securhost 0.1.2
File Size Uploaded Provenance Actions
securhost-0.1.2.tar.gz 12.5 kB With provenance Details for securhost-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for securhost 0.1.2
File Interpreter ABI Platform Actions
securhost-0.1.2-py3-none-any.whl Python 3 none any Details for securhost-0.1.2-py3-none-any.whl

Total release size: 26.5 kB

Release files / securhost-0.1.2.tar.gz

Download URL securhost-0.1.2.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
eba5ac41c6bdbed33b0ed688b5f0a82913cf2cc0ba958818062f66c1ba2978a4
BLAKE2b-256 checksum
How to use checksums
d2b3aa58565d2af2ad254744fd42540b007f83e93662e6285f4e3f73958eac15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Release files / securhost-0.1.2-py3-none-any.whl

Download URL securhost-0.1.2-py3-none-any.whl
Size 14.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e47f97ebea0a24a0221c9560d0a688f2df33afbe79a0d36cf84dc8c66d37cbb
BLAKE2b-256 checksum
How to use checksums
dee96544173bc88a948b4b8e6d68df91864abe80d7bde17e94b816c2ed6ddb89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

Security for securhost 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for securhost-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files Full provenance

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