SPARQL-Anything / PySPARQL-Anything

The SPARQL Anything Python library
Apache License 2.0
10 stars 0 forks source link

PySPARQL Anything Entry Point/CLI #13

Closed MarcoR1791 closed 4 months ago

MarcoR1791 commented 7 months ago

The title explains it.

Experimenting with the Python build tools I noticed that we can specify an entry point to the library. This in theory would allow the user to for example be able to call the SparqlAnything.run method directly from the command line without running the Python shell, import statements and create an object.

@enridaga Would you like me to look into this further?

enridaga commented 7 months ago

Why not, what would be the advantages compared to the java cli?

MarcoR1791 commented 7 months ago

One would be that one should be able to do something like

$ sparql-anything -q query

rather than

java -jar sparql.anything-null  -q query

A second advantage would be that if one downloads the Python library, then they have access to the CLI, the Python library and possibly also the fuseki server with one download.

MarcoR1791 commented 7 months ago

I've uploaded a little test in tests/cli.py (commit 3f2bc8c).

It passes all the usual tests.

Does require 0.9.0.1 to run though.

MarcoR1791 commented 4 months ago

Solved in commit 5053c94