redis-enterprise
A comprehensive Rust client library for the Redis Enterprise REST API, with Python bindings.
Features
- Complete coverage of Redis Enterprise REST API endpoints
- Async/await support with tokio
- Strong typing for API requests and responses
- Comprehensive error handling
- Optional Tower service integration for middleware composition
- Support for all Redis Enterprise features including:
- Cluster management and bootstrap
- Database (BDB) operations
- Node management and statistics
- User and role management
- Redis modules
- Active-Active (CRDB) databases
- Monitoring and alerts
Installation
[]
= "0.7"
# Optional: Enable Tower service integration
= { = "0.7", = ["tower-integration"] }
Quick Start
use EnterpriseClient;
async
Tower Integration
Enable the tower-integration feature to use the client with Tower middleware:
use EnterpriseClient;
use ApiRequest;
use ServiceExt;
async
This enables composition with Tower middleware like circuit breakers, retry, rate limiting, and more.
Python Bindings
This library also provides Python bindings via PyO3:
# Create client
=
# Or from environment variables
=
# Async usage
= await
# Sync usage
=
Python API
EnterpriseClient(base_url, username, password, insecure=False, timeout_secs=None)EnterpriseClient.from_env()- Create from environment variables
Cluster
cluster_info()/cluster_info_sync()- Get cluster infocluster_stats()/cluster_stats_sync()- Get cluster statisticslicense()/license_sync()- Get license info
Databases
databases()/databases_sync()- List all databasesdatabase(uid)/database_sync(uid)- Get database by UID
Nodes
nodes()/nodes_sync()- List all nodesnode(uid)/node_sync(uid)- Get node by UID
Users
users()/users_sync()- List all users
Raw API
get(path)/get_sync(path)- Raw GET requestpost(path, body)/post_sync(path, body)- Raw POST requestdelete(path)/delete_sync(path)- Raw DELETE request
Environment Variables
REDIS_ENTERPRISE_URL- Base URL (default: https://localhost:9443)REDIS_ENTERPRISE_USER- UsernameREDIS_ENTERPRISE_PASSWORD- PasswordREDIS_ENTERPRISE_INSECURE- Set to "true" for self-signed certs
API Coverage
This library provides 100% coverage of the Redis Enterprise REST API, including:
- Cluster Operations - Bootstrap, configuration, topology
- Database Management - CRUD operations, actions, statistics
- Node Management - Add/remove nodes, statistics, actions
- Security - Users, roles, ACLs, LDAP integration
- Modules - Upload and manage Redis modules
- Monitoring - Stats, alerts, logs, diagnostics
- Active-Active - CRDB management and tasks
- Administration - License, certificates, services
Documentation
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.