-
Notifications
You must be signed in to change notification settings - Fork 22
Update Management API wrappers #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
New management modules:
- audit_logs.py: Audit log querying with pagination
- invitations.py: Organization invitation management
- private_connections.py: Private connection (PrivateLink) management
- projects.py: Project listing
- roles.py: Role-based access control management
- storage.py: Storage and disaster recovery operations
- teams.py: Team management with member/role operations
- users.py: User management with identity roles
Key improvements:
- All enum string parameters are normalized to match OpenAPI spec:
- UPPERCASE: provider, deploymentType, connectionType, status, edition
- lowercase: resourceType
- PascalCase: audit log type/source, invitation state
- Specific normalizer functions in utils.py for self-documenting code
- Normalization in both constructors and API calls for defensive programming
- Mixin classes use cast('WorkspaceManager', self) instead of type ignores
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>
Document all management API classes and methods in api.rst: - Update WorkspaceManager, WorkspaceGroup, Workspace, Organization with mixin methods - Add ClusterManager and Cluster documentation - Add User, Team, Role, Invitation management sections - Add Audit Logging, Private Connections, Billing sections - Add Starter Workspaces, Storage/DR, Export Service sections - Add Inference API and Projects sections - Add RegionManager documentation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request adds comprehensive Management API wrappers to sync the Python SDK with the current SingleStoreDB Management API capabilities. The PR introduces several new modules for managing users, teams, roles, invitations, audit logs, private connections, projects, and storage/disaster recovery operations.
Key Changes
- Adds eight new management modules (audit_logs, invitations, users, teams, roles, storage, projects, private_connections) with consistent API patterns
- Extends existing classes (Workspace, WorkspaceGroup, Secret, Organization) with new fields and methods
- Implements mixin pattern for WorkspaceManager to organize related functionality
- Adds normalization utilities for API enum values to ensure consistent formatting
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| singlestoredb/management/utils.py | Adds normalization functions for API enums and require_fields validation helper |
| singlestoredb/management/users.py | New module for user management with User class and UsersMixin |
| singlestoredb/management/teams.py | New module for team management with Team class and TeamsMixin |
| singlestoredb/management/storage.py | New module for storage and disaster recovery operations |
| singlestoredb/management/roles.py | New module for role-based access control management |
| singlestoredb/management/private_connections.py | New module for private network connectivity management |
| singlestoredb/management/organization.py | Updates Secret class with CRUD operations and adds SecretsMixin |
| singlestoredb/management/invitations.py | New module for organization invitation management |
| singlestoredb/management/audit_logs.py | New module for audit log retrieval and filtering |
| singlestoredb/management/projects.py | New module for project management |
| singlestoredb/management/workspace.py | Adds new fields (kai_enabled, auto_scale, scale_factor), methods for private connections and Kai support, StarterWorkspaceUser class, and integrates all mixins into WorkspaceManager |
| singlestoredb/management/region.py | Adds cloud provider normalization |
| docs/src/api.rst | Documents all new classes and methods (with some inaccuracies) |
| singlestoredb/management/init.py | Exports new public classes |
| .gitignore | Adds uv.lock exclusion |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Remove duplicate and non-existent method references from documentation: - Remove WorkspaceGroup.create_private_connection and get_private_connection (duplicates) - Remove Workspace.create_private_connection and get_private_connection (duplicates) - Remove Organization methods that don't exist in the codebase Addresses PR #116 review comments. Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
The set of Management API wrappers currently available in the Python SDK is a subset of all that are available. This PR aims to sync up with the current set of APIs.