Skip to content

pyld frame

Requires pip install PyLD[cli]

Frame a JSON-LD document using a required frame. INPUT accepts a path, URL, or -; FRAME accepts a path, URL, or -. Only one operand may read from standard input.

pyld frame --help
Usage: pyld frame [OPTIONS] {INPUT} {FRAME}

Frame a JSON-LD document.

╭─ Arguments ──────────────────────────────────────────────────────────────────────────╮
* INPUT <str> Path or HTTP(S) URL. Pass - to read from standard input.
[required]
* FRAME <str> Frame path or URL. Pass - to read JSON from standard input.
[required]
╰──────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ────────────────────────────────────────────────────────────────────────────╮
--expand-context <str> Context path or
URL. Pass - to read
JSON from standard
input.
--base <str> The base IRI to
use.
--extract-all-scri… --no-extract-all-… Extract all JSON-LD
script elements
from HTML, or just
the first.
--embed <@once|@always|@ne Default @embed
ver|@last|@link> behavior.
--explicit --no-explicit Default @explicit
behavior.
--omit-default --no-omit-default Default
@omitDefault
behavior.
--prune-blank-node… --no-prune-blank-… Remove unnecessary
blank node
identifiers.
--require-all --no-require-all Default @requireAll
behavior.
--help Show this message
and exit.
╰──────────────────────────────────────────────────────────────────────────────────────╯

Example

pyld frame docs/examples/data/person.jsonld docs/examples/data/frame.jsonld{
"@context": {
"name": "http://schema.org/name"
},
"name": "Ada Lovelace"
}

Source person.jsonld

{
  "@context": {
    "name": "http://schema.org/name"
  },
  "name": "Ada Lovelace"
}

Source frame.jsonld

{
  "@context": {
    "name": "http://schema.org/name"
  }
}