Skip to main content

NeuroCLI Python SDK

The official Python library for the NeuroCLI API.

Installation

You can install this SDK locally:

pip install -e .

Usage

The SDK mimics the standard OpenAI Python client interface, making it extremely easy to drop into existing AI applications.

Basic Chat Completion

import neurocli

# Initialize the client
client = neurocli.NeuroCLI(
    api_key="ncli_YOUR_SECRET_KEY",
    # During local testing, point this to your local server:
    # base_url="http://127.0.0.1:8000/api/ai" 
    # Optionally configure where sensitive PII is routed:
    # hybrid_fallback_url="https://neurocli.in/api/isolated" 
)

# Generate a response
response = client.chat.completions.create(
    model="neurocli-delta",
    messages=[
        {"role": "user", "content": "Explain quantum computing in simple terms."}
    ],
    temperature=0.7
)

print(response.choices[0].message.content)

BYOH Hybrid Routing (PII Detection)

NeuroCLI features an industry-first BYOH (Bring Your Own Hardware) Hybrid Router built directly into the SDK.

If you pass hybrid_routing=True, the SDK uses a local PIIScanner to detect highly sensitive Personally Identifiable Information (like SSNs and Credit Cards) in your prompt. If detected, it immediately aborts the cloud request and re-routes the prompt to your configured fallback (which defaults to the https://neurocli.in/api/isolated Enterprise Isolated Cluster, but can be configured to point to your own private on-premise cloud or local Ollama instance).

response = client.chat.completions.create(
    model="neurocli-delta",
    messages=[
        {"role": "user", "content": "My SSN is 123-45-6789. Can you process my loan?"}
    ],
    hybrid_routing=True
)
# If PII is detected, this request is re-routed to the secure isolated cluster!

Medical Reasoning

The NeuroCLI client also supports clinical-grade response generation via the specialized MedicalReasoning subsystem:

medical = client.medical.analyze(
    symptoms="Patient presents with severe localized headache and visual auras.",
    stream=True
)

for chunk in medical:
    print(chunk.choices[0].delta.content, end="")

Metadata

Release files for neurocli-sdk 1.2.3

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

Source distribution (sdist)

Source distribution for neurocli-sdk 1.2.3
File Size Uploaded Provenance Actions
neurocli_sdk-1.2.3.tar.gz 7.1 kB Without provenance Details for neurocli_sdk-1.2.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for neurocli-sdk 1.2.3
File Interpreter ABI Platform Actions
neurocli_sdk-1.2.3-py3-none-any.whl Python 3 none any Details for neurocli_sdk-1.2.3-py3-none-any.whl

Total release size: 14.4 kB

Release files / neurocli_sdk-1.2.3.tar.gz

Download URL neurocli_sdk-1.2.3.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2580e3a6d87a5ba5c0d6bcc1b39e43ff2ecd7994845547fee96975defa0159c7
BLAKE2b-256 checksum
How to use checksums
077872f47f83f223f39738226020f816629d7fc8b0d416ac1834f79ea4928ac9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / neurocli_sdk-1.2.3-py3-none-any.whl

Download URL neurocli_sdk-1.2.3-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9d0ef96e388787889a3584993be0c511eb38ee69d022babf5242ce5df2e4020
BLAKE2b-256 checksum
How to use checksums
434484c628f5b2ccbccaeacccb5d2395bde087c9198691615a36ba318e25dd22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for neurocli-sdk 1.2.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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