Catalog PyPI
PACKAGE EXPLORERView in registry

activitypub-linked-data

PyPI

JSON-LD context loader and RDF schema definitions for ActivityPub

activitypubjsonld
Versions collected1
Direct dependencies1From release 0.0.1
Last observed20 Oct, 18:38 UTC

README

Version 0.0.1 documentation

activitypub-linked-data

Local JSON-LD context loader and RDF namespace definitions for ActivityPub and the Fediverse

activitypub-linked-data is a Python utility package that provides preloaded JSON-LD context documents and RDF namespace constants for use in ActivityPub implementations and other Fediverse-compatible applications. It includes a built-in JSON-LD document loader optimized for speed, reliability, and offline use.

Features

  • Local resolution of common JSON-LD context URLs used in the Fediverse
  • Built-in rdflib namespaces for ActivityStreams, Security and Identity vocabularies
  • Secure document loader to replace remote HTTP fetching
  • Compatible with rdflib and pyld JSON-LD processing
  • Designed for use in Fediverse applications, including servers and identity tools

Installation

pip install activitypub-linked-data

Usage

from pyld import jsonld

from ap.linked_data import AS2, setup_rdflib_local_handler, jsonld_local_document_loader

if __name__ == '__main__':
    setup_rdflib_local_handler() # Patches rdflib to use locally defined contexts, when available.

    # Sets up jsonld to use local context documents
    jsonld.set_document_loader(jsonld_local_document_loader)

    # Use a namespace
    print(AS2.Person)  # -> https://www.w3.org/ns/activitystreams#Person

Note: pyld is not declared as a dependency. You need to include in your own project if you wish to use jsonld_local_document_loader

Attribution

This package is derived from the Takahē project, which is licensed under the BSD 3-Clause License.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.0.121 May 20251

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:38 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:d704386524fd6efbaec400ab4f0b4f5f1664aeda2ec36ba4c443a5f6219e75a0