Metadata-Version: 2.4
Name: pyruijie
Version: 0.1.0
Summary: Python client library for Ruijie/Reyee Cloud-managed networking
Project-URL: Homepage, https://github.com/dannielperez/pyruijie
Project-URL: Repository, https://github.com/dannielperez/pyruijie
Project-URL: Documentation, https://github.com/dannielperez/pyruijie#readme
Project-URL: Issues, https://github.com/dannielperez/pyruijie/issues
Author: Daniel Perez
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: cloud,network-management,networking,reyee,ruijie
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: httpx<1,>=0.27
Requires-Dist: pydantic<3,>=2.0
Provides-Extra: dev
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: respx>=0.22; extra == 'dev'
Description-Content-Type: text/markdown

# pyruijie

Python client library for Ruijie/Reyee Cloud-managed networking.

## Installation

```bash
pip install pyruijie
```

## Quick Start

```python
from pyruijie import RuijieClient

client = RuijieClient(app_id="your-app-id", app_secret="your-secret")
client.authenticate()

# List all projects (sites)
projects = client.get_projects()
for project in projects:
    print(f"{project.name} ({project.group_id})")

# Get devices for a project
devices = client.get_devices(projects[0].group_id)
for device in devices:
    status = "online" if device.is_online else "offline"
    print(f"  {device.name} [{device.product_type}] - {status}")
```

## Context Manager

```python
with RuijieClient(app_id="...", app_secret="...") as client:
    projects = client.get_projects()
```

## Error Handling

```python
from pyruijie import RuijieClient, AuthenticationError, APIError

try:
    client = RuijieClient(app_id="...", app_secret="...")
    client.authenticate()
except AuthenticationError:
    print("Bad credentials")
except APIError as e:
    print(f"API error {e.code}: {e.message}")
```

## Development

```bash
pip install -e ".[dev]"
pytest
```

## License

This project is licensed under the [Apache License 2.0](LICENSE).
