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.7.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.7.0
File Size Uploaded Provenance Actions
stare-0.7.0.tar.gz 257.4 kB With provenance Details for stare-0.7.0.tar.gz

Built distribution (wheel)

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

Total release size: 345.2 kB

Release files / stare-0.7.0.tar.gz

Download URL stare-0.7.0.tar.gz
Size 257.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ef2e53d2d9824b1b72c562c4a293912d350b95fc9b46bb0a3a1e6ae6b96a681f
BLAKE2b-256 checksum
How to use checksums
266932952156d50c3a722e265e0abd8e9b9ddd0dfcf4fd5906d8d8fdb62f1435
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 9, 2026.

Transparency log

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

Download URL stare-0.7.0-py3-none-any.whl
Size 87.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88697ce26041ac59c71444a9ffac45bdf3c6b72ead6e509add7db9451d581b39
BLAKE2b-256 checksum
How to use checksums
ff875bca4b5b01b5123aa64d63bd034e84375b52415048a1e7d392f13700ca74
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 9, 2026.

Transparency log

Security for stare 0.7.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.7.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 9, 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.7.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