Skip to main content

stare

Python library and CLI for the CERN ATLAS Glance/Fence API.

Actions Status Documentation Status PyPI version

Installation

python -m pip install stare

Authentication

stare uses PKCE (no passwords stored). Run once to authenticate:

stare auth login

Your browser will open CERN SSO. After approval, tokens are stored locally and refreshed automatically.

CLI usage

# Search analyses — Rich table in terminal, JSON when piped
stare analysis search
stare analysis search --query 'referenceCode = ANA-HION-2018-01'
stare analysis search -q 'keywords contain Higgs' --limit 20
stare analysis search -q 'shortTitle = "Phase Closed"'

# Pipe to jq for field selection (JSON is auto-emitted)
stare analysis search | jq '.results[].referenceCode'
stare analysis search -q 'referenceCode contain HION' \
  | jq -r '.results[] | select(.status == "Active") | .referenceCode'

# Search papers
stare paper search --query 'referenceCode = HDBS-2018-33'

# Get individual resources
stare analysis get ANA-HION-2018-01
stare paper get HDBS-2018-33

# CONF notes / PUB notes
stare confnote get ATLAS-CONF-2024-001
stare pubnote get ATL-PHYS-PUB-2024-001

# Plots
stare plot search --query 'referenceCode = PLOT-MUON-2018-08'
stare plot get PLOT-MUON-2018-08

# List metadata
stare leadinggroups search
stare subgroups search

# Auth management
stare auth login
stare auth logout
stare auth status

# Cache management
stare cache info
stare cache clear --yes

Output is a Rich table when stdout is a terminal and JSON when piped or redirected. Use --json / --no-json to override. Commands that expose --no-cache bypass the 8-hour on-disk response cache for that invocation.

Library usage

from stare import Glance

g = Glance()

# Search analyses
result = g.analyses.search(query="referenceCode = ANA-HION-2018-01")
print(f"Found {result.number_of_results} analyses")
for analysis in result.results:
    print(analysis.reference_code, analysis.short_title)

# Search papers
paper_result = g.papers.search(query="referenceCode = HDBS-2018-33")
print(f"Found {paper_result.number_of_results} papers")
for paper in paper_result.results:
    print(paper.reference_code, paper.short_title)

# Fetch individual records (search-based under the hood)
analysis = g.analyses.get("ANA-HION-2018-01")
paper = g.papers.get("HDBS-2018-33")
conf_note = g.confnotes.get("ATLAS-CONF-2024-001")
pub_note = g.pubnotes.get("ATL-PHYS-PUB-2024-001")
plot = g.plots.get("PLOT-MUON-2018-08")
leadinggroups = g.leadinggroups.search(query="name = SUSY")

Use as a context manager for explicit connection lifecycle:

with Glance() as g:
    result = g.analyses.search(query="status = Active")

Inject a token directly (useful in CI/automated scripts):

g = Glance(token="your-access-token")

Configuration

Override defaults via environment variables:

Variable Default
STARE_BASE_URL https://atlas-glance.cern.ch/atlas/analysis/api
STARE_CLIENT_ID stare
STARE_AUTH_URL CERN Keycloak auth endpoint
STARE_TOKEN_URL CERN Keycloak token endpoint
STARE_CALLBACK_PORT 8182 (must match Keycloak registration)

Development

git clone https://github.com/kratsg/stare
cd stare
pixi install
pixi run pre-commit-install
pixi run stare auth login
pixi run test

Metadata

Release files for stare 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stare 0.5.2
File Size Uploaded
stare-0.5.2.tar.gz 239.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for stare 0.5.2
File Interpreter ABI Platform
stare-0.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 323.5 kB

Release files / stare-0.5.2.tar.gz

Download URL stare-0.5.2.tar.gz
Size 239.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9c7c330441bc945539155c283bfb93730a27ef4509a73e233b0a7d8da62a8f86
BLAKE2b-256 checksum
How to use checksums
29da941a79527363ed19a9c9c76637c6ae3db037f40e7ec25531821607a2f70d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / stare-0.5.2-py3-none-any.whl

Download URL stare-0.5.2-py3-none-any.whl
Size 84.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f372c39f00a709d8d8105bad0b024c5d2c609f7e5ce213b79acc9ab520f80ef4
BLAKE2b-256 checksum
How to use checksums
7dec5bacd8e7b2f32c02089e6d4186bdf55219794f66b307b4d756bbb2ee1634
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log
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