Jiro Python SDK
Official Python SDK for Jiro Search API.
Installation
pip install jiro-sdk
With WebSocket support:
pip install jiro-sdk[websocket]
Quick Start
from jiro_sdk import JiroClient
# Initialize client
client = JiroClient(
api_key="your-api-key",
base_url="http://127.0.0.1:8000"
)
# Search the web
results = client.search("python web scraping")
print(results["organic_results"])
# Scrape a URL
content = client.scrape("https://example.com")
print(content["content"])
# AI-powered research with citations
answer = client.ai_ask("What is Python?")
print(answer["answer"])
# Parallel search across multiple engines
results = client.search_parallel("AI news", num_engines=3)
# Search for images
images = client.search_images("cats")
# Search for news
news = client.search_news("technology")
Async Usage
import asyncio
from jiro_sdk import AsyncJiroClient
async def main():
async with AsyncJiroClient(api_key="your-key") as client:
results = await client.search("python web scraping")
content = await client.scrape("https://example.com")
answer = await client.ai_ask("What is Python?")
asyncio.run(main())
Social Media Scraping
# Scrape social media
result = client.social_scrape("https://reddit.com/r/python/comments/123")
# Search social platforms
results = client.social_search("python", platform="reddit")
Batch Operations
# Batch search
job = client.batch_search(
queries=["python", "javascript", "go"],
engine="google",
num_results=5
)
print(f"Progress: {job.progress}%")
# Batch scrape
job = client.scrape_batch([
"https://example.com",
"https://httpbin.org/html"
])
Error Handling
from jiro_sdk import JiroClient, JiroError, AuthenticationError, RateLimitError
client = JiroClient(api_key="your-key")
try:
results = client.search("test")
except AuthenticationError:
print("Invalid API key")
except RateLimitError:
print("Rate limit exceeded, please wait")
except JiroError as e:
print(f"Error: {e}")
Configuration
client = JiroClient(
api_key="your-api-key", # Optional: API key
base_url="http://localhost:8000", # Server URL
timeout=30.0 # Request timeout
)
# Get system status
status = client.status()
# Get usage statistics
usage = client.usage(days=30)
# List plugins
plugins = client.plugins()
Context Manager
with JiroClient(api_key="your-key") as client:
results = client.search("test")
# Client is automatically closed
License
MIT License
Metadata
Release files for jiro-sdk 0.2.15
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 |
|---|---|---|---|---|
| jiro_sdk-0.2.15.tar.gz | 3.0 kB | Without provenance | Details for jiro_sdk-0.2.15.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jiro_sdk-0.2.15-py3-none-any.whl | Python 3 | none | any | Details for jiro_sdk-0.2.15-py3-none-any.whl |
Total release size: 5.6 kB
Release files / jiro_sdk-0.2.15.tar.gz
| Download URL | jiro_sdk-0.2.15.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f3de8bb01f52e454aae3724dd9f3364b297b2bb2f3e5bfa35ac1214c5553dd4
|
|
BLAKE2b-256 checksum How to use checksums |
3d5d3db3af17ebace865b060ea4034a70ab51e4bb9d20ea8bf42945cd2ebce2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / jiro_sdk-0.2.15-py3-none-any.whl
| Download URL | jiro_sdk-0.2.15-py3-none-any.whl |
|---|---|
| Size | 2.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be390d817cff09d598173d537f129234f1861116b8afd2d11daf41ce72573589
|
|
BLAKE2b-256 checksum How to use checksums |
83d643be83e4965438a18a610aa9d4834e05c9af4668fac11b3cefbb38a65407
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Security for jiro-sdk 0.2.15
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.