Cloc (CLingo Object Caller) is a Python library for converting ASP facts, that can come from a Clingo output into Python call(s). It can help build workflow tools. For large project, CLORM might be a more featured/reliable library.
Import the Github repository
git clone https://github.com/Owrel/cloc.git
In the project folder, install Cloc with pip:
pip install .
import cloc
class HelloWorld(cloc.Cloc):
def __init__(self) -> None:
super().__init__()
def hello(self):
print("HelloWorld")
h = HelloWorld()
h.from_str("hello.")
# Output: HelloWorld
More examples available here
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.