
Welcome to PyLD!
****************

PyLD is a Python implementation of a JSON-LD processor.


API Reference
=============

pyld.jsonld.compact(input_, ctx, options=None)

   Performs JSON-LD compaction.

   Parameters:
      * **input** -- the JSON-LD input to compact.

      * **ctx** -- the JSON-LD context to compact with.

      * **[options]** --

        the options to use. [base] the base IRI to use.
        [compactArrays] True to compact arrays to single values when

           appropriate, False not to (default: True).

        [graph] True to always output a top-level graph (default:
        False). [expandContext] a context to expand with.
        [documentLoader(url)] the document loader

           (default: _default_document_loader).

   Returns:
      the compacted JSON-LD output.

pyld.jsonld.expand(input_, options=None)

   Performs JSON-LD expansion.

   Parameters:
      * **input** -- the JSON-LD input to expand.

      * **[options]** --

        the options to use. [base] the base IRI to use.
        [expandContext] a context to expand with.
        [documentLoader(url)] the document loader

           (default: _default_document_loader).

   Returns:
      the expanded JSON-LD output.

pyld.jsonld.flatten(input_, ctx=None, options=None)

   Performs JSON-LD flattening.

   Parameters:
      * **input** -- the JSON-LD input to flatten.

      * **ctx** -- the JSON-LD context to compact with (default:
        None).

      * **[options]** --

        the options to use. [base] the base IRI to use.
        [expandContext] a context to expand with.
        [documentLoader(url)] the document loader

           (default: _default_document_loader).

   Returns:
      the flattened JSON-LD output.

pyld.jsonld.frame(input_, frame, options=None)

   Performs JSON-LD framing.

   Parameters:
      * **input** -- the JSON-LD input to frame.

      * **frame** -- the JSON-LD frame to use.

      * **[options]** --

        the options to use. [base] the base IRI to use.
        [expandContext] a context to expand with. [embed] default
        @embed flag (default: True). [explicit] default @explicit flag
        (default: False). [requireAll] default @requireAll flag
        (default: True). [omitDefault] default @omitDefault flag
        (default: False). [documentLoader(url)] the document loader

           (default: _default_document_loader).

   Returns:
      the framed JSON-LD output.

pyld.jsonld.normalize(input_, options=None)

   Performs JSON-LD normalization.

   Parameters:
      * **input** -- the JSON-LD input to normalize.

      * **[options]** --

        the options to use. [base] the base IRI to use. [format] the
        format if output is a string:

           'application/nquads' for N-Quads.

        [documentLoader(url)] the document loader
           (default: _default_document_loader).

   Returns:
      the normalized JSON-LD output.


Indices and tables
==================

* *Index*

* *Module Index*

* *Search Page*


Requirements
============

PyLD is compatible with Python 2.5 and newer.


Credits
=======

Thanks to Digital Bazaar, the JavaScript JSON-LD parser, and the JSON-
LD community.


Contribute
==========

Source code is available:

   http://github.com/digitalbazaar/pyld


License
=======

PyLD is licensed under a BSD 3-Clause license.
