allpairspy
Pairwise test combinations generator
What it is and what it does
AllPairs is a test combinations generator that implements pairwise testing—a combinatorial technique that reduces the number of test cases needed while still covering most interactions between variables. Instead of testing every possible combination (which grows exponentially), it generates a minimal set where each pair of parameter values appears together at least once. This is useful when you have many configuration options or input parameters and want to test their interactions without the explosion of a full factorial matrix.
The package works as a Python iterator, accepting either a list of lists or an OrderedDict of parameter options. It supports filtering to exclude invalid combinations and can generate n-wise combinations beyond pairs when needed. It integrates cleanly with pytest for parameterized testing and has no external runtime dependencies, making it lightweight to add to a test suite.
Use it for:
- Reduce test suite size for software with many configuration options by generating representative pairwise combinations instead of exhaustive tests.
- Parameterize pytest tests with a minimal set of input combinations that still exercise most variable interactions.
- Filter out known invalid parameter combinations while generating test cases to avoid wasting test execution on impossible scenarios.
- Generate test matrices for hardware or OS compatibility testing where you have multiple brands, versions, and features to combine.
- Create n-wise combinations beyond pairs when you need to test higher-order interactions between specific parameters.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates minimal test case combinations using pairwise testing, reducing the number of test scenarios needed to cover interactions between multiple variables.
Yes, if you need to reduce test case explosion in parameterized testing. The package is stable, has no dependencies, and solves a real problem in combinatorial test design. The dormant maintenance status is not a blocker for a mature algorithm, but verify that pairwise coverage meets your testing requirements before relying on it for critical quality gates.
Install
allpairspy on PyPI
pip
pip install allpairspyuv
uv add allpairspypoetry
poetry add allpairspyInstalling allpairspy
Before you install
Low friction installation with no runtime dependencies. Maintenance is dormant—last release was 2023-07-08—but the package is marked Production/Stable and the repository remains active and unarchived.
License in practice
MIT License (permissive) allows free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
from allpairspy import AllPairs
parameters = [
["Brand X", "Brand Y"],
["98", "NT", "2000", "XP"],
["Internal", "Modem"],
]
for i, pairs in enumerate(AllPairs(parameters)):
print(f"{i}: {pairs}")
Requires Python 3.7 or later.
Verify before relying
- Whether the algorithm produces optimal pairwise coverage or merely 'good enough' coverage as the description suggests.
- Performance characteristics when handling large parameter sets or high-order n-wise combinations.
- How long the package has been dormant and whether that affects reliability for new test frameworks.
Package facts
| License | MIT License (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | dormant — 1,133 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 301,926/month — #7,829 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: allpairspy-2.5.1-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
pingouinPingouin provides a comprehensive statistical…
copyleft · top 15,000 on PyPI
trampolineEnables recursive functions to bypass Python's…
permissive · top 5,000 on PyPI
parameterizedParameterized testing decorator that works with…
permissive · top 5,000 on PyPI
pytest-cacheA pytest plugin that persists test state across…
permissive · top 15,000 on PyPI
scikit-posthocsProvides post hoc statistical tests for…
permissive · top 15,000 on PyPI
ua-generatorGenerates realistic, randomized user-agent…
permissive · top 5,000 on PyPI
namedlistCreates mutable or immutable named tuple-like…
permissive · top 15,000 on PyPI
ddtddt multiplies a single test case across…
permissive · top 5,000 on PyPI
browserforgeGenerates realistic browser headers and device…
permissive · top 5,000 on PyPI
covdefaultsA coverage plugin that automatically applies…
permissive · top 15,000 on PyPI