Skip to main content

Python SDK for the AIR Backend API

Project description

AIR SDK

Python SDK for the AIR Backend API.

Installation

Install the SDK from PyPI:

pip install air-research

Quick Start

import air

client = air.AIR(api_key="air_k1_...", base_url="http://localhost:8000")

# Standalone tools
keywords = client.keywords("dark matter and lensing", n=5, kw_type="aas")
enhanced = client.enhance("My research with https://arxiv.org/abs/2301.12345")

# Full research workflow
project = client.create_project("my-research", data_description="We study...")
idea = project.idea()
project.literature()
project.methods()
project.paper(journal="AAS")
review = project.review()

# File access
print(project.get_file("Iteration0/input_files/idea.md"))
print(project.list_files())

Configuration

Set AIR_API_KEY and optionally AIR_BASE_URL as environment variables, or pass them directly:

client = air.AIR(api_key="air_k1_...", base_url="https://api.example.com")

API Reference

AIR class

Method Description
keywords(text, n=5, kw_type="unesco") Extract keywords
arxiv(text) Download arXiv papers from URLs in text
enhance(text, max_workers=2, max_depth=10) Enhance text with arXiv context
ocr(file_path) Process PDF with OCR (server path)
create_project(name, data_description, iteration) Create a project
get_project(name) Get existing project
list_projects() List all projects
delete_project(name) Delete a project

Project class

Method Description
idea(mode="fast", timeout=600) Generate research idea
literature(timeout=600) Run literature search
methods(mode="fast", timeout=600) Develop methods
paper(journal="NONE", timeout=900) Write paper
review(timeout=600) Run review
get_file(path) Read a project file
list_files() List all project files
write_file(path, content) Write a file
delete() Delete the project

Docs

Install the documentation with:

pip install air-research[docs]

and build it with

mkdocs serve --livereload

Tests

Test with pytest:

pytest tests

You can also skip slow tests (e.g. idea generation) with

pytest tests/ -m "not slow".

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_research-0.1.6.tar.gz (24.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_research-0.1.6-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file ai_research-0.1.6.tar.gz.

File metadata

  • Download URL: ai_research-0.1.6.tar.gz
  • Upload date:
  • Size: 24.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for ai_research-0.1.6.tar.gz
Algorithm Hash digest
SHA256 1d5ba03cab9f1eb129524870d0ecceeb922736c20a66a42ec8970171586fa8df
MD5 ed50a855b3ef7a11206414e6e5aaae3c
BLAKE2b-256 b11a5c5d4fdcf4948e75f07538771d2385c860b49cef15e293ac6245d4fa575f

See more details on using hashes here.

File details

Details for the file ai_research-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: ai_research-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 22.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for ai_research-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 fb0439ca4bbb023da0123454479298bea05a3925bb5bf86b6e9d5ee0969b8b25
MD5 0bda7aa451683ff40e2625d7e709b74a
BLAKE2b-256 26eec21361957a5d0b6768ed93ade33ac8b83f60fd10a0962227c7a1be1f910e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page