Module for iteration over product of given parameter values
Project description
ksiterate
Python module for iteration over product of given parameter values
Description
This library provides a class Iteration, which implements iteration over a product of given parameters.
Example 1:
itspec = [
{
'A':[1, 2, 3],
'B':[10, 11, 12],
'C':[20, 21]
},
];
it = ksiterate.Iteration(itspec);
for i in it.iterate():
print(i);
This code ireates over every possible combination of values defined for parameters A, B anc C: (1, 10, 20), (1, 10, 21), (1, 11, 20), ...
It is also possible to split the iteration into inner/outer loops:
for i in it.iterate(include_params={"C",}):
print(i);
for j in it.iterate(i,):
print(j);
This code iterates over C in the outer loop and over the rest of parameters in the inner loop.
Multiple parameter specifications may be included:
itspec = [
{
'A':[1, 2, 3],
'B':[10, 11, 12],
'C':[20, 21]
},
{
'A':[5, 6,],
'B':[10, 11],
'C':[22, 23]
}
];
it = ksiterate.Iteration(itspec);
for i in it.iterate():
print(i);
In this case, the iteration would account for sum of two products of combinations from first dictionary and from second dictionary.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ksiterate-1.2.tar.gz.
File metadata
- Download URL: ksiterate-1.2.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f108430e6b7ab18057f95a77b17fe4d3f160b03e0bac77e27f139c340d076b0
|
|
| MD5 |
973590ec6a3bd46ff03fa9d5990aaf56
|
|
| BLAKE2b-256 |
386cf08f1c20d2c9fb8a7c371f8998460276ea7eacaa03eec301bd04cba5f52d
|
Provenance
The following attestation bundles were made for ksiterate-1.2.tar.gz:
Publisher:
publish.yml on ghkonrad/ksiterate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ksiterate-1.2.tar.gz -
Subject digest:
8f108430e6b7ab18057f95a77b17fe4d3f160b03e0bac77e27f139c340d076b0 - Sigstore transparency entry: 197381508
- Sigstore integration time:
-
Permalink:
ghkonrad/ksiterate@8e66780e29e0e17f1f1333b45c36b36efab11975 -
Branch / Tag:
refs/tags/v1.2 - Owner: https://github.com/ghkonrad
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8e66780e29e0e17f1f1333b45c36b36efab11975 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ksiterate-1.2-py3-none-any.whl.
File metadata
- Download URL: ksiterate-1.2-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
722275f06772964d7123fdc2ea47d63e0beae17fafc81c875166dbee54710bc1
|
|
| MD5 |
e128354661f7573bc24d288c13240dfe
|
|
| BLAKE2b-256 |
f4f877d4e64bd585490b51f2ee227eef1844e8a8cb61a250bc5f7fe5ac3c6235
|
Provenance
The following attestation bundles were made for ksiterate-1.2-py3-none-any.whl:
Publisher:
publish.yml on ghkonrad/ksiterate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ksiterate-1.2-py3-none-any.whl -
Subject digest:
722275f06772964d7123fdc2ea47d63e0beae17fafc81c875166dbee54710bc1 - Sigstore transparency entry: 197381511
- Sigstore integration time:
-
Permalink:
ghkonrad/ksiterate@8e66780e29e0e17f1f1333b45c36b36efab11975 -
Branch / Tag:
refs/tags/v1.2 - Owner: https://github.com/ghkonrad
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8e66780e29e0e17f1f1333b45c36b36efab11975 -
Trigger Event:
release
-
Statement type: