🧠 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.
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hive_intelligence-0.1.0.tar.gz | 2.6 kB | Without provenance | Details for hive_intelligence-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hive_intelligence-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for hive_intelligence-0.1.0-py3-none-any.whl |
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
|
Security for hive-intelligence 0.1.0
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.