Metadata-Version: 2.4
Name: weighted-randomizer
Version: 0.1.0
Summary: A weighted random selection tool for probabilistic item selection
Author-email: Your Name <your.email@example.com>
License: MIT
Project-URL: Homepage, https://github.com/yourusername/weighted-randomizer
Project-URL: Repository, https://github.com/yourusername/weighted-randomizer.git
Classifier: Development Status :: 3 - Alpha
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.13
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Weighted Randomizer

A Python utility for weighted random selection of items. Useful for probabilistic distributions, lotteries, and random sampling with custom probabilities.

## Installation

```bash
pip install -e .
```

Or from PyPI (when published):
```bash
pip install weighted-randomizer
```

## Usage

```python
from randomizer import randomizer

# Create a randomizer with weighted items
items = {
    "apple": 35.0,
    "banana": 20.0,
    "cherry": 45.0,
}

r = randomizer(items)

# Get a random item based on weights
selected = r.getRandom()
print(selected)
```

## How It Works

The `randomizer` class normalizes weights to percentages (0-100), then uses cumulative weights to perform weighted random selection. Each item's probability of selection is proportional to its weight.

## Example Output

```
percents sum to over 100, percents have been scaled accordingly.
apple  # or banana, cherry based on weighted probability
```

## License

MIT
