Skip to main content

arg2p for Python

Arg2P, structured argumentation in Prolog (ASPIC+, ABA, ABA+, abstract frameworks, ...), from Python: the API of the library of the JVM, in snake case, run through JPype on the Java runtime the wheel bundles.

pip install arg2p
from arg2p import Arg2p, Flags, Semantics

arg2p = Arg2p.of("""
r1 : [] => a.
r2 : [] => -a.
sup(r1, r2).
""")

arg2p.answer("a").in_statements                 # ['a']
(graph,) = arg2p.graphs()
graph.conclusions("out")                        # ['-a']

preferred = Arg2p.of("f1 :=> d.\nf2 :=> -d.", Flags.defaults().argument_labelling_mode(Semantics.PREFERRED))
len(preferred.graphs())                         # 2

Arg2p.of("r1 :=> a.\nr2 : a => b.").causality.but_for("a", "b")   # True

See the documentation for the whole API: flags, graphs, Prolog goals, causality, the parallel solver and the command line (arg2p theory.pl -q a).

The MCP server

arg2p mcp runs the MCP server of Arg2P, for AI assistants to solve theories with it (the tools solve, answer, check, settings and explore), on the Java runtime of the wheel. With uv, nothing to install first:

uvx arg2p mcp

See AI assistants for the clients, and the plugin with the skills of Arg2P.

Building

The package is a project of the Gradle build of Arg2P, which gives it its jars, its version and its Java runtime:

./gradlew :python:pythonJars :python:pythonVersion :python:pythonRuntime
pip install "./python[test]"
pytest python/tests

Without the runtime (pythonRuntime), the package runs on the Java of the system (21 or later). ARG2P_JVM names another library of the JVM, ARG2P_CLASSPATH other jars, ARG2P_STACK the stack of its threads (512m) and ARG2P_JVM_OPTIONS its other options (as -Xmx8g, for the heap of large graphs).

Metadata

Release files for arg2p 0.20.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for arg2p 0.20.0
File Actions
arg2p-0.20.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for arg2p-0.20.0-py3-none-win_amd64.whl
arg2p-0.20.0-py3-none-manylinux2014_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for arg2p-0.20.0-py3-none-manylinux2014_x86_64.whl
arg2p-0.20.0-py3-none-manylinux2014_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for arg2p-0.20.0-py3-none-manylinux2014_aarch64.whl
arg2p-0.20.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for arg2p-0.20.0-py3-none-macosx_11_0_arm64.whl
arg2p-0.20.0-py3-none-macosx_10_15_x86_64.whl Python 3 none macOS 10.15+ x86-64 Details for arg2p-0.20.0-py3-none-macosx_10_15_x86_64.whl
arg2p-0.20.0-py3-none-any.whl Python 3 none any Details for arg2p-0.20.0-py3-none-any.whl

Total release size: 188.3 MB

Release files / arg2p-0.20.0-py3-none-win_amd64.whl

Download URL arg2p-0.20.0-py3-none-win_amd64.whl
Size 35.4 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
04624ffa6b0a2aa101465f25667a4d71e4f888320930b28ca7868c3180e4b638
BLAKE2b-256 checksum
How to use checksums
7953d7483f922969da967497c0675c8952e824745836cdfa65842a583d803a52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / arg2p-0.20.0-py3-none-manylinux2014_x86_64.whl

Download URL arg2p-0.20.0-py3-none-manylinux2014_x86_64.whl
Size 37.3 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c72bb2f5be1c185c22e300b70067f3cbcd4121f39ac1d31ab24dc0ef8da01074
BLAKE2b-256 checksum
How to use checksums
101e8d8827614022ae9f13570101be04b92c06f08e747d1d1ed37fe18a92de54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / arg2p-0.20.0-py3-none-manylinux2014_aarch64.whl

Download URL arg2p-0.20.0-py3-none-manylinux2014_aarch64.whl
Size 36.9 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
5162573e215a0c53940c75ce54add83765f9f062144249362cd3b7aa95c36e22
BLAKE2b-256 checksum
How to use checksums
be2a534453b50b11e6b05f1f474d07fbb88aec086cf86c46d1fe8ef750c005b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / arg2p-0.20.0-py3-none-macosx_11_0_arm64.whl

Download URL arg2p-0.20.0-py3-none-macosx_11_0_arm64.whl
Size 33.7 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
bfe205baae079229ed0529e453aaea27bd40bf3b28b782a29233d5076368a75d
BLAKE2b-256 checksum
How to use checksums
bf2ee0a91372ade9313113dccb19afc63435f1149b68e36cc5e440c26b04322a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / arg2p-0.20.0-py3-none-macosx_10_15_x86_64.whl

Download URL arg2p-0.20.0-py3-none-macosx_10_15_x86_64.whl
Size 34.5 MB
Tags Python 3 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
2649571ae4d6d0931b812eeedb90edb5e8dfdd990b6ee99fd0a74147c2c0f743
BLAKE2b-256 checksum
How to use checksums
7c7c6b770fd804b59d216f664c722a68bb0a199c8547633817547dc694dfd73b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Release files / arg2p-0.20.0-py3-none-any.whl

Download URL arg2p-0.20.0-py3-none-any.whl
Size 10.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
7eef244d77dae58622235444894ab446b81b5d3faf01320f53258e24ed8398ba
BLAKE2b-256 checksum
How to use checksums
1ab066f7249f2938ca2592a510e8e4303dd3e46c0134924401d4c36c9b2c5be1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 28, 2026.

Transparency log

Security for arg2p 0.20.0

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.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for arg2p-0.20.0-py3-none-win_amd64.whl

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 Oct 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page