This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

LD4Apps is an Apache2 licensed Python library for Linked Data for Applications (LDA). LDA helps you implement applications that will be part of a bigger coherent system, for example a web-site made up of multiple applications that talk to each other. LDA applications are system components that communicate entirely through HTTP/REST interfaces.

Installation

To install LD4Apps:

pip install ld4apps

The LDA framework requires a running back-end database for storing application data. The default storage implementation uses MongoDB, so the fastest way to get started is to simply go to the MongoDB download page and download the appropriate version for your OS.

Once MongoDB has downloaded, execute the following commands:

cd <mongodb-installation-directory>/bin
mongod

At this point, MonoDB should be running and listening on its default host and port (localhost:27017).

To configure LDA with the MongoDB server, 3 environment variables also need to be set:

  1. MONGODB_DB_HOST - hostname of the MONGODB server to use
  2. MONGODB_DB_PORT - the MONGDOB server port
  3. APP_NAME - the name of you application, which is used as the DB name where the resources will be stored

Example

You can create a Linked-Data resource using the ld4apps.lda module like this:

>>> import os
>>> os.environ['MONGODB_DB_HOST'] = 'localhost'
>>> os.environ['MONGODB_DB_PORT'] = '27017'
>>> os.environ['APP_NAME'] = 'teststore'
>>> from ld4apps import lda
>>> foo_container_environ = {'HTTP_HOST': 'localhost', 'PATH_INFO': '/tst/foo', 'QUERY_STRING': ''}
>>> new_foo_resource = {'rdfs_label': 'my foo', 'rdf_type': 'http://example.org#Foo'}
>>> body, status, headers = lda.create_document(foo_container_environ, new_foo_resource, 'in_foo_container')
INFO:ld4apps.mongodbstorage.operation_primitives:created document http://localhost/tst/foo/4.1
>>> status
201
>>> import json
>>> print json.dumps(body, indent=4)
{
    "ce_owner": "http://localhost/unknown_user/da36bb01-0d1c-438a-9d00-9940085aae20",
    "rdfs_label": "my foo",
    "in_foo_container": "http://localhost/tst/foo",
    "ce_lastModified": "2015-04-28T18:30:40.993176+00:00",
    "dc_created": "2015-04-28T18:30:40.993176+00:00",
    "ac_resource-group": "http://localhost/",
    "_subject": "http://localhost/tst/foo/3.2",
    "ce_revision": "0",
    "ce_lastModifiedBy": "http://localhost/unknown_user/da36bb01-0d1c-438a-9d00-9940085aae20",
    "dc_creator": "http://localhost/unknown_user/da36bb01-0d1c-438a-9d00-9940085aae20",
    "rdf_type": "http://example.org#Foo"
}

An example using ld4apps along with Flask to implement a simple “todo list” web-server can be found here: https://github.com/ld4apps/lda-examples/tree/ld4apps/todo-flask.

Documentation

Documentation is available at http://ld4apps.github.io/.

Release History

Release History

0.9.7

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.9.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.9.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.9.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.9.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.9.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.9.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
LD4Apps-0.9.7.tar.gz (49.2 kB) Copy SHA256 Checksum SHA256 Source May 12, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting