GithubHelp home page GithubHelp logo

web5design / rdflib Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rdflib/rdflib

0.0 3.0 0.0 9.67 MB

RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.

Home Page: http://wikipedia.org/wiki/RDFLib

License: Other

rdflib's Introduction

RDFLib

RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information as graphs.

RDFLib may be installed with setuptools (easy_install) or pip::

$ easy_install rdflib

or

$ pip install rdflib

Getting Started

RDFLib aims to be a pythonic RDF API, a Graph is a python collection of RDF Subject,Predicate,Object Triples:

import rdflib
g=rdflib.Graph()
g.load('http://dbpedia.org/resource/Semantic_Web')

for s,p,o in g: 
  print s,p,o

The components of the triples are URIs (resources) or Literals (values), URIs are grouped together by namespace, common namespaces are included in RDFLib:

semweb=rdflib.URIRef('http://dbpedia.org/resource/Semantic_Web')
type=g.value(semweb, rdflib.RDFS.label) 

Where rdflib.RDFS is the RDFS Namespace, graph.value returns an object of the triple-pattern given (or an arbitrary one if more exist). New Namespaces can also be defined:

dbpedia=Namespace('http://dbpedia.org/ontology/')

abstracts=list(x for x in g.objects(semweb, dbpedia['abstract']) if x.language=='en')

See also ./examples

Features

The library contains parsers and serializers for RDF/XML, N3, NTriples, N-Quads, Turtle, TriX, RDFa and Microdata.

The library presents a Graph interface which can be backed by any one of a number of Store implementations.

This core RDFLib package includes store implementations for in memory storage and persistent storage on top of the Berkeley DB.

RDFLib is open source and is maintained on GitHub. RDFLib releases, current and previous are listed on PyPi

RDFLib has a plugin-architecture for store-implementation, as well as parsers/serializers, several other projects exist which extend RDFLib features:

Support

More information is available on the project webpage:

https://github.com/RDFLib/rdflib/

Continuous integration status details available from travis.ci:

Build Status

The RDFExtras project offers several additional stores as well as a SPARQL engine for use with RDFLib:

https://github.com/RDFLib/rdfextras/

The documentation can be built by doing::

$ python setup.py build_sphinx

And is also available from ReadTheDocs:

http://readthedocs.org/docs/rdflib/

Support is available through the rdflib-dev group:

http://groups.google.com/group/rdflib-dev

and on the IRC channel #rdflib on the freenode.net server

rdflib's People

Contributors

gromgull avatar iherman avatar takluyver avatar niklasl avatar eikeon avatar dzinxed avatar besbes avatar joernhees avatar jeroenh avatar saschpe avatar uholzer avatar while0pass avatar

Watchers

JT5D avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.