The official library for vLLM client network and preflight validation engine.
Project description
open-vllm-sdk
A high-performance, asynchronous resilience gateway client built to connect distributed application services to remote GPU infrastructure safely and efficiently. Will offers only asunchronous clients powerd by https
Table of Contents
- Overview
- Key Architecture Benefits
- Installation
- Environment Configuration
- Quick Start Usage
- Console Logging Aesthetics
- License
Overview
Managing raw HTTP streaming routes directly to high-throughput LLM clusters can cause major stability issues, such as socket exhaustion, memory crashes, or lost responses.
The open-vllm-sdk wraps all this complex networking inside a clean, production-hardened interface. It handles background network management, automatically cleans up messy raw Server-Sent Event (SSE) blocks, and feeds your applications crisp, ready-to-use text tokens in real-time.
Key Architecture Benefits
- Asynchronous Concurrency: Built natively on Python's
asyncioloop. It easily supports 100+ concurrent app instances (like Chatbots, BOM Parsers, and Tender Text Extractors) without stalling performance. - Keep-Alive Connection Pooling: Reuses active TCP paths over
httpx.AsyncClientinstead of spinning up new sockets for every line, cutting down Time-To-First-Token (TTFT). - Pre-flight Integrity Checking: Instantly scans system paths and environment flags before booting to prevent downstream configuration crashes.
- Localized Brand Logging: Implements highly scannable terminal tracking designed after modern web frameworks like FastAPI and Uvicorn.
Installation
This project is fully managed using the lightning-fast uv Python package manager.
# install from PyPI
uv add open-vllm-sdk
(or)
pip install open-vllm-sdk
.env configuration
#This is your GPU custom model loaded instance & port
LIVE_GPU_ENDPOINT_URL= http://213.196.166.17:61496/v1/chat/completions
api_key='place api token or random words.' # Not mandatory-exmaple, use custom api key
While you can provide a apikey and live endpoint recommend above, to add
on your .env file.
Support for streaming responses using Server Side Events(SSE)
Quick Start
# -*- coding: utf-8 -*-
import asyncio
from dotenv import load_dotenv
from vllm_resilience_sdk.clients import ProductionVLLMClient
load_dotenv()
#run engine
async def main(sample_payload):
# Instantiate the connection pooling client
client = ProductionVLLMClient()
await client.initialize_vllm_connection()
#Stream processed text tokens seamlessly
async for token in client.send_inference_request(sample_payload):
print(token, end="", flush=True)
yield token
#Safely flush socket channels on teardown
await client.close_vllm_connection()
#inference
import asyncio
async def test_caller():
sample_payload = {
"model": "Qwen/Qwen3-VL-8B-Instruct",
"messages": [{"role": "user", "content": "What is LLM?"}],
"max_token": 100
}
# Iterate over the tokens yielded by run_vllm_engine
async for token in main(sample_payload):
print(token, end="", flush=True)
print("\n\n--------------")
# Run the test
asyncio.run(test_caller())
Advance
Logging
To access the along with the logs. we used the standard lib logging module.
To Start | Example
# -*- coding: utf-8 -*-
import asyncio
from dotenv import load_dotenv
from vllm_resilience_sdk.logging_utils import setup_sdk_logging
from vllm_resilience_sdk import SystemInitializationEngine
from vllm_resilience_sdk.clients import ProductionVLLMClient
load_dotenv()
async def main(sample_payload):
#Initialize
setup_sdk_logging()
#Run background system verification checks
verifier = SystemInitializationEngine(target_log_dir="./logs")
verifier.run_pre_boot_pipeline()
#Instantiate the connection pooling client
client = ProductionVLLMClient()
await client.initialize_vllm_connection()
#Stream processed text tokens seamlessly
async for token in client.send_inference_request(sample_payload):
print(token, end="", flush=True)
yield token
#Safely flush socket channels on teardown
await client.close_vllm_connection()
#inference
import asyncio
async def test_caller():
sample_payload = {
"model": "Qwen/Qwen3-VL-8B-Instruct",
"messages": [{"role": "user", "content": "What is LLM?"}],
"max_token": 100
}
# Iterate over the tokens yielded by run_vllm_engine
async for token in main(sample_payload):
print(token, end="", flush=True)
print("\n\n--------------")
# Run the test
asyncio.run(test_caller())
[!IMPORTANT]
Error code as follow:2026-06-07 23:15:02 [WARNING] (Vllm_SDK.VLLMClient): Attempt 1/3 failed: ConnectError. Triggering backoff self-heal protocol [GPU Link Dropped]should check your GPU server is enbaled.
GPU Retried
certain gpu connection error are automatically retried 4 time by default, with a short backoff. Connection error due to network connectivity problm, Request Timeout, Network conflict, RateLimit and internal error are reteried by default as 4.
Connections
maximum alive wahup connection default by 30, max connection can made by 150 default.
you can use the parameter max_alive & max_conection options to increase or decrease by initial_vllm_connection function.
from vllm_resilience_sdk.clients import ProductionVLLMClient
client = ProductionVLLMClient()
client.initialize_vllm_connection(max_connection=0, max_alive=0)
you can verify the versoin that is being used at runtime with :
import vllm_resilience_sdk
print(vllm_resilience_sdk.__version__)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file open_vllm-1.0.2.tar.gz.
File metadata
- Download URL: open_vllm-1.0.2.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6cf1931bb70820e0ec9d10ab2118e9bc6c4dce074e7546058f230027c7c35c3
|
|
| MD5 |
9d7ee7124b95b37d7242cae31c077ab2
|
|
| BLAKE2b-256 |
5dea1851fdb1ef0222b483f26dd3fdc9f5bf7fde20c52d7cf5b7928ed048b5ca
|
Provenance
The following attestation bundles were made for open_vllm-1.0.2.tar.gz:
Publisher:
python-publish.yml on aravindhgowham/vllm-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
open_vllm-1.0.2.tar.gz -
Subject digest:
d6cf1931bb70820e0ec9d10ab2118e9bc6c4dce074e7546058f230027c7c35c3 - Sigstore transparency entry: 1859448150
- Sigstore integration time:
-
Permalink:
aravindhgowham/vllm-sdk@ba63aaf56c4dd7b100d3f05066081c5123699199 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/aravindhgowham
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ba63aaf56c4dd7b100d3f05066081c5123699199 -
Trigger Event:
release
-
Statement type:
File details
Details for the file open_vllm-1.0.2-py3-none-any.whl.
File metadata
- Download URL: open_vllm-1.0.2-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a35fd731efecbb774e8090a68cdbd8ab86e4b080c0ef6352ce52c9e89916e09a
|
|
| MD5 |
2e7a5e28ab702c5e75afe713b21fd78b
|
|
| BLAKE2b-256 |
e28debc18be0b0a1bf5b5c494a85c732b6ac4af49cc8db549c6264482efe6583
|
Provenance
The following attestation bundles were made for open_vllm-1.0.2-py3-none-any.whl:
Publisher:
python-publish.yml on aravindhgowham/vllm-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
open_vllm-1.0.2-py3-none-any.whl -
Subject digest:
a35fd731efecbb774e8090a68cdbd8ab86e4b080c0ef6352ce52c9e89916e09a - Sigstore transparency entry: 1859448172
- Sigstore integration time:
-
Permalink:
aravindhgowham/vllm-sdk@ba63aaf56c4dd7b100d3f05066081c5123699199 -
Branch / Tag:
refs/tags/v1.0.2 - Owner: https://github.com/aravindhgowham
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@ba63aaf56c4dd7b100d3f05066081c5123699199 -
Trigger Event:
release
-
Statement type: