Using the REST extension - Python
Procedure
-
Create a new service in the Editor using
rest
as the value of theprovision
attribute. -
Reference the newly-created service by one or more operations.
<service name="REST" provision="rest"/> <mix name="Mix"> ... <request name="FirstDivisor" service="REST" fields="n"> <reply name="Ok" fields="div"/> </request> <request name="Test" service="REST" fields="div n"> <reply name="No" fields="NO"/> <reply name="Iterate" fields="ITERATE"/> </request> <consume name="Iterate" service="REST" fields="ITERATE div n"> <reply name="Next" fields="div n"/> <reply name="Stop" fields="YES"/> </consume> </mix>
- See the wiki of the SPARKL command-line interface on Using Python as the backend of a SPARKL mix.