Skip to main content

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

  1. Clone the repository

  2. Create and activate the virtural environment

    python -m venv .venv

    source venv_mysite/bin/activate

  3. Install requirements:

    pip install -r requirements.txt

  4. 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 a to be set at index 0.
  • We want neither c to be at index 1 nor a index 2.
  • 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

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)

Source distribution for custom-permutation 1.0.8
File Size Uploaded
custom_permutation-1.0.8.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for custom-permutation 1.0.8
File Interpreter ABI Platform
custom_permutation-1.0.8-py3-none-any.whl Python 3 none any Details

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 log

Release 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 log

Release history Release notifications | RSS feed

This release

1.0.8 This release

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.4

2 release files

1.0.2

2 release files

0.0.1

2 release files

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