Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython

fise.client is unavailable in PyPM, because there aren't any builds for it in the package repositories. Click the linked icons to find out why.

 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
Linux (64-bit)
 
Links
Author
License
Python Software Foundation License
Depended by

This is the Python client for Semantic Engine Apache Stanbol FISE (see also the old IKS-WIKI). Edutainment: Watch the Video by Olivier Grisel

FISE offers a RESTful API with basically three methods of interaction:

engines stateless interface, submit content to the fise engines and get the resulting enhancements formatted as RDF at once without storing anything on the server-side.

store Upload content to the store and in a second step get the enhancements back.

sparql access FISE as a SPARQL endpoint (W3C conform).

This API covers engines and store. Sparql queries are best done by using existing library SuRF which is installed as a dependecy with this package.

Python API

Initialize:

>>> from fise.client import FISE
>>> fise = FISE('http://localhost:8080/')

Use the engines:

>>> somedoc = u"This is an example text."
>>> fise.engines(somedoc)

System Message: ERROR/3 (<string>, line 35)

Inconsistent literal block quoting.

<xml...>

>>> fise.engines(somedoc, format='rdfjson')
jsonresponse

Use the store, first store content (only plain text is accepted for now):

>>> id = 'test123'
>>> fise.store.content[id] = payload

Next get the text back:

>>> fise.store.content[id]

System Message: ERROR/3 (<string>, line 48)

Inconsistent literal block quoting.

u"This is an example text."

Then get the metadata:

>>> fise.store.metadata(id)

System Message: ERROR/3 (<string>, line 53)

Inconsistent literal block quoting.

<RDF>

And FISE special feature: Get an HTML page about the content:

>>> fise.store.page(id)

System Message: ERROR/3 (<string>, line 58)

Inconsistent literal block quoting.

<HTML>

Install

Demo Installation

If you want to try this package as is this is probably a good starting point.

Fetch the package sources and unpack them in a directory of your choice:

$ wget http://pypi.python.org/packages/source/f/fise.client/bda.cache-[VERSION].tar.gz
$ tar xzf bda.cache-[VERSION].tar.gz
$ cd bda.cache-[VERSION]

Python 2.6 or 2.7 needs to be available.

To avoid collisions with packages already installed in your pre-installed python virtualenv is used (instead of easy_install on Debian/Ubuntu sudo apt-get install python-virtual works fine):

$ easy_install virtualenv
$ python2.6 virtualenv  --no-site-packages py

Bootstrap and run the contained buildout. This fetches FISE early adopter release and provides a start script for FISE. It installs all Python dependencies of fise.client and provides a script to run all tests and a Python shell with all packaged installed:

$ ./py/bin/python bootstrap.py
$ ./bin/buildout

Start the FISE semantic engine.

$ ./bin/fise-instance

Now connect with a webbrower to http://localhost:8080/, the FISE web-frontend.

Running the tests shows if everything working as expected (needs a running fise-instance):

$ ./bin/tests

Start a Python shell with fise.client included:

$ ./bin/py
>>> from fise.client import FISE
>>>
Installation within existing environment

To add this package to an existing environment do:

$ easy_install fise.client

Or if your using zc.buildout add a line to the eggs in your buildout.cfg and re-run buildout:

[buildout]

System Message: ERROR/3 (<string>, line 121)

Inconsistent literal block quoting.

... eggs = ... fise.client ...

Or if your'e writing an own python-package add it to the install_requires section.

Changelog

1.1
  • make it work with restkit 3.2.3 [jensens, 2011-06-07]
1.0
  • initial code, tests and documentation

Subscribe to package updates

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.