PyLD
Python implementation of the JSON-LD API
Decision gist · record as of 2026-08-14
Yes. PyLD is a mature, actively maintained implementation of a W3C standard with no known vulnerabilities, low install friction, and a permissive license. Install it if you need to process JSON-LD documents, work with linked data, or add semantics to JSON. The FrozenDocumentLoader and optional async support make it suitable for both development and production use.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with a pure-wheel distribution.
- Actively maintained with a recent release; the repository is not archived and has received commits.
- Three runtime dependencies (cachetools, frozendict, lxml) are all stable, widely-used libraries.
License · maintenance · safety
BSD 3-Clause license (permissive) — BSD 3-Clause is a permissive license. You can use, modify, and distribute PyLD with minimal restrictions, provided you include the license notice and disclaimer.
last release 2026-06-19 (56 days) · last repo commit 2026-08-14 · 678 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 358,441 downloads/mo, #7,261 on PyPI
Alternatives
Verify before relying
pip install PyLD
from pyld import jsonld
import json
doc = {"http://schema.org/name": "Example"}
context = {"name": "http://schema.org/name"}
compacted = jsonld.compact(doc, context)
print(json.dumps(compacted, indent=2))- Whether Python 3.10 or later is strictly required (requires_python field is unspecified in the fact sheet)
- Performance characteristics and memory footprint for large or deeply nested documents
- Whether remote context fetching is enabled by default and what security implications that carries
What it is and what it does
PyLD is a Python library that implements the JSON-LD 1.1 specification and related W3C recommendations for processing Linked Data in JSON. It provides core operations to transform JSON documents: compact (reduce verbosity using a context), expand (make all IRIs explicit), flatten (normalize nested structures), frame (reshape to a template), and normalize (create a canonical form for comparison or hashing). The library depends on cachetools for memoization, frozendict for immutable dictionaries, and lxml for XML processing.
The package is designed for applications that need to add semantic meaning to JSON, interoperate with RDF systems, or work with structured data formats like Microformats and Microdata. It includes a FrozenDocumentLoader for air-gapped deployments that prevents remote context fetches, and supports custom document loaders via Requests or aiohttp for production environments. The library aims for W3C spec conformance and is actively maintained.
Use it for
- Compact verbose JSON-LD documents using a context to make them more readable and reduce payload size
- Expand JSON-LD to explicit form for RDF processing, semantic analysis, or interoperability with linked data systems
- Normalize documents to a canonical form for content hashing, deduplication, or cryptographic signing
- Frame JSON-LD documents into a specific tree structure for application-specific data models
- Validate and process ActivityStreams, Verifiable Credentials, or DID documents using bundled W3C contexts
- Build semantic web services that need to handle multiple structured data formats (Microdata, RDFa, Microformats)
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
PyLD is a mature, actively maintained implementation of a W3C standard with no known vulnerabilities, low install friction, and a permissive license. Install it if you need to process JSON-LD documents, work with linked data, or add semantics to JSON. The FrozenDocumentLoader and optional async support make it suitable for both development and production use.
Install
pyld on PyPI
Before you install
Low install friction with a pure-wheel distribution. Actively maintained with a recent release; the repository is not archived and has received commits. Three runtime dependencies (cachetools, frozendict, lxml) are all stable, widely-used libraries.
License in practice
BSD 3-Clause is a permissive license. You can use, modify, and distribute PyLD with minimal restrictions, provided you include the license notice and disclaimer.
Quickstart
pip install PyLD
from pyld import jsonld
import json
doc = {"http://schema.org/name": "Example"}
context = {"name": "http://schema.org/name"}
compacted = jsonld.compact(doc, context)
print(json.dumps(compacted, indent=2))
Verify before relying
- Whether Python 3.10 or later is strictly required (requires_python field is unspecified in the fact sheet)
- Performance characteristics and memory footprint for large or deeply nested documents
- Whether remote context fetching is enabled by default and what security implications that carries
Package facts
| License | BSD 3-Clause license permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagescachetoolsfrozendictlxml |
| Maintenance | Actively maintained 56 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 358,441 / month, #7,261 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: ConsoleEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonTopic :: InternetTopic :: Software Development :: Libraries |
Evidence: pyld-3.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “json-ld processor python”
- PyLDPyLD is a Python implementation of the JSON-LD specification that…
- rdflib-jsonldProvides JSON-LD parsing and serialization for RDFLib graphs,…
- mlcroissantValidates and loads datasets described in the MLCommons Croissant…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also extruct · rdflib-jsonld · prov · rdflib · pyrdfa3 · schema-salad · linkml · pyoxigraph · json-flatten · jsondiff