This is an implementation of a python3-based Linked Data Notification sender and consumer.
Installing
pip install py-ldnlib
Adding an LDN sender to your code
A simple LDN Sender could be written as:
import ldnlib
sender = ldnlib.Sender()
inbox = sender.discover(target_resource)
if inbox is not None:
sender.send(inbox, data)
The data value may be a string, a dictionary, a list or an rdflib-based Graph.
Adding an LDN consumer to your code
A simple LDN Consumer could be written as:
import ldnlib
consumer = ldnlib.Consumer()
inbox = consumer.discover(target_resource)
if inbox is not None:
for iri in consumer.notifications(inbox):
// fetch the notification as a Python dictionary
notification = consumer.notification(iri)
Authentication
If the target-resource or inbox-resource requires authentication, an auth tuple may be supplied:
import ldnlib
sender = ldnlib.Sender()
inbox = sender.discover(target_resource, auth=(username, password))
if inbox is not None:
sender.send(inbox, data, auth=(username, password))
Maintainer
Metadata
Release files for py-ldnlib 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| py-ldnlib-0.1.3.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| py_ldnlib-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.1 kB
Release files / py-ldnlib-0.1.3.tar.gz
| Download URL | py-ldnlib-0.1.3.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b89a049b9d41390a7cbe63d80833807a9d452e8b888b5a5933a0e8234624499
|
|
BLAKE2b-256 checksum How to use checksums |
a470f9b03f3a2da1f89c07f5182830ed7a620a85601de5c24351155d3db73950
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/2.7.10
|
Release files / py_ldnlib-0.1.3-py3-none-any.whl
| Download URL | py_ldnlib-0.1.3-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d962fc088a3b7dc2070625fd755ac969b024ccde596bf10870ca6bdcdb16fd0f
|
|
BLAKE2b-256 checksum How to use checksums |
6ddd2816daec4a7c3f626d52009545cea98033b24728681d44c9d193731b2df3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/2.7.10
|