Skip to main content

Atlas Python SDK

Official Python SDK for the Atlas API.

Installation

pip install wattslab-atlas

Quick Start

Create an Atlas API key in the web app, then pass it directly or set ATLAS_API_KEY.

from wattslab_atlas import AtlasClient

client = AtlasClient(api_key="atlas_...")

features = client.list_features()
for feature in features:
    print(f"{feature.feature_name}: {feature.feature_description}")

papers = client.list_papers()
print(f"You have {papers.total_papers} papers")

You can also use an environment variable:

export ATLAS_API_KEY="atlas_..."
from wattslab_atlas import AtlasClient

client = AtlasClient()
projects = client.list_projects()

Authentication

API-key authentication is the recommended SDK path. The client sends the key as X-API-Key on every request.

client = AtlasClient(api_key="atlas_...")
client.set_api_key("atlas_new_key")

The older magic-link flow is still available for compatibility:

client = AtlasClient()
client.login("user@example.com")
client.validate_magic_link("token-from-email")

Usage

Working with Features

from wattslab_atlas.models import FeatureCreate

features = client.list_features()

feature = FeatureCreate(
    feature_name="Sample Size",
    feature_description="Number of participants",
    feature_identifier="sample_size",
    feature_prompt="Extract the total number of participants in the study.",
    feature_type="number",
)
created = client.create_feature(feature)

client.delete_feature(created.id)

Choosing a model & provider for a project

from wattslab_atlas import AVAILABLE_MODELS

# See the curated model list per provider.
print(AVAILABLE_MODELS)
# {'atlas': ['gpt-5.4-mini', ...], 'openrouter': ['openai/gpt-5.4-mini',
#  'anthropic/claude-opus-4.8'], ...}

# Use Atlas' shared key (metered against your monthly budget) with the default model.
client.set_project_llm(project_id, provider="atlas")

# Or use your own OpenRouter key (billed by OpenRouter, not metered).
client.set_project_llm(
    project_id,
    provider="openrouter",
    model="anthropic/claude-opus-4.8",
)

Providers other than atlas require a saved key for that provider in Settings → Usage & Keys. model=None uses the provider's default.

Working with Papers

papers = client.list_papers(page=1, page_size=10)

result = client.upload_paper(
    project_id="project-123",
    file_path="paper.pdf",
)
task_id = result["paper.pdf"]

status = client.check_task_status(task_id)
client.reprocess_paper(paper_id, project_id)

Managing Projects

features = client.get_project_features(project_id)

client.update_project_features(
    project_id,
    feature_ids=["feat1", "feat2"],
)

client.remove_project_features(
    project_id,
    feature_ids=["feat1"],
)

result = client.reprocess_project(project_id)

Error Handling

from wattslab_atlas import AtlasClient, APIError, ResourceNotFoundError

client = AtlasClient(api_key="atlas_...")

try:
    features = client.list_features()
except APIError as exc:
    print(f"Atlas API error: {exc}")
except ResourceNotFoundError as exc:
    print(f"Resource not found: {exc}")

Requirements

  • Python 3.10+
  • Atlas API key

Download files

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

Source Distribution

wattslab_atlas-1.3.1.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

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

wattslab_atlas-1.3.1-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file wattslab_atlas-1.3.1.tar.gz.

File metadata

  • Download URL: wattslab_atlas-1.3.1.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for wattslab_atlas-1.3.1.tar.gz
Algorithm Hash digest
SHA256 26b0745a1e0180ece46607b2f6005a01d7896f20a3d36a2ae4b50221d81b0520
MD5 86e3317b6f392c674d27ff661e782338
BLAKE2b-256 bc31315579b70146586cfd852c049e1a47e27664832a1a4a5fe6289e5b76cfaa

See more details on using hashes here.

File details

Details for the file wattslab_atlas-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: wattslab_atlas-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.15

File hashes

Hashes for wattslab_atlas-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f260d95083b8c8206be97eda00575421bd877d50bc40e9303892622c6a0ecba
MD5 1abe0ceeeb4ccfc6b19f3ce7fc7e090c
BLAKE2b-256 a98e5f3df0a16a6f1b97c004286e0aa3e049cdf8f4de914a0850b27b706fa9f6

See more details on using hashes here.

Release history Release notifications | RSS feed

1.3.2

2 files

This release

1.3.1 This release

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page