heroes
Random superhero names -- a tiny, dependency-free Python package.
A Python take on the JS superheroes
package, with a smaller curated dataset that mixes classic comic names with
original, slightly silly ones (Captain Spreadsheet, Doctor Latency,
The Linter, ...).
Install
pip install heroes
Usage
import heroes
heroes.gen()
# => 'Hooded'
heroes.genarr(3)
# => ['Askew-Tronics', 'Decepticon', 'Leopardon']
API
heroes.gen() -> str
Returns one random hero name from the bundled dataset.
heroes.genarr(n: int) -> list[str]
Returns a list of n unique random hero names (no duplicates).
Raises ValueError when n is negative or larger than the dataset
(len(heroes._data.HEROES)).
Determinism
The library uses the module-level random module, so you can seed it for
reproducible output:
import random, heroes
random.seed(42)
heroes.gen()
License
MIT
Metadata
Release files for heroes 0.1.0
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 |
|---|---|---|---|---|
| heroes-0.1.0.tar.gz | 5.4 kB | Without provenance | Details for heroes-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| heroes-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for heroes-0.1.0-py3-none-any.whl |
Total release size: 11.2 kB
Release files / heroes-0.1.0.tar.gz
| Download URL | heroes-0.1.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6ecaf10dc65f7aa0261a9221472a7342307d4cf24e1f48c9804f9429c502a0e
|
|
BLAKE2b-256 checksum How to use checksums |
edb6e46fd8cc7c885d6440f03405e3b74b1440e9de499001d0a60871861144c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Release files / heroes-0.1.0-py3-none-any.whl
| Download URL | heroes-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d1174c7669117d27c220db6ba3b6f362a9737668d4717b30e8eca8c552041206
|
|
BLAKE2b-256 checksum How to use checksums |
908ac4510205b28192ed3607563c2840479a773e435ce66084ab6761655b8c02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Security for heroes 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.