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.1.0.tar.gz (79.3 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.1.0-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jump2_client-0.1.0.tar.gz
  • Upload date:
  • Size: 79.3 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.1.0.tar.gz
Algorithm Hash digest
SHA256 6e6c7c3a4c446cddd4947b3bc22e07302de7a14aecb1a94ce27fa244a5d56257
MD5 ffdf0c8bf1ad53cf34f41cf00b41d8d7
BLAKE2b-256 6c695e6c7d5b32c605c37801806b8ce0d87ab4c273245973b18596e41b405b7b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jump2_client-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 30.1 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1dd9fd4a976ea5aa57920ce357aea776fd9032a6511ca395b9b06c0e4f8536f
MD5 6ecdf0a6c11df331f9b1e724317a3ee1
BLAKE2b-256 a8064fe5b95355c337671694f1441194b1a900cc51e7775742346e7f290a7b04

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