Skip to content

bioinformatics-ua/coeus-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COEUS python (non official client)

Installation

You will need to install the python dependencies:

pip install -r requirements.txt

Install it yourself as:

$ pip install coeus

Usage

# define COEUS base host address
c = coeus.COEUS( "uavr", "http://localhost:8080/coeus/")
# execute SPARQL query on COEUS host
# returns RDF::Query::Solution array
c.query('SELECT * {?s ?p ?o}')
# get triples from COEUS knowledge base (http://bioinformatics.ua.pt/coeus/documentation/#rest)
# returns array with binded objects
 c.triple('coeus:concept_BBC', 'p', 'obj')
# write triples to COEUS knowledge base (http://bioinformatics.ua.pt/coeus/documentation/#rest)
# returns true if data written
c.write('coeus:python_x','dc:title','python_x')
# updates triple in COEUS knowledge base (http://bioinformatics.ua.pt/coeus/documentation/#rest)
# returns true if data updated
c.update('coeus:python_x','dc:title','python_x', 'coeus-python')
# delete triple from COEUS knowledge base (http://bioinformatics.ua.pt/coeus/documentation/#rest)
# returns true if data deleted
c.delete('coeus:python_x','dc:title','coeus-python')
# search in free text #ALPHA #TESTING
# returns the triple results
c.search('Nanopublications')
# import data into COEUS knowledge base
# returns the result
c.read("test_file.rdf", "RDF/XML")

Contact

Luis A. Bastiao Silva - bastiao at ua dot pt

Based on https://github.com/bioinformatics-ua/coeus-gem (by Pedro Lopes)

Releases

No releases published

Packages

No packages published

Languages