Map strings sequencially
Project description
seqo
A Python package to map strings and numbers sequentially.
Easily generate and index custom base-N strings from a given character set.
Installation
Use the package manager pip to install seqo.
pip install seqo
Usage
from seqo import SequentialString
# Create an instance with a custom character set
ss = SequentialString("ABC")
# Check the character set
print(ss.charset)
# Output: ['A', 'B', 'C']
# Generate the first 10 strings in sequence
sequence = [ss.get(n) for n in range(10)]
print(sequence)
# Output: ['A', 'B', 'C', 'AA', 'AB', 'AC', 'BA', 'BB', 'BC', 'CA']
# Get the numeric index of a string
print(ss.index_of("CABA")) # Output: 96
# Get the string at a specific index
print(ss.get(96)) # Output: 'CABA'
# Generate all strings between two values
start = "AA"
end = "CC"
strings_between = [
ss.get(n)
for n in range(ss.index_of(start), ss.index_of(end))
]
print(strings_between)
# Output: ['AB', 'AC', 'BA', 'BB', 'BC', 'CA', 'CB']
Contributing
Pull requests are welcome!
For major changes, please open an issue first to discuss what you'd like to change or add.
License
Distributed under the GNU GPLv3 License.
See LICENSE for more information.
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 seqo-0.1.2.tar.gz.
File metadata
- Download URL: seqo-0.1.2.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
155e1c0f900db119ca6cf911fa4d93de1693ab8b0c43ebd3b0e6e56f2e9943ae
|
|
| MD5 |
3d6d6e615e6458fa0f37efbdfd42fc44
|
|
| BLAKE2b-256 |
a2a6529e2e30a0c5f0ca5bd6ce2fe55a61349bf73531555ad25b0cb087ad41bc
|
Provenance
The following attestation bundles were made for seqo-0.1.2.tar.gz:
Publisher:
deploy-pypi.yml on enzoconejero/seqo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
seqo-0.1.2.tar.gz -
Subject digest:
155e1c0f900db119ca6cf911fa4d93de1693ab8b0c43ebd3b0e6e56f2e9943ae - Sigstore transparency entry: 193079029
- Sigstore integration time:
-
Permalink:
enzoconejero/seqo@8943d2cfdf95ea64c9ba2ff427e1909662251c86 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/enzoconejero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy-pypi.yml@8943d2cfdf95ea64c9ba2ff427e1909662251c86 -
Trigger Event:
release
-
Statement type:
File details
Details for the file seqo-0.1.2-py3-none-any.whl.
File metadata
- Download URL: seqo-0.1.2-py3-none-any.whl
- Upload date:
- Size: 14.8 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 |
9a995f5e314b7b0beb038baac89da83c98b683a64725164620c09452e74ab915
|
|
| MD5 |
30536b9dd0c39f731e4a00aeee0c739c
|
|
| BLAKE2b-256 |
26020b7bf0aac647c85a7ed88d2980a712eb94973cb7a4c965f8f9db2ce4f3a2
|
Provenance
The following attestation bundles were made for seqo-0.1.2-py3-none-any.whl:
Publisher:
deploy-pypi.yml on enzoconejero/seqo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
seqo-0.1.2-py3-none-any.whl -
Subject digest:
9a995f5e314b7b0beb038baac89da83c98b683a64725164620c09452e74ab915 - Sigstore transparency entry: 193079031
- Sigstore integration time:
-
Permalink:
enzoconejero/seqo@8943d2cfdf95ea64c9ba2ff427e1909662251c86 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/enzoconejero
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy-pypi.yml@8943d2cfdf95ea64c9ba2ff427e1909662251c86 -
Trigger Event:
release
-
Statement type: