Hive intelligence SDK
Project description
🧠 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 querymessages: For chat-style interaction- Optional tuning parameters:
temperature: (e.g. 0.7) randomness of responsetop_k: max tokens consideredtop_p: nucleus samplinginclude_data_sources: show source info
❗ Error Handling
The SDK raises HiveSearchAPIError for API errors with status code, message, and full response body.
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 hive_intelligence-0.1.0.tar.gz.
File metadata
- Download URL: hive_intelligence-0.1.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.11.9 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
237c18c7bf6556384eb3725722dfbd29bf1c76d3ded88ed97260843e0276a7ff
|
|
| MD5 |
84ebb0651d6871d695a4619629b03401
|
|
| BLAKE2b-256 |
ff6177be9d1311fcc4fc57aaf278d8542c8635a2e24109e13b01cf3df37d1132
|
File details
Details for the file hive_intelligence-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hive_intelligence-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.2 CPython/3.11.9 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f79e0a88fc6cabfbfbc4cbf961aaa83d21e9e595b57082e65da77aece2daee7
|
|
| MD5 |
fffe7e7d7b5150cb4ea2c3ba0dd9392e
|
|
| BLAKE2b-256 |
5f586697ed25f1cc2f755385f036849b98dba6b6193f43b7ba05c87a1acbdbd3
|