Rairos Python SDK
Python SDK for the Rairos API platform.
Installation
# From PyPI (coming soon)
pip install rairos
# From source
cd sdks/python && pip install -e . && cd ../..
Quick Start
from rairos import RairosClient
# Initialize client
client = RairosClient(api_key="your_api_key_here")
# Search papers
results = client.search_papers(query="machine learning", page=1, per_page=20)
print(results)
# Detect research gaps (requires Pro tier)
gaps = client.detect_gap(query="neural network architecture")
print(gaps)
# Get usage statistics
usage = client.get_usage()
print(usage)
Authentication
You can provide your API key in three ways:
-
Environment variable (recommended):
export RAIROS_API_KEY=your_api_key_here
-
Constructor parameter:
client = RairosClient(api_key="your_api_key_here")
-
Register/Login to get a new API key:
# Register auth = client.register(email="user@example.com", password="secure_password") # Login auth = client.login(email="user@example.com", password="secure_password") print(auth["api_key"]) # Use this key
API Reference
Papers
# Search papers
results = client.search_papers(query="quantum computing")
# Get specific paper
paper = client.get_paper(paper_id="uuid-here")
Gap Detection (Pro tier)
# Detect research gaps
gaps = client.detect_gap(
query="What are the gaps in transformer architecture research?",
categories=["cs.AI", "cs.LG"]
)
Research (Team tier)
# Run automated research
results = client.run_research(
query="Analyze the state of AI safety research in 2025"
)
Subscriptions
# Get available tiers
tiers = client.get_tiers()
# Create checkout session
checkout = client.create_checkout(
price_id="price_pro_monthly",
success_url="https://yourapp.com/success",
cancel_url="https://yourapp.com/pricing"
)
print(checkout["checkout_url"]) # Redirect user to this URL
# Get subscription status
status = client.get_subscription_status()
Error Handling
from rairos import (
RairosClient,
RairosError,
AuthenticationError,
RateLimitError
)
try:
client = RairosClient(api_key="invalid_key")
results = client.search_papers(query="test")
except AuthenticationError:
print("Invalid API key")
except RateLimitError:
print("Rate limit exceeded - wait and retry")
except RairosError as e:
print(f"API error: {e.message}")
License
MIT License
Metadata
Release files for rairos 0.2.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 | |
|---|---|---|---|
| rairos-0.2.0.tar.gz | 8.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rairos-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.1 kB
Release files / rairos-0.2.0.tar.gz
| Download URL | rairos-0.2.0.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
efa0af5a01e9614637b5ed1c1a8b10c28783daeb39764dfb4871fa311868d789
|
|
BLAKE2b-256 checksum How to use checksums |
6477884ae566ee086b7cea6a39b07e858c510a9e50ee22aedaecbb5b5f00b72d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / rairos-0.2.0-py3-none-any.whl
| Download URL | rairos-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
908a542324f9687a7cc70774dd5266a3d3e38b8c53af07facad89ab4d8c8e35d
|
|
BLAKE2b-256 checksum How to use checksums |
70ced80412eb8aa690486b2c9cb249cc39f8deb9fc45c2fc9de7937848b77ba3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|