Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Object RDF Mapper

Project Description
Status
======

.. image:: https://travis-ci.org/cosminbasca/surfrdf.svg?branch=master
:target: https://travis-ci.org/cosminbasca/surfrdf


Description
===========

*SuRF* is a Python library for working with RDF data in an Object-Oriented manner. In SuRF, RDF nodes (subjects and
objects) are represented as Python objects and RDF edges (predicates) as their attributes. *SuRF* is an Object RDF
Mapper (ORM), similar in concept to Object Relational Mappers like *SQLAlchemy*.


Documentation
=============

http://surf-rdf.readthedocs.io/en/latest/


Install
=======

Install SuRF:

.. code:: sh

$ pip install --upgrade surf


Starting with version **1.1.9** the *surf.rdflib* and *surf.sparql_protocol* plugins are bundled with *SuRF*.

You'll need one of the following plugins (also installable by `pip`):

- *surf.allegro_franz*, for the AllegroGraph RDFStore
- *surf.sesame2*, for stores with a Sesame2 HTTP API


Example
=======

The example below shows how to query a resource using the rdflib in-memory backend:

.. code:: python

>>> from surf import *
>>> store = Store(reader='rdflib',
... writer='rdflib',
... rdflib_store='IOMemory')
>>> session = Session(store)
>>> store.load_triples(source='http://www.w3.org/People/Berners-Lee/card.rdf')
True
>>> Person = session.get_class(ns.FOAF.Person)
>>> all_persons = Person.all()
>>> for person in all_persons:
... print person.foaf_name.first
...
Timothy Berners-Lee


Documentation
=============

You can read the documentation online at http://packages.python.org/SuRF/

To build the documentation yourself, install sphinx and run the build step:

.. code:: sh

$ pip install sphinx
$ python setup.py build_sphinx


Testing
=======

*SuRF* uses *tox* and *py.test* for testing:

.. code:: sh

$ tox
Release History

Release History

This version
History Node

1.1.9

History Node

1.1.4-r352

History Node

1.1.3-r294

History Node

1.1.3-r281

History Node

1.1.2-r280

History Node

1.1.1-r271

History Node

1.1.1-r263

History Node

1.1.1-r255

History Node

1.1.1-r254

History Node

1.1.1-r0

History Node

1.1.0-r233

History Node

1.1.0-r0

History Node

1.0.0-r224

History Node

1.0.0-r202

History Node

1.0.0-r190

History Node

0.7.4-r140

History Node

0.7.4-r136

History Node

0.7.2-r132

History Node

0.7.2-r129

History Node

0.7.2-r127

History Node

0.7.2-r126

History Node

0.6.1-r120

History Node

0.6.1-r115

History Node

0.5.0-r112

History Node

0.5.0-r94

History Node

0.5.0-r91

History Node

0.5.0-r90

History Node

0.5.0-r67

History Node

0.5.0-r66

History Node

0.5.0-r52

History Node

0.5.0-r51

History Node

0.5.0-r48

History Node

0.5.0-r47

History Node

0.5.0-r46

History Node

0.5.0-r44

History Node

0.5.0-r42

History Node

0.5.0-r41

History Node

0.5.0-r40

History Node

0.5.0-r39

History Node

0.5.0-r38

History Node

0.5.0-r37

History Node

0.5.0-r27

History Node

0.4.0-r25

History Node

0.4.0-r24

History Node

0.4.0-r23

History Node

0.4.0-r22

History Node

0.4.0-r21

History Node

0.4.0-r20

History Node

0.4.0-r18

History Node

0.4.0-r17

History Node

0.4.0-r16

History Node

0.4.0-r13

History Node

0.4.0-r12

History Node

0.4.0-r11

History Node

0.4.0-r10

History Node

0.4.0-r8

History Node

0.4.0-r4

History Node

0.4.0-r3

History Node

0.4.0-r2

History Node

0.4.0

History Node

0.1.8

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
SuRF-1.1.9-py2-none-any.whl (81.0 kB) Copy SHA256 Checksum SHA256 2.7 Wheel May 5, 2016
SuRF-1.1.9.tar.gz (55.1 kB) Copy SHA256 Checksum SHA256 Source May 5, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS 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