Metadata-Version: 2.4
Name: pyroute
Version: 1.0.0
Summary: PyRoute: Immutable, hashable, and serializable navigable paths for Python.
Project-URL: Homepage, https://github.com/moh-dehghan/pyroute
Project-URL: Repository, https://github.com/moh-dehghan/pyroute
Project-URL: Issues, https://github.com/moh-dehghan/pyroute/issues
Author-email: Moh-Dehghan <m.dehghan.2003@outlook.com>
License: MIT License
        
        Copyright (c) 2025 Moh-Dehghan
        Email: M.Dehghan.2003@outlook.com
        GitHub: https://github.com/Moh-Dehghan/PyRoute
        
        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: base64,data-structures,decode,dictionary-like,encode,hashable,immutable,nested-structures,path,pythonic,routing,segments,serialization
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: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# 📦 PyRoute  
[![PyPI version](https://badge.fury.io/py/pyroute.svg)](https://pypi.org/project/pyroute/)
[![Python Versions](https://img.shields.io/pypi/pyversions/pyroute.svg)](https://pypi.org/project/pyroute/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

**PyRoute** is a lightweight module for routing within nested structures. It provides an immutable, hashable path type
that you can define, combine, and serialize. One of its use cases is pinpointing the location of a value inside deeply nested data
such as dictionaries, json, yaml, ..., in-memory objects, or key-value stores.

---

## ✨ Features  

| Feature | Description |
|---------|-------------|
| 🔑 **Immutable & Hashable** | Use `Route` safely as navigate paths or dict keys |
| 🧩 **Composable** | Extend with `/` or `+` operators |
| 📜 **Serializable** | Compact Base64URL `serialize()` / `deserialize()` |
| 🌀 **Pythonic API** | Supports iteration, slicing, equality, hashing |
| 👀 **Readable** | Human-friendly form like `<root><a><1><b>` |

---

## 📦 Installation

### A) PyPI
```bash
pip install pyroute -U
```

---

### B) Github
```bash
git clone https://github.com/moh-dehghan/pyroute.git
cd pyroute
pip install -e .
```

---

## 🚀 Quick Start  

```python
from pyroute import Route

# Create routes
r1 = Route(1, 2, "3")
r2 = Route("x") / "y" + "z"

# Combine
r3 = r1 + r2
print(r3)   # <root><1><2><3><x><y><z>

# Iterate
for seg in r3:
    print(seg)

# Serialize / Deserialize
serial = r3.serialize()
print("Serialized:", serial)

restored = Route.deserialize(serial)
print("Restored:", restored)
```

---

## License

This project is licensed under the MIT License – see the [LICENSE](LICENSE) file for details.