Skip to main content

pgass

Python bindings for pgass, a pretty good answer set solver. Build and solve answer set programs as typed Python classes:

import pgass

class Node(pgass.Predicate):
    x: int

class Edge(pgass.Predicate):
    x: int
    y: int

class Cover(pgass.Predicate):
    x: int

X, Y = pgass.vars("X Y")

program = pgass.Program()
program.add(Node(x) for x in range(1, 6))
program.add(Edge(x, y) for x, y in
            [(1, 2), (2, 3), (3, 4), (4, 5), (5, 1), (1, 3)])
program.add(pgass.choice(Cover(X)) << Node(X))
program.forbid(Edge(X, Y) & ~Cover(X) & ~Cover(Y))
program.minimize(Cover(X), weight=1, priority=0)

for answer_set in program.solve(models=0):
    print(sorted(c.x for c in answer_set[Cover]), answer_set.cost)

This is a minimum vertex cover: program.forbid says no edge may go uncovered at both ends, and program.minimize asks for the fewest covered nodes. See the root README for what pgass itself does and how the CLI works.

Metadata

Release files for pgass 1.0.4

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

Source distribution (sdist)

Source distribution for pgass 1.0.4
File Size Uploaded Provenance Actions
pgass-1.0.4.tar.gz 382.2 kB With provenance Details for pgass-1.0.4.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pgass 1.0.4
File Actions
pgass-1.0.4-cp312-abi3-manylinux_2_34_x86_64.whl CPython 3.12 abi3 Linux glibc 2.34+ x86-64 Details for pgass-1.0.4-cp312-abi3-manylinux_2_34_x86_64.whl
pgass-1.0.4-cp312-abi3-manylinux_2_34_aarch64.whl CPython 3.12 abi3 Linux glibc 2.34+ ARM64 Details for pgass-1.0.4-cp312-abi3-manylinux_2_34_aarch64.whl
pgass-1.0.4-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details for pgass-1.0.4-cp312-abi3-macosx_11_0_arm64.whl
pgass-1.0.4-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details for pgass-1.0.4-cp311-cp311-manylinux_2_34_x86_64.whl
pgass-1.0.4-cp311-cp311-manylinux_2_34_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ ARM64 Details for pgass-1.0.4-cp311-cp311-manylinux_2_34_aarch64.whl
pgass-1.0.4-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for pgass-1.0.4-cp311-cp311-macosx_11_0_arm64.whl
pgass-1.0.4-cp310-cp310-manylinux_2_34_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.34+ x86-64 Details for pgass-1.0.4-cp310-cp310-manylinux_2_34_x86_64.whl
pgass-1.0.4-cp310-cp310-manylinux_2_34_aarch64.whl CPython 3.10 CPython 3.10 Linux glibc 2.34+ ARM64 Details for pgass-1.0.4-cp310-cp310-manylinux_2_34_aarch64.whl
pgass-1.0.4-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details for pgass-1.0.4-cp310-cp310-macosx_11_0_arm64.whl
pgass-1.0.4-cp39-cp39-manylinux_2_34_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.34+ x86-64 Details for pgass-1.0.4-cp39-cp39-manylinux_2_34_x86_64.whl
pgass-1.0.4-cp39-cp39-manylinux_2_34_aarch64.whl CPython 3.9 CPython 3.9 Linux glibc 2.34+ ARM64 Details for pgass-1.0.4-cp39-cp39-manylinux_2_34_aarch64.whl
pgass-1.0.4-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details for pgass-1.0.4-cp39-cp39-macosx_11_0_arm64.whl

Total release size: 123.8 MB

Release files / pgass-1.0.4.tar.gz

Download URL pgass-1.0.4.tar.gz
Size 382.2 kB
Tags Source
SHA-256 checksum
How to use checksums
513919437db97e72d5f401a5302aa8625a550ce5c9846f4e1a76c563ffc0e337
BLAKE2b-256 checksum
How to use checksums
8d8391911f5f7d46ad97f515bd20d689dd03d12c935d8217e6695b8df3d0379f
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 Aug 15, 2026.

Transparency log

Release files / pgass-1.0.4-cp312-abi3-manylinux_2_34_x86_64.whl

Download URL pgass-1.0.4-cp312-abi3-manylinux_2_34_x86_64.whl
Size 11.4 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
af040a90cf0e8b72b5ed0a309890587f0b2f762d1de9d4459e4dc2b181bb3756
BLAKE2b-256 checksum
How to use checksums
5d1db0a0ec48db746a60a0b5021f3d7a3ab02f142cbcafe6ae7a88d632d4682b
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 Aug 15, 2026.

Transparency log

Release files / pgass-1.0.4-cp312-abi3-manylinux_2_34_aarch64.whl

Download URL pgass-1.0.4-cp312-abi3-manylinux_2_34_aarch64.whl
Size 10.7 MB
Tags CPython 3.12 Linux glibc 2.34+ ARM64 abi3
SHA-256 checksum
How to use checksums
7e83610279cbf1a5541f685d1c2fe53f53588e931b5519044be9d4c8aff75532
BLAKE2b-256 checksum
How to use checksums
1bf28e432d7547497613600c114519e4684c8efc26b382c5f69f117dc5049161
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 Aug 15, 2026.

Transparency log

Release files / pgass-1.0.4-cp312-abi3-macosx_11_0_arm64.whl

Download URL pgass-1.0.4-cp312-abi3-macosx_11_0_arm64.whl
Size 8.8 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7720755dd2d651466d350a6cb34ad982ae4c32fb257e8e0ef58680163ce4746c
BLAKE2b-256 checksum
How to use checksums
d35e01cc6841ca6124afd8d0c3b502b21a52405fa2172ffa85edf7be69289d72
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 Aug 15, 2026.

Transparency log

Release files / pgass-1.0.4-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL pgass-1.0.4-cp311-cp311-manylinux_2_34_x86_64.whl
Size 11.4 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
1d0b0c0fb95ce166161bd07cd477e14af3375a1a1258fcbff299fd9f3c9b62d8
BLAKE2b-256 checksum
How to use checksums
cb5bd0b5cb6926ff43af383a4bb621f4d8ba43d011c76cc585160e10947c4e6e
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 Aug 15, 2026.

Transparency log

Release files / pgass-1.0.4-cp311-cp311-manylinux_2_34_aarch64.whl

Download URL pgass-1.0.4-cp311-cp311-manylinux_2_34_aarch64.whl
Size 10.7 MB
Tags CPython 3.11 Linux glibc 2.34+ ARM64
SHA-256 checksum
How to use checksums
1ded57e20ac4a1b6ceadbac59f0e63bb6e773ced2025719e35694b65eda5475d
BLAKE2b-256 checksum
How to use checksums
07a2315c8362b2e43f8bd60ffa950066927d388c77f82dd4c0260efff429db7e
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 Aug 15, 2026.

Transparency log

Release files / pgass-1.0.4-cp311-cp311-macosx_11_0_arm64.whl

Download URL pgass-1.0.4-cp311-cp311-macosx_11_0_arm64.whl
Size 8.8 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d83e3287a2c6a602943f176c394f6acb473d1752715b8ddd438a6a8bd5dcb184
BLAKE2b-256 checksum
How to use checksums
148edafb567a04e25789ce4e7cf9d3caacd435a24c147fe1253954a342a95407
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 Aug 15, 2026.

Transparency log

Release files / pgass-1.0.4-cp310-cp310-manylinux_2_34_x86_64.whl

Download URL pgass-1.0.4-cp310-cp310-manylinux_2_34_x86_64.whl
Size 11.4 MB
Tags CPython 3.10 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
f48562d2cb515cff24d1016b8dede32195e8747a1c26233854c219ad9aee9b06
BLAKE2b-256 checksum
How to use checksums
dc4e4a24610b12048cbe4bce72a4caca8d7c6c3fe47bbab6039823d4fd771400
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 Aug 15, 2026.

Transparency log

Release files / pgass-1.0.4-cp310-cp310-manylinux_2_34_aarch64.whl

Download URL pgass-1.0.4-cp310-cp310-manylinux_2_34_aarch64.whl
Size 10.7 MB
Tags CPython 3.10 Linux glibc 2.34+ ARM64
SHA-256 checksum
How to use checksums
e74181fd39559f044c34083d3a2855ec4280b5c2f756f195fbf198a68e0bedd9
BLAKE2b-256 checksum
How to use checksums
a12b91cc19039617bb022f1d1f44fb8340ce831d1671be8562d1cd628af1a71d
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 Aug 15, 2026.

Transparency log

Release files / pgass-1.0.4-cp310-cp310-macosx_11_0_arm64.whl

Download URL pgass-1.0.4-cp310-cp310-macosx_11_0_arm64.whl
Size 8.8 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
bd38bcf1c6b1fa89a4db4d764cd0f9c5fe3313a53600a5bcd2a4ee8961522ddc
BLAKE2b-256 checksum
How to use checksums
1144d863a42297b21bfe03414815acfa0732483a8be39037878ff3ac49cf0fcd
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 Aug 15, 2026.

Transparency log

Release files / pgass-1.0.4-cp39-cp39-manylinux_2_34_x86_64.whl

Download URL pgass-1.0.4-cp39-cp39-manylinux_2_34_x86_64.whl
Size 11.4 MB
Tags CPython 3.9 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
84fb7cd7e6e2cebf5893ab63cba459172d71049d9e85f29b715f3acfbc58b246
BLAKE2b-256 checksum
How to use checksums
447208be8dc882f4289ef90f17a697a999723673fc548e66f696392f62ec0479
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 Aug 15, 2026.

Transparency log

Release files / pgass-1.0.4-cp39-cp39-manylinux_2_34_aarch64.whl

Download URL pgass-1.0.4-cp39-cp39-manylinux_2_34_aarch64.whl
Size 10.7 MB
Tags CPython 3.9 Linux glibc 2.34+ ARM64
SHA-256 checksum
How to use checksums
df60f2129e7cdb43100a0740a8a36ded7032abc0e4aa103d996eebedc8b3154b
BLAKE2b-256 checksum
How to use checksums
b2b97aac1d40d2cf6dd0e604f690b06597036b3bde33ccc38808f834148ede2a
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 Aug 15, 2026.

Transparency log

Release files / pgass-1.0.4-cp39-cp39-macosx_11_0_arm64.whl

Download URL pgass-1.0.4-cp39-cp39-macosx_11_0_arm64.whl
Size 8.8 MB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
44d8780ed4e00e3969ff6ea42ece0120836a0dd92a25f6c16493c820fb0c3cd7
BLAKE2b-256 checksum
How to use checksums
8f6cd8422817d1c9162af6dda0c89da192d532ca9187ee93ec9b6572c7a46d4f
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 Aug 15, 2026.

Transparency log

Security for pgass 1.0.4

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 13 files in this release have been uploaded with provenance metadata.

Select from 13 files

Attestation for pgass-1.0.4.tar.gz

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 Aug 15, 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