Metadata-Version: 2.4
Name: segee
Version: 0.1.0
Summary: A high-performance, enterprise-grade Segment Tree implementation for Python
Project-URL: Homepage, https://github.com/nodashin6/segee
Project-URL: Documentation, https://github.com/nodashin6/segee/blob/main/docs/usage.md
Project-URL: Repository, https://github.com/nodashin6/segee.git
Project-URL: Issues, https://github.com/nodashin6/segee/issues
Author-email: nodashin <nodashin.jpn@gmail.com>
Maintainer-email: nodashin <nodashin.jpn@gmail.com>
License: MIT License
        
        Copyright (c) 2025 nodashin
        
        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.
License-File: LICENSE
Keywords: algorithms,data-structures,range-query,segment-tree
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.12
Provides-Extra: dev
Requires-Dist: mypy>=1.0.0; extra == 'dev'
Requires-Dist: pre-commit>=3.0.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: sphinx-rtd-theme>=1.2.0; extra == 'docs'
Requires-Dist: sphinx>=5.0.0; extra == 'docs'
Provides-Extra: test
Requires-Dist: pytest-cov>=4.0.0; extra == 'test'
Requires-Dist: pytest>=7.0.0; extra == 'test'
Description-Content-Type: text/markdown

# 🌳 Segee

[![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue.svg)](https://www.python.org/downloads/)
[![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)


Lightning-fast range queries with O(log n) performance and modern Python design.


## ✨ Features

🚀 **High Performance** - O(log n) range queries and updates  
🔒 **Type Safe** - Complete generic type hints for Python 3.12+  
🏢 **Enterprise Ready** - Comprehensive error handling and validation  
🧪 **Battle Tested** - 152 unit tests with ground truth validation  
🐍 **Pythonic** - Full sequence protocol support (`tree[i]`, `len(tree)`, etc.)  
⚡ **Zero Dependencies** - Pure Python with no external requirements  

## 🚀 Quick Start

```python
from segee import SumSegmentTree, MinSegmentTree, MaxSegmentTree

# Sum queries - perfect for range sum problems
sum_tree = SumSegmentTree(1000)
sum_tree[100] = 42
sum_tree[200] = 58
print(sum_tree.sum(100, 201))  # 100

# Min/Max queries - ideal for range minimum/maximum problems  
min_tree = MinSegmentTree(1000)
min_tree[50:55] = [10, 5, 20, 15, 8]
print(min_tree.minimum(50, 55))  # 5

# Custom operations - build your own segment tree
import operator, math
gcd_tree = SegmentTree(100, 0, math.gcd)
```

## 📦 Installation

```bash
pip install segee
```

## 🏗️ Architecture

```
segee/
├── segment_tree/           # Segment tree implementations
│   ├── segment_tree.py    # Generic segment tree core
│   └── specialized.py     # Sum/Min/Max convenience classes
├── exceptions.py          # Custom exception hierarchy  
└── _types.py             # Type definitions and protocols
```


## 📚 Documentation

- **[Usage Guide](docs/usage.md)** - Comprehensive examples and patterns
- **[API Reference](docs/api.md)** - Complete method documentation  
- **[Performance](docs/performance.md)** - Benchmarks and complexity analysis
- **[Contributing](docs/contributing.md)** - Development setup and guidelines



## 📄 License

MIT License - see [LICENSE](LICENSE) for details.

---

<div align="center">

**Built with ❤️ for the Python community**

[🐛 Report Bug](https://github.com/nodashin/segee/issues) • [✨ Request Feature](https://github.com/nodashin/segee/issues) • [📖 Documentation](docs/)

</div>