Custom Permutation
Version 1.0.8
Python implementation for Custom Permutation.
Usage
Programmatic usage
from custom_permutation import CustomPermutation
CustomPermutation.generate(items=["a", "b", "c", "d"], includes=["a,1"], excludes=["c,2"])
Output:
[
['b', 'a', 'd', 'c'],
['c', 'a', 'b', 'd'],
['c', 'a', 'd', 'b'],
['d', 'a', 'b', 'c']
]
CLI usage
custom_permutation --items "a,b,c,d" -i "a,1" -x "c,2"
Output:
['b', 'a', 'd', 'c']
['c', 'a', 'b', 'd']
['c', 'a', 'd', 'b']
['d', 'a', 'b', 'c']
Installation
pip install custom_permutation
Set up locally for development
-
Clone the repository
-
Create and activate the virtural environment
python -m venv .venvsource venv_mysite/bin/activate -
Install requirements:
pip install -r requirements.txt -
Run the app:
python src/custom_permutation/app.py --items a,b,c,d -i a,0 -x c,1 -x a,2
Args Explained
--items a,b,c,d -i a,0 -x c,1 -x a,2
This indicates that:
- We have four items
['a', 'b', 'c', 'd']. - We want
ato be set at index0. - We want neither
cto be at index1noraindex2. - Thus, the permutation will be generated based on the options below for each indexes:
[['a'], ['a', 'b', 'd'], ['a', 'b', 'd'], ['a', 'b', 'c', 'd']]
idx n must be a member in list such as:
- idx
0$\in$['a'] - idx
1$\in$['a', 'b', 'd'] - idx
2$\in$['a', 'b', 'd'] - idx
3$\in$['a', 'b', 'c', 'd']
The result would be four lists:
a,b,c,d
a,b,d,c
a,d,b,c
a,d,c,b
Metadata
Release files for custom-permutation 1.0.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| custom_permutation-1.0.8.tar.gz | 5.7 kB | With provenance | Details for custom_permutation-1.0.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| custom_permutation-1.0.8-py3-none-any.whl | Python 3 | none | any | Details for custom_permutation-1.0.8-py3-none-any.whl |
Total release size: 11.9 kB
Release files / custom_permutation-1.0.8.tar.gz
| Download URL | custom_permutation-1.0.8.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
339b70e184bbe9e8ce7413502f9a2ed757f988022f746c8fa8b7ce665fb2fef5
|
|
BLAKE2b-256 checksum How to use checksums |
a402d0a617c2df8e2f10ebe3784903e52a7c1e54e7e39586fa82f9ba81f17769
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 7, 2026.
Transparency logRelease files / custom_permutation-1.0.8-py3-none-any.whl
| Download URL | custom_permutation-1.0.8-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
974bb79572443bb82e027926edf5947cce6694da434178a122d5b7e8d2b0ed43
|
|
BLAKE2b-256 checksum How to use checksums |
ea5b9d437e193511cfa3fb879894cad54274ef769a445c41a69d33fa9b456d9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 7, 2026.
Transparency logSecurity for custom-permutation 1.0.8
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
Both files in this release have been uploaded with provenance metadata.
Attestation for custom_permutation-1.0.8.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 Jun 7, 2026.
Transparency logA 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.