Skip to content

Export canonical viz-setting key types/constants for downstreams #1234

@lmeyerov

Description

@lmeyerov

Request: Export canonical Graphistry viz-setting key definitions for downstream type safety

Downstream projects (example: Louie/GraphistryGPT) need to pass and validate Graphistry visualization settings in a typed way, including:

  • URL params (embed / graph.html query options)
  • React-facing settings used by @graphistry/client-api-react

Today, downstreams often end up hardcoding local key unions / allowlists (e.g., Python Literal[...] + runtime JSON checks), which creates drift risk and maintenance overhead.

Proposed additions in pygraphistry

Please expose a canonical, machine-readable key surface, ideally one or more of:

  1. Exported Python constants

    • URL_PARAM_NAMES: tuple[str, ...]
    • REACT_SETTING_NAMES: tuple[str, ...] (if pygraphistry has/owns that view)
  2. Typed schemas/models

    • Optional TypedDict / pydantic model for settings payloads
    • Or a JSON Schema artifact that downstreams can consume for codegen
  3. Versioned contract file

    • Stable JSON file in package data with explicit key sets and basic value-shape metadata

Why this helps

  • Eliminates duplicated key lists across downstream repos
  • Improves static typing/autocomplete and safer LLM tool-contract synthesis
  • Enables single-source-of-truth tests across Python/TS stacks

Related upstream discussion in graphistry-js:

If useful, we can contribute a PR once maintainers confirm preferred API shape.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions