Python SDK for the RUCKUS One (R1) network management platform
Project description
R1 Python SDK
A Python SDK for the RUCKUS One (R1) network management platform API.
Alpha — This SDK covers ~8% of the R1 API (1,491 operations across 203 tag groups). Core modules for venues, APs, switches, WiFi networks, VLAN pools, DPSK, identities, L3 ACL policies, CLI templates, switch profiles, RADIUS server profiles, and certificate templates are implemented. See API Coverage for details.
Installation
pip install neuralconfig-r1-sdk
Or install from source:
git clone https://github.com/neuralconfig/r1-sdk.git
cd r1-sdk
pip install -e ".[dev]"
Quick Start
Create a config.ini:
[credentials]
client_id = YOUR_CLIENT_ID
client_secret = YOUR_CLIENT_SECRET
tenant_id = YOUR_TENANT_ID
region = na
from r1_sdk import R1Client
client = R1Client.from_config()
# List venues
venues = client.venues.list()
for venue in venues.get('data', []):
print(f"{venue['name']} ({venue['id']})")
# List APs
aps = client.aps.list({"pageSize": 100, "page": 0})
# List WiFi networks
networks = client.wifi_networks.list({"pageSize": 100, "page": 0})
Alternative: Environment Variables
export R1_CLIENT_ID=your_id
export R1_CLIENT_SECRET=your_secret
export R1_TENANT_ID=your_tenant
export R1_REGION=na # na, eu, asia
client = R1Client.from_env()
API Modules
| Module | Access via | Key Methods |
|---|---|---|
| Venues | client.venues |
list(), list_all(), get(), create(), update(), delete(), get_aps(), get_switches(), get_wlans(), get_clients() |
| APs | client.aps |
list(), list_all(), get(), update(), reboot(), add_to_venue(), remove_from_venue(), add_to_group(), get_clients(), get_radio_settings(), update_radio_settings(), get_statistics(), get_support_logs() |
| Switches | client.switches |
list(), list_all(), get(), update(), reboot(), add_to_venue(), remove_from_venue(), get_ports(), configure_port(), get_vlans(), create_vlan(), delete_vlan(), get_statistics() |
| WiFi Networks | client.wifi_networks |
list(), list_all(), get(), create(), update(), delete(), deploy_to_venue(), undeploy_from_venue(), get_venue_wlan_settings(), update_venue_wlan_settings(), get_radius_proxy_settings() |
| VLAN Pools | client.vlan_pools |
list_pools(), get_vlan_pool(), create_vlan_pool(), update_vlan_pool(), delete_vlan_pool(), list_profiles(), create_vlan_pool_profile() |
| DPSK | client.dpsk |
list_services(), get_service(), create_service(), list_passphrases(), create_passphrases(), import_passphrases_csv(), export_passphrases_csv() |
| Identities | client.identities |
list(), list_all(), query(), get(), create(), update(), delete(), import_csv(), export_csv() |
| Identity Groups | client.identity_groups |
list(), list_all(), query(), get(), create(), update(), delete() |
| L3 ACL Policies | client.l3_acl_policies |
list(), get(), create(), update(), delete(), create_rule() |
| CLI Templates | client.cli_templates |
list(), list_all(), get(), create(), update(), delete(), associate_with_venue(), disassociate_from_venue() |
| Switch Profiles | client.switch_profiles |
list(), list_all(), get(), create(), update(), delete(), associate_with_venue(), disassociate_from_venue() |
| RADIUS Server Profiles | client.radius_server_profiles |
list(), query(), get(), get_for_wifi_network() |
| Certificate Templates | client.certificate_templates |
query(), get(), get_for_wifi_network() |
API Coverage
The R1 API has 1,491 operations across 203 tag groups. The SDK covers 123 operations (~8%) with full or partial coverage of 31 tag groups:
| Tag Group | Spec Ops | SDK Ops | Coverage |
|---|---|---|---|
| CLI Templates | 10 | 10 | 100% |
| Switch Profiles | 10 | 10 | 100% |
| DPSK Passphrases | 14 | 11 | 79% |
| Identity Groups | 11 | 8 | 73% |
| Identities | 15 | 10 | 67% |
| Venues | 7 | 4 | 57% |
| VLAN Pools | 17 | 9 | 53% |
| L3 ACL Policies | 10 | 4 | 40% |
| DPSK Services | 11 | 5 | 45% |
| Switch VLANs | 19 | 4 | 21% |
| Switches | 20 | 5 | 25% |
| WiFi Networks | 24 | 5 | 21% |
| RADIUS Profile | 12 | 4 | 33% |
| Certificate Template | 21 | 3 | 14% |
| APs | 106 | 9 | 8% |
| 172 other groups | 1,044 | 0 | 0% |
Error Handling
from r1_sdk import R1Client
from r1_sdk.exceptions import (
R1Error, # Base exception
AuthenticationError, # 401
ResourceNotFoundError, # 404
ValidationError, # 400
RateLimitError, # 429
ServerError, # 5xx
APIError, # Other HTTP errors
)
try:
client.venues.get("nonexistent-id")
except ResourceNotFoundError:
print("Venue not found")
except APIError as e:
print(f"API error {e.status_code}: {e.message}")
The client automatically retries once on 401 (token refresh).
Development
git clone https://github.com/neuralconfig/r1-sdk.git
cd r1-sdk
python3 -m venv .venv
.venv/bin/pip install -e ".[dev]"
# Run unit tests
.venv/bin/pytest tests/unit/ -v
# Run with coverage
.venv/bin/pytest tests/unit/ --cov=r1_sdk --cov-report=term-missing
License
MIT — see LICENSE.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neuralconfig_r1_sdk-0.4.2.tar.gz.
File metadata
- Download URL: neuralconfig_r1_sdk-0.4.2.tar.gz
- Upload date:
- Size: 30.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc761ad19baf8b7034170616bc087b8c7609dac96474dbb7160b422afc4498f4
|
|
| MD5 |
1d42595bac731d6c99129780c777f51b
|
|
| BLAKE2b-256 |
435032246cbf2063a0577099b6ecc47ee2316ee1a2006ea8fec6349bd90ef0a4
|
File details
Details for the file neuralconfig_r1_sdk-0.4.2-py3-none-any.whl.
File metadata
- Download URL: neuralconfig_r1_sdk-0.4.2-py3-none-any.whl
- Upload date:
- Size: 43.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c2a71b336bdf6b7048157c227909d08abf92aabe28afcbdc5be46ad775291a4
|
|
| MD5 |
ba113f3526a9fe61d3e5f92500a779a2
|
|
| BLAKE2b-256 |
b4877b459f9ff56e0196bcfb28e318a5a57ad5cff86ac5e1e2774ef6f83f7444
|