Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

gooddata-code-convertors

GoodData AAC YAML / Declarative API code converters, powered by WebAssembly.

Provides bidirectional conversion between AAC YAML format (used by the gdc-analytics-as-code VSCode plugin) and GoodData Declarative API format.

Installation

pip install gooddata-code-convertors

Usage

YAML-to-Declarative functions accept parsed YAML dicts (e.g. from yaml.safe_load), not raw YAML strings.

import yaml
from gooddata_code_convertors import yaml_metric_to_declarative, declarative_metric_to_yaml

# AAC YAML -> Declarative API
with open("metrics/revenue.yaml") as f:
    parsed = yaml.safe_load(f)
declarative = yaml_metric_to_declarative(parsed)

# Declarative API -> AAC YAML
yaml_result = declarative_metric_to_yaml(declarative)

Types: static (_types) vs. runtime-validating (pydantic_models)

Two parallel sets of Python types are generated from the same AAC JSON Schema:

  • gooddata_code_convertors._types — TypedDicts, re-exported at the package top level (from gooddata_code_convertors import Dashboard). Static typing only, zero runtime cost, zero validation.
  • gooddata_code_convertors.pydantic_models — real Pydantic v2 BaseModels (not re-exported at the top level, to avoid name collisions with _types — import from the submodule directly: from gooddata_code_convertors.pydantic_models import Dashboard). Use these when you need actual runtime validation of a payload, e.g. Dashboard.model_validate(payload).

Gotcha: shared string-pattern fields (e.g. every entity's id) are wrapped in their own RootModel[str] class in pydantic_models rather than being plain str — access the value via .root (e.g. dashboard.id.root). This is a deliberate trade-off: collapsing them into plain str fields breaks import entirely, because pydantic-core's Rust regex engine can't compile this schema's negative-lookahead patterns once collapsed. _types' TypedDicts are unaffected (Dashboard["id"] is a plain str there, since TypedDict has no runtime pattern validation to trip over).

Available Converters

YAML -> Declarative API

  • yaml_dataset_to_declarative
  • yaml_date_dataset_to_declarative
  • yaml_metric_to_declarative
  • yaml_visualisation_to_declarative
  • yaml_dashboard_to_declarative
  • yaml_plugin_to_declarative
  • yaml_attribute_hierarchy_to_declarative

Declarative API -> YAML

  • declarative_dataset_to_yaml
  • declarative_date_instance_to_yaml
  • declarative_metric_to_yaml
  • declarative_visualisation_to_yaml
  • declarative_dashboard_to_yaml
  • declarative_plugin_to_yaml
  • declarative_attribute_hierarchy_to_yaml

Utilities

  • build_afm_execution

Release files for gooddata-code-convertors 11.59.0a0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for gooddata-code-convertors 11.59.0a0
File Interpreter ABI Platform
gooddata_code_convertors-11.59.0a0-py3-none-any.whl Python 3 none any Details

Release files / gooddata_code_convertors-11.59.0a0-py3-none-any.whl

Download URL gooddata_code_convertors-11.59.0a0-py3-none-any.whl
Size 1.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
96e03745f97f5a6f032d38e51043054888b963ad9bcc35d3276dc47001493a41
BLAKE2b-256 checksum
How to use checksums
2357ffe8c836ff0fa4fab62c7310a68a425e48381c584f1a42de19ce94b0d6ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 24, 2026.

Transparency log

Release history Release notifications | RSS feed

11.59.0

1 release file

This release

11.59.0a0 This release

1 release file

11.58.0

1 release file

11.57.0

1 release file

11.56.0

1 release file

11.54.0

1 release file

11.53.0

1 release file

11.52.0

1 release file

11.50.0

1 release file

11.49.0

1 release file

11.48.0

1 release file

11.47.0

1 release file

11.44.0

1 release file

11.43.0

1 release file

11.42.0

1 release file

11.41.0

1 release file

11.39.0

1 release file

11.38.0

1 release file

11.37.0

1 release file

11.36.0

1 release file

11.35.0

1 release file

11.32.0

1 release file

11.31.0

1 release file

11.30.0

1 release file

11.29.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page