stare
Python library and CLI for the CERN ATLAS Glance/Fence API.
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.6.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stare-0.6.1.tar.gz | 254.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stare-0.6.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 342.9 kB
Release files / stare-0.6.1.tar.gz
| Download URL | stare-0.6.1.tar.gz |
|---|---|
| Size | 254.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5e5111ff671678c4a35cf3b5588fd7a90725d4a07839df34b2bd81a6415202a9
|
|
BLAKE2b-256 checksum How to use checksums |
fd6e6d83bce0eee1740cca85dd3cecbbb368ae98c7ef4a9d62ee7552341f2f37
|
| 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 29, 2026.
Transparency logRelease files / stare-0.6.1-py3-none-any.whl
| Download URL | stare-0.6.1-py3-none-any.whl |
|---|---|
| Size | 88.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0437708d69ce9012906d2eb33d733e0410a9f7c9905539b64a9706a8ce1929a
|
|
BLAKE2b-256 checksum How to use checksums |
837c42dcb12f7f62ab48cfb198770744c59c1436844265f3765d2ec1369cb5e0
|
| 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 29, 2026.
Transparency log