jump2-client
Standalone Python client for the Jump 2.0 astronomical data portal.
Works in JupyterHub (zero-config — credentials injected at spawn) or locally with an API key.
Install
pip install -U --extra-index-url https://cannon.caltech.edu/client/simple/ jump2-client
# unreleased features (needs GitHub repo access):
pip install "git+https://github.com/California-Planet-Search/jump2.git#subdirectory=client"
# or, from a checkout:
cd client && uv sync
Requirements: Python ≥ 3.11, requests, sqlglot ≥ 25.0.
Quick start
from jump2_client import Client
# In JupyterHub — no setup needed:
c = Client()
c.status() # connectivity + ACL check
c.discover() # browse the API endpoint catalogue
c.docs # print cheat-sheet
# Locally:
c = Client(base_url="https://cannon.caltech.edu", api_key="jump2_live_…")
Passwordless command line
pip install jump2-client jump2-cli
jump2 scripts login # asks for your password, once
jump2 scripts upload tonight.txt -i hires # and never again
login mints an API key scoped to the one token the command needs and stores it
at mode 0600 in ~/.config/jump2/credentials.toml; every later Client() finds
it with no environment set. Order of precedence stays argument → environment →
file, so JupyterHub's injected key always wins.
Data access
# Raw SQL → DataFrame (RLS enforced server-side):
df = c.data.query("SELECT url_slug, vmag FROM core_star ORDER BY vmag LIMIT 20")
# Fluent query builder:
df = (c.data.table("core_star")
.select("url_slug", "vmag", "ra", "dec")
.where(vmag__lt=8)
.order_by("vmag")
.limit(25)
.df())
# Stars and observations:
for star in c.data.stars():
print(star["url_slug"])
Observing scripts
# Upload a starlist (needs the manage_scripts token). An existing name for the
# instrument is overwritten in place; the result says which happened.
c.scripts.upload("script_j344_n2.txt", instrument="hires")
c.scripts.print_list(instrument="hires")
Error handling
from jump2_client import AuthError, ValidationError, NotFoundError
try:
df = c.data.query("SELECT * FROM bad_table")
except ValidationError as e:
print(e.detail) # server message
print(e.hint) # remediation hint
Full documentation
See docs/CLIENT.md in the jump2 repository for the complete reference:
authentication modes, URL prefix convention, QueryBuilder operators, admin API, error model,
and key regeneration flow.
Metadata
Release files for jump2-client 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| jump2_client-0.6.0.tar.gz | 133.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| jump2_client-0.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 204.3 kB
Release files / jump2_client-0.6.0.tar.gz
| Download URL | jump2_client-0.6.0.tar.gz |
|---|---|
| Size | 133.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
705b757d5ace7f49678eac8afc5129140699e6d743d0bd33bda880b28a6a98e7
|
|
BLAKE2b-256 checksum How to use checksums |
8ebae021be24b02b9a17522c2d1b09cbf708dbf1f6e0ad04e3b42632470f626d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / jump2_client-0.6.0-py3-none-any.whl
| Download URL | jump2_client-0.6.0-py3-none-any.whl |
|---|---|
| Size | 71.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14c0a8276af37bf1b4fe07e965479e0c08264bcceebb7703a44f05c372cf3002
|
|
BLAKE2b-256 checksum How to use checksums |
ebd1965bd09aa79d9e4c3d2fb147f78bb0718e6a636a34745dae5a9c1e19d01f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|