asplain
Asplain is a tool for generating contrastive explanations for answer set programs (ASP).
Installation
To install the project, run
pip install .
For rendering the images with cligraph, Graphviz needs to be installed
following graphviz <https://www.graphviz.org/download/>_ (version 2.50 or
greater).
Documentation
Full documentation is available at docs.potassco.org/asplain.
Usage
Run the following for basic usage information:
asplain -h
For a basic usage example, see the examples/james-bond/README.md file.
LLM Integration
For using the OpenAI API, an API-Key has to be provided in the OPENAI_API_KEY
environment variable. This can be done using a .envfile or directly in the
command line.
Using the .env file
Create a .env file in the root directory of the project and add the following
line
OPENAI_API_KEY=<your-api-key>
Using the command line
OPENAI_API_KEY=<your-api-key> asplain --llm=<model-tag>
Release files for asplain 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| asplain-1.2.1.tar.gz | 933.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asplain-1.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 986.3 kB
Release files / asplain-1.2.1.tar.gz
| Download URL | asplain-1.2.1.tar.gz |
|---|---|
| Size | 933.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
21852db673087ad1f338f80496ca83ed9a059c8ebd95b33c4b156530843d4390
|
|
BLAKE2b-256 checksum How to use checksums |
cd681abb2e545cade95615ce368ef3c3c7c49c68a53c58be39ed7da4de37d35a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.
Transparency logRelease files / asplain-1.2.1-py3-none-any.whl
| Download URL | asplain-1.2.1-py3-none-any.whl |
|---|---|
| Size | 53.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35939bf010ba026e09627a6ce8396925e5b9a70a795827ab98a7e7f0e9ffe0c3
|
|
BLAKE2b-256 checksum How to use checksums |
4d9f184379298a744ec720490f479142ad463ed8cef5546d074f5e5a1293f659
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.
Transparency log