Git Product home page Git Product logo

fuseki-manager's Introduction

fuseki-manager

Build status

Code coverage

Code health

About

Jena/Fuseki API clients to manage server and datasets throught HTTP. Based on Fuseki server protocol.

Examples

from fuseki_manager import FusekiAdminClient

client = FusekiAdminClient()

# Get datasets
result = client.get_all_datasets()
# 'result' contains information about datasets
from fuseki_manager import FusekiSPARQLClient

db = FusekiSPARQLClient('dataset_name')

# SELECT request
query = "SELECT ?s ?p ?o WHERE { ?s ?p ?o } LIMIT 25"
result = db.query(query)
# result = JSON parsed response's results' bindings

# Other kind of requests with results
ns = {'foaf': 'http://xmlns.com/foaf/0.1/'}
query = 'ASK  { ?x foaf:name  "Alice" }'
result = db.raw_query(query, namespaces=ns)
# result = Raw JSON parsed response

# INSERT requets
ns = {'dc': 'http://purl.org/dc/elements/1.1/'}
query = 'INSERT DATA { <http://example/book1> dc:title "A new book" }'
result = db.update_query(query, namespaces=ns)
# result = Raw HTTP response

Installation

pip install setup.py

Development

Use a virtual environnement to debug or develop

# Create virtual environment
$ virtualenv -p /usr/bin/python3 $VIRTUALENVS_DIR/fuseki-manager

# Activate virtualenv
$ source $VIRTUALENVS_DIR/fuseki-manager/bin/activate

Tests

# Install test dependencies
$ pip install -e .[test]

# Run tests
$ py.test

# Skip slow tests
$ py.test -m 'not slow'

# Run tests with coverage
$ py.test --cov=fuseki_manager --cov-report term-missing

API Documentation ===========

https://nobatek.github.io/fuseki-manager/

fuseki-manager's People

Contributors

lafrech avatar pibmy avatar

Watchers

 avatar  avatar  avatar

Forkers

tobby2002

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.