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
rdflibnamespaces for ActivityStreams, Security and Identity vocabularies - Secure document loader to replace remote HTTP fetching
- Compatible with
rdflibandpyldJSON-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.
Metadata
Release files for activitypub-linked-data 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| activitypub_linked_data-0.0.1.tar.gz | 9.1 kB | Without provenance | Details for activitypub_linked_data-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| activitypub_linked_data-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for activitypub_linked_data-0.0.1-py3-none-any.whl |
Total release size: 19.6 kB
Release files / activitypub_linked_data-0.0.1.tar.gz
| Download URL | activitypub_linked_data-0.0.1.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d93d2f4fad91d69f2d775ce3996ee15bfa4d763a2c729967d4b3b948c85321e3
|
|
BLAKE2b-256 checksum How to use checksums |
06947a5c39d7210e3bb8b7dd734237e905a273dbe398a7292d1c59dc9c5b6f16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.17
|
Release files / activitypub_linked_data-0.0.1-py3-none-any.whl
| Download URL | activitypub_linked_data-0.0.1-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d2aa266ff1e6fdc365631dee2c67eff23477a93e758cf52b36279c6a7c7907a
|
|
BLAKE2b-256 checksum How to use checksums |
750db306537b76cbbd07aede8c13a80e3ae912425dd3b8c83a3a9078994296a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.17
|
Security for activitypub-linked-data 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.