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.2.tar.gz (19.8 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.2-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: wattslab_atlas-1.3.2.tar.gz
  • Upload date:
  • Size: 19.8 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.2.tar.gz
Algorithm Hash digest
SHA256 457667cad2d240f527ff0921c070f5d4b72f305f69798234ac6fa4716f51d9be
MD5 7455a1beb3ffca19e40632fab5a52f4c
BLAKE2b-256 67bae9cf6c7a3689efdeb4b392daac44c9464ea70c0ea8763f1dd39c61b85ca6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: wattslab_atlas-1.3.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ca1bb6d532760aa07c4d89ca9e8b51d72bc8a972a543fda27f072b4144ccde94
MD5 7c6e02dfd3a32cf425f675c44262dbc5
BLAKE2b-256 119c5bb43c4d323856c5503ee5cd2f3e779fed1b93d9efcdf72ec8828f0ae0b4

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.3.2 This release

2 files

1.3.1

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