Metadata-Version: 2.4
Name: eapyTool
Version: 0.1.1
Project-URL: Homepage, https://github.com/eapy/eapy
Project-URL: Repository, https://github.com/eapy/eapy
Project-URL: Issues, https://github.com/eapy/eapy/issues
Author: eapy contributors
License-Expression: MPL-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Classifier: Programming Language :: Python :: 3
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: Programming Language :: Python :: 3.13
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# eapy

A Python utility library that extends the standard library with math, algebra, data structures, and everyday tools.

## Features

### Math & Algebra
- **Vector** — `Vector2D`, `Vector3D`, and N-dimensional `Vector` with arithmetic, dot product, magnitude, coordinate conversions
- **Matrix** — 2D matrix operations (add, subtract, multiply, divide, power) with N×N determinant
- **Tensor** — 3D tensor with arithmetic, slicing, transpose
- **Polynomial** — polynomial arithmetic, evaluation (Horner's method), derivative, integral
- **Complex** — complex number arithmetic, conjugate, phase, polar conversion
- **Symbolic Algebra** — `Var` for building symbolic expressions with simplify & evaluate
- **InfiniteSet / Interval** — set operations on numeric intervals

### Trigonometry
- Full set: `sin`, `cos`, `tan`, `sec`, `csc`, `cot`
- Inverse: `asin`, `acos`, `atan`, `atan2`, `asec`, `acsc`, `acot`
- Hyperbolic: `sinh`, `cosh`, `tanh`, `asinh`, `acosh`, `atanh`
- Versed: `versine`, `vercosine`, `coversine`, `covercosine`

### Combinatorics & Number Theory
- `permutation`, `combination`, `catalan`, `stirling2`
- `gcd`, `lcm`, `isPrime`, `fibonacci`, `digitsSum`
- `eulerTotient`, `primeFactors`, `modPow`

### Statistics
- `mean`, `median`, `variance`, `std`, `mode`

### String Utilities
- Name conversion: `toCamelCase`, `toSnakeCase`, `toPascalCase`
- `levenshtein` — edit distance between two strings

### Functional Programming
- `pipe(value, f, g, h)` — pipeline: `h(g(f(value)))`
- `compose(f, g, h)(x)` — composition: `f(g(h(x)))`
- `curry(func)(a)(b)(c)` — currying

### Data Structures
- `Stack` — LIFO stack (push/pop/peek)
- `Queue` — FIFO queue (enqueue/dequeue)
- `Trie` — prefix tree (insert/search/words_with_prefix)

### Base Conversion
- `baseConvert(n, from_base, to_base)` — arbitrary base conversion (2-36)
- `toBinary`, `toOctal`, `toHex` — quick conversions

### Color Utilities
- `rgbToHsl` / `hslToRgb` — RGB ↔ HSL conversion
- `rgbToHex` / `hexToRgb` — RGB ↔ HEX conversion

### Numerical Methods
- `bisect(f, a, b)` — bisection root finding
- `newtonMethod(f, f', x0)` — Newton's method
- `numericalIntegral(f, a, b)` — Simpson's rule integration

### Utility & Decorators
- `Timer` — simple stopwatch timer
- `clamp`, `lerp`, `mapRange` — numeric helpers
- `flatten`, `chunk`, `deepGet`, `uniqueId` — data helpers
- `@retry`, `@memoize`, `@deprecated`, `@singleton` — decorators
- `printTable` — formatted console table output
- `getPath` — interactive file/directory picker
- `repeatUntilSecond`, `repeatUntilSecondOrBool`, `repeatUntilValueChange` — loop helpers

### Broadcast / Messaging
- `whenGetMessage`, `broadcast`, `broadcastWithData` — simple event system

## Installation

```bash
pip install -i https://test.pypi.org/simple/ eapyTool
```

## Quick Start

```python
from eapy.core import Var, Polynomial, Vector3D, mean

# Symbolic algebra
x = Var('x')
expr = (x + 2) * (x + 3)
print(expr.evaluate(x=5))  # 56.0

# Polynomial
p = Polynomial([1, -3, 2])  # 1 - 3x + 2x^2
print(p.derivative())        # -3 + 4*x
print(p(10))                 # 171.0

# Vector
v = Vector3D(1, 2, 3)
print(v.abs())               # 3.7416...

# Statistics
print(mean([4, 8, 15, 16, 23, 42]))  # 18.0
```

## Development

```bash
# install with dev dependencies
pip install -e ".[dev]"

# run tests
pytest

# lint
ruff check src tests
ruff format --check src tests
```

## License

[MPL-2.0](LICENSE)
