Skip to content

CLI

Requires pip install PyLD[cli]

PyLD ships a pyld command-line tool for JSON-LD 1.1 transformations.

JSON-LD inputs accept a local path, URL, or explicit - for standard input. Contexts and frames accept a local path, URL, or -. Only one operand in an invocation may consume standard input. Raw N-Quads input accepts only a local path or -, and N-Quads output is written directly to standard output without JSON quoting or terminal styling.

  • pyld get


    Retrieve a JSON-LD document from a path, URL, or explicit stdin input (-).

  • pyld expand


    Expand a JSON-LD document into full IRI-based form.

  • pyld compact


    Compact a JSON-LD document using a context.

  • pyld flatten


    Flatten a JSON-LD document into a single node map.

  • pyld frame


    Frame a JSON-LD document into a selected tree shape.

  • pyld to-rdf


    Convert JSON-LD to raw N-Quads.

  • pyld from-rdf


    Convert raw N-Quads to JSON-LD.

  • pyld cache


    Manage the CLI HTTP cache for remote JSON-LD contexts.