Directors

Directors provide service-level workflows that combine multiple managers into a single, unified interface. While managers operate on individual GraphQL resources (programs, observations, targets, etc.), directors operate at the domain level—such as scheduler or goats—and expose workflows that cannot be expressed through a single GraphQL call.

Concept

The ODB and GPP APIs intentionally limit the amount of information that any one query can return. Reconstructing a complete service-level view (e.g., a scheduler program summary, or a GOATS observation payload) therefore requires multiple queries coordinated together.

A director organizes these multi-step operations under a dedicated namespace.

Directors delegate the actual composition work to coordinators, which encapsulate the service-specific logic. Each director owns one or more coordinators.

Relationship to Managers

Directors do not replace managers. Instead:

  • Managers handle single-resource interactions.

  • Coordinators combine multiple managers.

  • Directors group coordinators by service.

This forms the top tier of the client architecture.

Example structure:

GPPDirector
  ├── scheduler
  │     ├── ProgramCoordinator
  │     └── ObservationCoordinator
  └── goats
        ├── ProgramCoordinator
        └── ObservationCoordinator

Using a Director

Directors are accessed through gpp_client.GPPClient and provide service-oriented namespaces:

from gpp_client import GPPClient, GPPDirector

client = GPPClient()
director = GPPDirector(client)

program_data = await director.scheduler.program.get_all()

A matching CLI namespace is also available:

gpp sched program list

Availabe Directors

The following directors are available as attributes on the director:

API Reference

Module providing the GPPDirector class for high-level access to service-specific directors.

class gpp_client.director.GPPDirector(client: GPPClient)[source]

Bases: object

Interface to access service-specific directors in the GPP client. The GPPDirector class provides higher-level access to composed operations that span multiple GraphQL managers. Each attribute corresponds to a domain-specific director that encapsulates orchestration logic for that service.

Parameters:

client (GPPClient) – Pre-configured client used to perform raw GraphQL operations.

scheduler

High-level director for Scheduler-domain workflows.

Type:

SchedulerDirector

goats

High-level director for GOATS-domain workflows.

Type:

GOATSDirector