Gemini Program Platform client.
Project description
GPP Client
Pain-free python/CLI communication with the Gemini Program Platform (GPP).
Documentation: https://gpp-client.readthedocs.io/en/latest/
Source Code: https://github.com/gemini-hlsw/gpp-client
Python client and CLI for the GPP. Key features:
- Type‑safe GraphQL
- Pydantic models from the GPP GraphQL schema, so every query, mutation, and input type is validated.
- Resource Managers
- High‑level
Managerclasses (e.g.GPPClient.program,GPPClient.observation) with convenientget_by_id,get_all,create,update_by_id,delete_by_id,restore_by_idand more methods, no need to write raw GraphQL.
- High‑level
- Flexible payloads
- Create or update via in‑memory Pydantic inputs or
from_jsonfiles.
- Create or update via in‑memory Pydantic inputs or
gppCLI- Full CRUD surface on the command line:
gpp <resource> list|get|create|update|delete, with rich table output and JSON export options.
- Full CRUD surface on the command line:
Requirements
python>=3.10tomltyperariadne-codegen
Development Status
🚧 Alpha: the library is under heavy development. The public API and CLI flags may change between releases.
Installation
pip install gpp-client
Quickstart
from gpp_client import GPPClient
# Initialize with your GraphQL endpoint and credentials.
client = GPPClient(url="YOUR_URL", token="YOUR_TOKEN")
# List the first 5 program notes.
notes = await client.program_note.get_all(limit=5)
for note in notes["matches"]:
print(f"{note['id']}: {note['title']}")
# Create a new note from a JSON file.
new_note = await client.program_note.create(
from_json="path/to/program_note_payload.json",
program_id="p-123"
)
print("Created:", new_note)
# Or create a note from the pydantic model.
from gpp_client.api.enums import Existence
from gpp_client.api.input_types import ProgramNotePropertiesInput
properties = ProgramNotePropertiesInput(
title="Example",
text="This is an example.",
is_private=False,
existence=Existence.PRESENT
)
another_note = await client.program_note.create(properties=properties, program_id="p-123")
print("Created another:", another_note)
As a CLI
# Get help.
gpp --help
# Get observation help.
gpp obs --help
# List observations.
gpp obs list --limit 3
# Get details for one.
gpp obs get o-123
# Create via JSON.
gpp obs create --from-json new_obs.json --program-id p-123
# Update by ID via JSON.
gpp obs update --observation-id o-123 --from-json updated_obs.json
Reporting Bugs and Feature Requests
Jira: https://noirlab.atlassian.net/jira/software/projects/GPC/boards/162
NOIRLab Slack channel: #gpp-client
While in heavy development, please file requests or report bugs via our Jira board or Slack channel.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gpp_client-25.5.0a1.tar.gz.
File metadata
- Download URL: gpp_client-25.5.0a1.tar.gz
- Upload date:
- Size: 80.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f0b47f91052c4938451354e44deecbcbcdb21fcd5b17ce01522f31ea43cce53
|
|
| MD5 |
4391143ee280aa44357dcc4c7046e005
|
|
| BLAKE2b-256 |
d68076bedbdc3a778cfc832a1079aa197f57af45b2fdcf7c1f20a0e1d429172f
|
Provenance
The following attestation bundles were made for gpp_client-25.5.0a1.tar.gz:
Publisher:
publish.yaml on gemini-hlsw/gpp-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gpp_client-25.5.0a1.tar.gz -
Subject digest:
1f0b47f91052c4938451354e44deecbcbcdb21fcd5b17ce01522f31ea43cce53 - Sigstore transparency entry: 213716466
- Sigstore integration time:
-
Permalink:
gemini-hlsw/gpp-client@d2fa159adbc836f43015c97d3b7e06b24731c1e6 -
Branch / Tag:
refs/tags/v25.05.0a1 - Owner: https://github.com/gemini-hlsw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@d2fa159adbc836f43015c97d3b7e06b24731c1e6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file gpp_client-25.5.0a1-py3-none-any.whl.
File metadata
- Download URL: gpp_client-25.5.0a1-py3-none-any.whl
- Upload date:
- Size: 96.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd7780dfb41796e4c86dfbd2bc75316a5a6021dba25a272b0af1ac8899cce0b3
|
|
| MD5 |
527c62324a8d24f6ceba3cb6d3f7758c
|
|
| BLAKE2b-256 |
02b81780c6d037c40239ed4faa7035ea3e5b830ace0eeea16cff55cb1aafcacb
|
Provenance
The following attestation bundles were made for gpp_client-25.5.0a1-py3-none-any.whl:
Publisher:
publish.yaml on gemini-hlsw/gpp-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gpp_client-25.5.0a1-py3-none-any.whl -
Subject digest:
bd7780dfb41796e4c86dfbd2bc75316a5a6021dba25a272b0af1ac8899cce0b3 - Sigstore transparency entry: 213716467
- Sigstore integration time:
-
Permalink:
gemini-hlsw/gpp-client@d2fa159adbc836f43015c97d3b7e06b24731c1e6 -
Branch / Tag:
refs/tags/v25.05.0a1 - Owner: https://github.com/gemini-hlsw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@d2fa159adbc836f43015c97d3b7e06b24731c1e6 -
Trigger Event:
release
-
Statement type: