Skip to main content

udi-grammar-py

Python code for generating Universal Discovery Interface (UDI) specifications.

Quick Start Guid

pip install udi-grammar-py

from udi_grammar_py import Chart, Op
spec = (Chart()
    .source("samples", "./data/example_samples.csv")
    .groupby(["organ", "organ_condition"])
    .rollup({"count": Op.count()})
    .mark("bar")
    .x(field="count", type="nominal")
    .y(field="ogan", type="quantitative")
    .color(field="organ_condition", type="quantitative")
    .to_json(pretty=True)
)
print(spec)

Result:

{
  "source": {
    "name": "samples",
    "source": "./data/example_samples.csv"
  },
  "transformation": [
    {
      "groupby": [
        "organ",
        "organ_condition"
      ]
    },
    {
      "rollup": {
        "count": {
          "op": "count"
        }
      }
    }
  ],
  "representation": {
    "mark": "bar",
    "mapping": [
      {
        "encoding": "x",
        "field": "count",
        "type": "quantitative"
      },
      {
        "encoding": "y",
        "field": "organ",
        "type": "nominal"
      },
      {
        "encoding": "color",
        "field": "organ_condition",
        "type": "nominal"
      }
    ]
  }
}

Release files for udi-grammar-py 0.3.0

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

Source distribution (sdist)

Source distribution for udi-grammar-py 0.3.0
File Size Uploaded
udi_grammar_py-0.3.0.tar.gz 10.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for udi-grammar-py 0.3.0
File Interpreter ABI Platform
udi_grammar_py-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.6 kB

Release files / udi_grammar_py-0.3.0.tar.gz

Download URL udi_grammar_py-0.3.0.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b7675a47720464b51a68951a3b023595b60ed0f82cdb3b010f1565392c77ca52
BLAKE2b-256 checksum
How to use checksums
d41a42d5af3eeeba515659590ad9f77318072bdf9c2a0e845499e9a2b7893288
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 23, 2026.

Transparency log

Release files / udi_grammar_py-0.3.0-py3-none-any.whl

Download URL udi_grammar_py-0.3.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
887b947a47e8e1dbd1f5f007f97dad7eb47f1fc554841925c919806f762ce3c7
BLAKE2b-256 checksum
How to use checksums
539a24a246b77d9c46275dcbbef131a0982fc112c32f3f0410016d806dcfa646
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 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

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