Skip to main content

Python client library for Ruijie/Reyee Cloud-managed networking

Project description

pyruijie

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

Installation

pip install pyruijie

Quick Start

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

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

Error Handling

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

pip install -e ".[dev]"
pytest

License

This project is licensed under the Apache License 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyruijie-0.1.0.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyruijie-0.1.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file pyruijie-0.1.0.tar.gz.

File metadata

  • Download URL: pyruijie-0.1.0.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for pyruijie-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cd8328641b5772640539561f20ed6629d65c81cdab533f0bdceb42ae6b63aaa1
MD5 44f01731c1ee03582a5ab96fca6f2e42
BLAKE2b-256 7d8152e01a3ef19628ab1625c8035f31ce9e13d07be8befe86cbb67ab3a47aba

See more details on using hashes here.

File details

Details for the file pyruijie-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyruijie-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for pyruijie-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20e04d690796e92ae3d1592f83b7f74b54d6efbeee33fc35c504efd103edcf5f
MD5 143e9aa506be8b15afe3b0cb50990a14
BLAKE2b-256 d6cd50270af8865e61b59b49111f5fb1e9d3eb6e3f320604c2dce9c667808fb2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page