Skip to content

Conversation

@mateuscardosodeveloper
Copy link
Contributor

@mateuscardosodeveloper mateuscardosodeveloper commented Dec 11, 2025

What does PR do?

This PR completes the Devices class implementation in the Python SDK by adding missing methods that exist in the JavaScript SDK reference implementation.

Core Changes

  • Added missing Devices methods: Implemented getChunk(), deleteChunk(), dataBackup(), and dataRestore() methods for chunk management and data backup/restore operations
  • Enhanced documentation: Updated all method docstrings to follow the standardized pattern with @description, @see, and @example sections
  • Type safety improvements: Added 4 new TypedDict definitions for chunk and backup operations
  • Complete RST documentation: Added comprehensive Sphinx documentation for all 21 Devices methods and types
  • Extended test coverage: Expanded test suite from 3 to 21 comprehensive test cases

Implementation Details

New Methods:

  • getChunk(): Retrieves chunk information from immutable devices
  • deleteChunk(): Deletes specific chunks from immutable devices
  • dataBackup(): Exports device data to TagoIO Files in CSV format (supports both mutable and immutable devices)
  • dataRestore(): Imports device data from CSV files stored in TagoIO Files

New TypedDict Definitions:

  • DeviceChunkData: Chunk information structure with ID, dates, and data amount
  • DeviceDataBackup: Parameters for data backup operations
  • DeviceDataBackupResponse: Response structure from backup operations
  • DeviceDataRestore: Parameters for data restore operations

Documentation Updates:

  • All 21 methods updated with improved docstrings
  • Added RST documentation for Devices class in docs/source/Resources/Devices/
  • Included code examples for each method
  • Added type definitions documentation

Quality Assurance

  • All 21 tests pass successfully
  • Code follows project conventions and style guidelines
  • Linting passes with Ruff
  • Documentation builds successfully with Sphinx (no warnings)

This completes the Devices class implementation to match the JavaScript SDK functionality! 🎉

JIRA cards

SDKPY-147

Type of alteration

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

… class

Implemented four new methods to achieve feature parity with JavaScript SDK:
- getChunk: retrieve chunk information from immutable devices
- deleteChunk: delete specific chunks from immutable devices
- dataBackup: export device data to TagoIO Files with CSV format
- dataRestore: import device data from CSV files

Added corresponding TypedDict definitions for type safety and updated all existing method docstrings to follow consistent documentation pattern.
Documented all 21 Devices class methods with descriptions, parameters, return types, and code examples. Added TypedDict documentation for new data structures including DeviceChunkData, DeviceDataBackup, DeviceDataBackupResponse, and DeviceDataRestore.

All documentation follows RST formatting standards with proper cross-references and builds successfully without warnings.
@mateuscardosodeveloper mateuscardosodeveloper changed the base branch from main to feat/update-class-dashboards/SDKPY-146 December 11, 2025 19:40
@mateuscardosodeveloper mateuscardosodeveloper added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 11, 2025
@mateuscardosodeveloper mateuscardosodeveloper changed the title feat: enhance Devices class with chunk management and data backup/restore feat/update-class-devices/SDKPY-147 Dec 15, 2025
The sentStatus boolean parameter was being passed directly to the API query, but the API expects a lowercase string representation. Updated to convert boolean to 'true'/'false' string format and handle None values properly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants