Skip to main content

🧠 Hive Intelligence Python SDK

The Hive Intelligence SDK lets you integrate real-time crypto and Web3 intelligence directly into your Python applications using simple prompt or message-based inputs.

🚀 Installation

Install the SDK and its dependencies using Poetry:

poetry add hive-intelligence 

Or with pip (if you're not using Poetry):

pip install hive-intelligence 

🔑 Setup

Set your Hive API key as an environment variable:

export HIVE_API_KEY=your_api_key_here 

On Windows CMD:

set HIVE_API_KEY=your_api_key_here 

🧪 Example Usage

import os
from hive_intelligence.client import HiveSearchClient
from hive_intelligence.types import HiveSearchRequest, HiveSearchMessage

# Get API key from environment
api_key = os.environ.get("HIVE_API_KEY")
if not api_key:
    raise ValueError("Please set the HIVE_API_KEY environment variable")

# Initialize the client
client = HiveSearchClient(api_key=api_key)

# 🟡 Example 1: Prompt-based query
prompt_request = HiveSearchRequest(
    prompt="What is the current price of Ethereum?"
)
response = client.search(prompt_request)
print("Prompt Response:", response.model_dump())

# 🟢 Example 2: Chat-style query
chat_request = HiveSearchRequest(
    messages=[
        HiveSearchMessage(role="user", content="Price of"),
        HiveSearchMessage(role="assistant", content="Price of what?"),
        HiveSearchMessage(role="user", content="BTC")
    ]
)
response = client.search(chat_request)
print("Chat Response:", response.model_dump())

📘 Request Options

  • prompt: Plaintext question or query
  • messages: For chat-style interaction
  • Optional tuning parameters:
    • temperature: (e.g. 0.7) randomness of response
    • top_k: max tokens considered
    • top_p: nucleus sampling
    • include_data_sources: show source info

❗ Error Handling

The SDK raises HiveSearchAPIError for API errors with status code, message, and full response body.

Release files for hive-intelligence 0.1.0

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

Source distribution (sdist)

Source distribution for hive-intelligence 0.1.0
File Size Uploaded
hive_intelligence-0.1.0.tar.gz 2.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hive-intelligence 0.1.0
File Interpreter ABI Platform
hive_intelligence-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.4 kB

Release files / hive_intelligence-0.1.0.tar.gz

Download URL hive_intelligence-0.1.0.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
237c18c7bf6556384eb3725722dfbd29bf1c76d3ded88ed97260843e0276a7ff
BLAKE2b-256 checksum
How to use checksums
ff6177be9d1311fcc4fc57aaf278d8542c8635a2e24109e13b01cf3df37d1132
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.11.9 Windows/10

Release files / hive_intelligence-0.1.0-py3-none-any.whl

Download URL hive_intelligence-0.1.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f79e0a88fc6cabfbfbc4cbf961aaa83d21e9e595b57082e65da77aece2daee7
BLAKE2b-256 checksum
How to use checksums
5f586697ed25f1cc2f755385f036849b98dba6b6193f43b7ba05c87a1acbdbd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.11.9 Windows/10

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release 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