Skip to content

updated remaining modules to use request helpers#202

Open
mihirvala08 wants to merge 3 commits intomainfrom
chore/modules-request-helper-update
Open

updated remaining modules to use request helpers#202
mihirvala08 wants to merge 3 commits intomainfrom
chore/modules-request-helper-update

Conversation

@mihirvala08
Copy link
Collaborator

Standardize Return Types and Refactor Request Helpers

Overview

This PR addresses #149 by standardizing return types across all list_* functions and introducing centralized request helper utilities to ensure consistent behavior throughout the Chronicle SDK.

Changes

Module Refactoring

Chronicle modules have been refactored to use the centralized request helpers:

  • client.py - ChronicleClient core functionality
  • dashboard_query.py - Dashboard query operations
  • data_export.py - Data export functionality
  • data_table.py - Data table operations
  • entity.py - Entity management
  • feeds.py - Feed operations
  • gemini.py - Gemini AI integration
  • investigations.py - Investigation management
  • ioc.py - Indicator of Compromise handling
  • log_ingest.py - Log ingestion
  • log_processing_pipelines.py - Log processing pipeline management
  • log_types.py - Log type operations
  • nl_search.py - Natural language search
  • parser.py - Parser management
  • parser_extension.py - Parser extension handling
  • reference_list.py - Reference list operations
  • rule.py - Rule management
  • rule_alert.py - Rule alert handling
  • rule_detection.py - Rule detection operations
  • rule_exclusion.py - Rule exclusion management
  • rule_set.py - Rule set operations

Testing

Comprehensive test updates across all affected modules:

  • Updated 18 test files to validate new behavior
  • Added tests for both as_list=True and as_list=False modes
  • Validated error handling improvements

Breaking Changes

Migration Path: Users relying on dict return types should:

  1. Review their code for list_* function calls
  2. Add as_list=False parameter if they need the full response with metadata
  3. Update code to handle list return types if using as_list=True (or default behavior changes)

Related Issues

Fixes #149

@mihirvala08
Copy link
Collaborator Author

@PaperMtn Feel free to review changes and let me know if you find any improvement or miss.

@PaperMtn
Copy link
Contributor

@mihirvala08 I've got a few minor changes based on some other standardisation and refactoring I was doing at the same time as moving over to the helpers. I can't modify this one, so I will open a new PR into this branch

@PaperMtn PaperMtn mentioned this pull request Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent return types

2 participants