======
.. 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
Metadata
Release files for SuRF 1.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| SuRF-1.1.9.tar.gz | 55.1 kB | Without provenance | Details for SuRF-1.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| SuRF-1.1.9-py2-none-any.whl | Python 2 | none | any | Details for SuRF-1.1.9-py2-none-any.whl |
Total release size: 136.1 kB
Release files / SuRF-1.1.9.tar.gz
| Download URL | SuRF-1.1.9.tar.gz |
|---|---|
| Size | 55.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9af110491a58d1575aba4c29488b31a84e70c6bebcc0135f32a5007f3dd3cefd
|
|
BLAKE2b-256 checksum How to use checksums |
914052e7c2e732372268f57ffd8767b677358486ce45d3517bee92c992368e0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / SuRF-1.1.9-py2-none-any.whl
| Download URL | SuRF-1.1.9-py2-none-any.whl |
|---|---|
| Size | 81.0 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
6cb284eb40b1f80549d17a1541f8d753bbc3b29a74f04bc53f9016c817579b7e
|
|
BLAKE2b-256 checksum How to use checksums |
baa21e4ccc3e4a2bfa2b64440b97ecc6facbd77b9bad3528cd2619a1ba855f58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for SuRF 1.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.