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 'metadata.keywords.name contain Higgs' --limit 20
stare analysis search -q 'shortTitle = "Low-mass single diffraction"'

# 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 CONF-HDBS-2018-48
stare pubnote get PUB-HIGP-2024-59

# 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("CONF-HDBS-2018-48")
pub_note = g.pubnotes.get("PUB-HIGP-2024-59")
plot = g.plots.get("PLOT-MUON-2018-08")
leadinggroups = g.leadinggroups.search(query="name = HMBS")

Use as a context manager for explicit connection lifecycle:

with Glance() as g:
    result = g.analyses.search(query='status = "Phase 0 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.8.0

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.8.0
File Size Uploaded Provenance Actions
stare-0.8.0.tar.gz 252.1 kB With provenance Details for stare-0.8.0.tar.gz

Built distribution (wheel)

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

Total release size: 340.7 kB

Release files / stare-0.8.0.tar.gz

Download URL stare-0.8.0.tar.gz
Size 252.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1b78f326ae158891eef3a47706b22cc17fc6170013dd3fae78f5f93090c9ce3e
BLAKE2b-256 checksum
How to use checksums
0c09a8d20168f1fd6022e43ae5a8a1488bcb8647bd8b00b1fb731171263c0605
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 16, 2026.

Transparency log

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

Download URL stare-0.8.0-py3-none-any.whl
Size 88.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b2f6d57da59a5ec84d29747dafaf13fbf5ae9f44f33ad485a9c1ac1391bb5001
BLAKE2b-256 checksum
How to use checksums
653eeb75cefeff288f7c9348479f557ef07748958b6537a7b0746faa690d04d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 16, 2026.

Transparency log

Security for stare 0.8.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for stare-0.8.0.tar.gz

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 Nov 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files Full provenance

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