Python SDK
Coming Soon
The official Python SDK is currently in development. For now, use the REST API directly.
Planned Installation
pip install inherent
Planned Usage
from inherent import Inherent
client = Inherent(api_key="inh_live_...")
# Ingest a document
doc = client.documents.create(
content="Your document content...",
metadata={"title": "My Document"}
)
# Search
results = client.search(
query="How does authentication work?",
limit=5
)
for chunk in results.chunks:
print(f"Score: {chunk.score}")
print(f"Content: {chunk.content}")
Current Alternative
Use the REST API with requests:
import requests
class InherentClient:
def __init__(self, api_key: str):
self.api_key = api_key
self.base_url = "https://api.inherent.systems/v1"
self.headers = {"Authorization": f"Bearer {api_key}"}
def search(self, query: str, limit: int = 10):
response = requests.post(
f"{self.base_url}/search",
headers=self.headers,
json={"query": query, "limit": limit}
)
response.raise_for_status()
return response.json()
def create_document(self, content: str, metadata: dict = None):
response = requests.post(
f"{self.base_url}/documents",
headers=self.headers,
json={"content": content, "metadata": metadata or {}}
)
response.raise_for_status()
return response.json()
# Usage
client = InherentClient("inh_live_...")
results = client.search("authentication")
Waitlist
Want early access to the SDK? Join the waitlist.