Using the REST extension - Python


  1. Create a new service in the Editor using rest as the value of the provision attribute.
  2. 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 name="Test" service="REST" fields="div n">
          <reply name="No" fields="NO"/>
          <reply name="Iterate" fields="ITERATE"/>
        <consume name="Iterate" service="REST" fields="ITERATE div n">
          <reply name="Next" fields="div n"/>
          <reply name="Stop" fields="YES"/>
  3. See the wiki of the SPARKL command-line interface on Using Python as the backend of a SPARKL mix.