Skip to main content
Version Build Status Coverage Status

This is an implementation of a python3-based Linked Data Notification sender and consumer.

Installing

pip install py-ldplib

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

Aaron Coburn

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-ldnlib-0.1.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_ldnlib-0.1.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file py-ldnlib-0.1.2.tar.gz.

File metadata

  • Download URL: py-ldnlib-0.1.2.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for py-ldnlib-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d251595d2c4f41c6f96f2eb17ce71d0dc4498bc8fd9080b0c028dfa9f557e41e
MD5 0508342cecf4ea3f014ffde63eef87b6
BLAKE2b-256 97c28796591730e9d0b5eb266ded1601ad11ae7a719420a26facf4850d6e2304

See more details on using hashes here.

File details

Details for the file py_ldnlib-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: py_ldnlib-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for py_ldnlib-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0a2ddbdd15c8bb14bc88f1a4dde385340e053746346ff27266f1882d1bfa3747
MD5 15f3c5151d2eecbc19f97933ec4cc281
BLAKE2b-256 2601b16dadf90ac5123432b4e68b0b1cca21a8475e0ec86df13725774f5ef97b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page