Metadata-Version: 2.2
Name: simple_pybind11_multiplier_test
Version: 0.1.1
Summary: A simple pybind11 example: a stateful C++ multiplier exposed to Python
Keywords: pybind11,C++,example
Author: NewbieeSaibot
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: C++
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Project-URL: Repository, https://github.com/NewbieeSaibot/simple_pybind11_multiplier_test
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# simple_pybind11_multiplier_test

A minimal example of a C++ class exposed to Python via [pybind11](https://pybind11.readthedocs.io/).

## Install

```bash
pip install simple_pybind11_multiplier_test
```

No compiler required — pre-built wheels are available for Windows, Linux, and macOS.

## Usage

```python
import simple_pybind11_multiplier_test

m = simple_pybind11_multiplier_test.StatefulMultiplier(2.0)

print(m.multiply_by_internal_state(3.0))  # 6.0  — state is now 6.0
print(m.multiply_by_internal_state(2.0))  # 12.0 — state is now 12.0

m.set_internal_state(1.0)
print(m.multiply_by_internal_state(5.0))  # 5.0
```

## API

### `StatefulMultiplier(initial_state: float)`
Constructs a multiplier with the given initial internal state.

### `set_internal_state(value: float) -> None`
Replaces the internal state with `value`.

### `multiply_by_internal_state(value: float) -> float`
Multiplies `value` by the internal state, updates the internal state to the result, and returns it.
