Skip to main content

Jump 2.0 Python client — standalone, pip-installable, works in JupyterHub or locally.

Project description

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 jump2-client
# or, from source:
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://jump2.example.org", api_key="jump2_live_…")

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"])

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jump2_client-0.2.0.tar.gz (87.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jump2_client-0.2.0-py3-none-any.whl (40.2 kB view details)

Uploaded Python 3

File details

Details for the file jump2_client-0.2.0.tar.gz.

File metadata

  • Download URL: jump2_client-0.2.0.tar.gz
  • Upload date:
  • Size: 87.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Red Hat Enterprise Linux","version":"9.7","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jump2_client-0.2.0.tar.gz
Algorithm Hash digest
SHA256 dbfc63151759e92df530c8c907d9e025ee6fbaae2e5b2376e80b3947a5165a94
MD5 2d6e57a18e0abead748533be25a1fac3
BLAKE2b-256 0484f19053a35974c822e39dca8461e2d3614cc1475858096d3cf4b7676afe9d

See more details on using hashes here.

File details

Details for the file jump2_client-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: jump2_client-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 40.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.15 {"installer":{"name":"uv","version":"0.11.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Red Hat Enterprise Linux","version":"9.7","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for jump2_client-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51e87f1d0e46956e0bf7213a69f807f30f6098d87693ee5fa2472980e266ac44
MD5 fd7dcc8d1c0d98f95a04e08591ae7ae5
BLAKE2b-256 c93efd954131a043d5a4eca313885933221463b5954260c99002582171f0e06f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page