Metadata-Version: 2.4
Name: heroes
Version: 0.1.0
Summary: Random superhero names -- a tiny, dependency-free Python package.
Author: Philipp Muellauer
License: MIT License
        
        Copyright (c) 2026 Philipp Muellauer
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/appbrewery/heroes
Project-URL: Issues, https://github.com/appbrewery/heroes/issues
Keywords: superhero,heroes,random,names,fixtures
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# heroes

> Random superhero names -- a tiny, dependency-free Python package.

A Python take on the JS [`superheroes`](https://github.com/sindresorhus/superheroes)
package, with a smaller curated dataset that mixes classic comic names with
original, slightly silly ones (`Captain Spreadsheet`, `Doctor Latency`,
`The Linter`, ...).

## Install

```sh
pip install heroes
```

## Usage

```python
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:

```python
import random, heroes
random.seed(42)
heroes.gen()
```

## License

MIT
