Skip to content

Conversation

@mateuscardosodeveloper
Copy link
Contributor

@mateuscardosodeveloper mateuscardosodeveloper commented Dec 12, 2025

What does PR do?

🔐 Profile Class Complete Implementation Summary

This PR delivers a fully functional Profile class for the TagoIO Python SDK, enabling comprehensive profile and sub-account management capabilities.

🏗️ Core Implementation

  • Complete Profile CRUD operations with 17 methods covering all profile management scenarios
  • Comprehensive type safety with 10 new TypedDict definitions for structured data
  • Full test coverage with 307 new test lines covering all methods and edge cases

⚙️ Profile Management Features

  • Profile Operations:

    • ✅ Create, read, update, and delete profiles
    • 📊 Get profile summaries and detailed information
    • 📋 List all profiles in account
    • 🔄 Transfer tokens between profiles
  • Team Management:

    • 👥 Add and remove team members
    • 📋 List all team members
    • 🔐 Manage profile access and permissions
  • Token Operations:

    • 🔑 Create profile-specific tokens
    • 📋 List all tokens for a profile
    • 🗑️ Delete expired or unused tokens

📊 Analytics & Monitoring

  • Usage Statistics:

    • 📈 Track input/output data usage
    • ⏱️ Monitor analysis execution time
    • 📧 Count SMS, email, and push notifications
    • 💾 Monitor file storage and data records
  • Audit Logs:

    • 🔍 Query audit log events with filters
    • 📊 Get audit log statistics (records matched/scanned, bytes)
    • 🕐 Time-based event tracking

📚 Complete Documentation

  • Sphinx RST documentation for all methods with:

    • Clear parameter descriptions and return types
    • Working code examples for every method
    • Cross-referenced TypedDict definitions
    • Functional links to TagoIO help articles
  • TypedDict Documentation:

    • UsageStatistic, AuditLogEvent, AuditLogStatistics
    • ProfileCreateInfo, ProfileCredentials, ProfileTeam
    • StatisticsDate, AuditLog, AuditLogFilter

🔗 Bug Fixes

  • Fixed broken documentation URLs in Profile.py @see sections
    • Changed from docs.tago.io to help.tago.io/portal/en/kb/articles/
    • Updated Help Center link to new TagoIO Support URL
    • All links now functional and pointing to correct resources

🧪 Quality Assurance

  • ✅ All 17 existing tests passing
  • ✅ 307 new test lines added
  • ✅ Zero Sphinx build warnings
  • ✅ Ruff linting passed
  • ✅ Full type hint coverage

This implementation provides complete profile management capabilities for the TagoIO Python SDK, matching the feature parity of the JavaScript SDK! 🐍✨

JIRA cards

SDKPY-149

Type of alteration

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

Added complete implementation of Profile resource management including profile CRUD operations, team management, token operations, usage statistics, and audit logs. Includes new TypedDict definitions and comprehensive test coverage for all methods.
Added complete RST documentation for all Profile methods and TypedDict definitions. Includes 10 new TypedDict blocks in Profile_Types.rst and all 17 methods documented in index.rst with proper formatting and cross-references.
@mateuscardosodeveloper mateuscardosodeveloper changed the base branch from main to feat/update-class-networks/SDKPY-148 December 12, 2025 14:07
@mateuscardosodeveloper mateuscardosodeveloper added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 12, 2025
Copy link
Member

@felipefdl felipefdl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick scan: no blocking issues observed; profile endpoints/types/tests look consistent.

Copy link
Member

@felipefdl felipefdl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

* feat: add comprehensive documentation and tests for Run class

Add detailed docstrings for all Run class methods with usage examples and authorization policy references. Include new EmailTestData type for email testing functionality. Implement comprehensive test suite covering all Run methods with mocked API responses.

* docs: update Sphinx documentation for Run class methods

Update RST documentation with detailed method descriptions, usage examples, and authorization policy references. Add EmailTestData type documentation and restructure all Run method docs with consistent formatting and Help Center links.

* feat: make query parameter optional in Run.listUsers method

The query parameter is now optional with an empty dict as default value, making it easier to retrieve all users without specifying query filters.

* feat: update listUsers method to use None as default for query parameter
@mateuscardosodeveloper mateuscardosodeveloper merged commit 2a8a80d into feat/update-class-networks/SDKPY-148 Jan 12, 2026
3 checks passed
@mateuscardosodeveloper mateuscardosodeveloper deleted the feat/update-class-profile/SDKPY-149 branch January 12, 2026 17:40
mateuscardosodeveloper added a commit that referenced this pull request Jan 12, 2026
* feat: add missing methods and complete Networks class implementation

Implemented 6 missing methods (create, edit, delete, tokenList, tokenCreate, tokenDelete) to achieve feature parity with JavaScript SDK. Added 3 new TypedDict definitions (NetworkTokenInfo, NetworkQuery, ListTokenQuery) for type safety. All methods include comprehensive docstrings following the standard pattern with description, documentation links, and examples.

* docs: add comprehensive Sphinx RST documentation for Networks class

Added complete RST documentation for all 8 Networks class methods and 3 new TypedDict definitions. Documentation includes detailed parameter descriptions, return types, code examples, and links to official TagoIO documentation following the established pattern.

* feat/update-class-profile/SDKPY-149 (#57)

* feat: add comprehensive Profile class implementation with all methods

Added complete implementation of Profile resource management including profile CRUD operations, team management, token operations, usage statistics, and audit logs. Includes new TypedDict definitions and comprehensive test coverage for all methods.

* docs: add comprehensive Sphinx RST documentation for Profile class

Added complete RST documentation for all Profile methods and TypedDict definitions. Includes 10 new TypedDict blocks in Profile_Types.rst and all 17 methods documented in index.rst with proper formatting and cross-references.

* docs: update Help Center link to the new TagoIO Support URL

* fix: update resource references from 'resources.profiles' to 'resources.profile' in doc string examples

* feat/update-class-run/SDKPY-150 (#58)

* feat: add comprehensive documentation and tests for Run class

Add detailed docstrings for all Run class methods with usage examples and authorization policy references. Include new EmailTestData type for email testing functionality. Implement comprehensive test suite covering all Run methods with mocked API responses.

* docs: update Sphinx documentation for Run class methods

Update RST documentation with detailed method descriptions, usage examples, and authorization policy references. Add EmailTestData type documentation and restructure all Run method docs with consistent formatting and Help Center links.

* feat: make query parameter optional in Run.listUsers method

The query parameter is now optional with an empty dict as default value, making it easier to retrieve all users without specifying query filters.

* feat: update listUsers method to use None as default for query parameter
mateuscardosodeveloper added a commit that referenced this pull request Jan 12, 2026
* feat: add chunk management and data backup/restore methods to Devices 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.

* docs: add comprehensive Sphinx RST documentation for Devices class

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.

* fix: correct sentStatus parameter handling in paramList method

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>

* fix: update sentStatus parameter handling to check for None explicitly

* feat/update-class-networks/SDKPY-148 (#56)

* feat: add missing methods and complete Networks class implementation

Implemented 6 missing methods (create, edit, delete, tokenList, tokenCreate, tokenDelete) to achieve feature parity with JavaScript SDK. Added 3 new TypedDict definitions (NetworkTokenInfo, NetworkQuery, ListTokenQuery) for type safety. All methods include comprehensive docstrings following the standard pattern with description, documentation links, and examples.

* docs: add comprehensive Sphinx RST documentation for Networks class

Added complete RST documentation for all 8 Networks class methods and 3 new TypedDict definitions. Documentation includes detailed parameter descriptions, return types, code examples, and links to official TagoIO documentation following the established pattern.

* feat/update-class-profile/SDKPY-149 (#57)

* feat: add comprehensive Profile class implementation with all methods

Added complete implementation of Profile resource management including profile CRUD operations, team management, token operations, usage statistics, and audit logs. Includes new TypedDict definitions and comprehensive test coverage for all methods.

* docs: add comprehensive Sphinx RST documentation for Profile class

Added complete RST documentation for all Profile methods and TypedDict definitions. Includes 10 new TypedDict blocks in Profile_Types.rst and all 17 methods documented in index.rst with proper formatting and cross-references.

* docs: update Help Center link to the new TagoIO Support URL

* fix: update resource references from 'resources.profiles' to 'resources.profile' in doc string examples

* feat/update-class-run/SDKPY-150 (#58)

* feat: add comprehensive documentation and tests for Run class

Add detailed docstrings for all Run class methods with usage examples and authorization policy references. Include new EmailTestData type for email testing functionality. Implement comprehensive test suite covering all Run methods with mocked API responses.

* docs: update Sphinx documentation for Run class methods

Update RST documentation with detailed method descriptions, usage examples, and authorization policy references. Add EmailTestData type documentation and restructure all Run method docs with consistent formatting and Help Center links.

* feat: make query parameter optional in Run.listUsers method

The query parameter is now optional with an empty dict as default value, making it easier to retrieve all users without specifying query filters.

* feat: update listUsers method to use None as default for query parameter

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
mateuscardosodeveloper added a commit that referenced this pull request Jan 12, 2026
* feat: complete Account class implementation with missing methods

- Add getAccountInfo, updateAccountInfo, getAccountStatistics methods
- Add getLimits method for account resource limits
- Add complete type definitions for account operations
- Update documentation with comprehensive examples
- Add unit tests for all new methods (27 tests passing)

* feat: enhance Analyses class with snippet methods and improved documentation

Added listSnippets() and getSnippetFile() methods to fetch analysis code examples from TagoIO's public repository. Enhanced all existing methods with comprehensive docstrings following the Account class pattern, including descriptions, references, and practical examples. Updated type definitions to support new snippet functionality with SnippetRuntime, SnippetItem, and SnippetsListResponse types. Expanded test coverage with 8 new test cases and updated RST documentation with detailed method descriptions and code examples.

* feat: enhance regions support and Analysis runtime with async execution

Expanded regions.py with EU region support, TDeploy project integration, and runtime region caching. Refactored Analysis class to support async/await execution patterns with improved error handling and console service integration. Removed deprecated api_socket.py infrastructure and added JSONParseSafe utility for safer JSON parsing. Updated Analysis type definitions with new constructor params and function signatures. Added comprehensive region tests covering TDeploy and multi-region scenarios.

* feat: enhance Dashboards class with Widgets support and comprehensive documentation

Added complete Widgets class implementation with 10 methods for widget management (create, edit, delete, info, getData, sendData, editData, deleteData, editResource, tokenGenerate). Updated Dashboards class with improved method documentation and modernized URLs. Enhanced TypedDict definitions and created comprehensive RST documentation for both Dashboards and Widgets, including all types and methods with code examples. Added extensive test coverage for all dashboard operations.

* fix: resolve duplicate TypedDict name collision in Dashboards_Type

Renamed duplicate 'blueprint_devices' TypedDict definitions to prevent type shadowing. The first definition is now 'BlueprintDeviceConfig' (used by DashboardInfo for dashboard configuration) and the second is 'BlueprintDeviceOrigin' (used by GetDataModel for widget data queries). Updated all references in code and documentation to maintain consistency.

* feat/update-class-devices/SDKPY-147 (#55)

* feat: add chunk management and data backup/restore methods to Devices 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.

* docs: add comprehensive Sphinx RST documentation for Devices class

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.

* fix: correct sentStatus parameter handling in paramList method

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>

* fix: update sentStatus parameter handling to check for None explicitly

* feat/update-class-networks/SDKPY-148 (#56)

* feat: add missing methods and complete Networks class implementation

Implemented 6 missing methods (create, edit, delete, tokenList, tokenCreate, tokenDelete) to achieve feature parity with JavaScript SDK. Added 3 new TypedDict definitions (NetworkTokenInfo, NetworkQuery, ListTokenQuery) for type safety. All methods include comprehensive docstrings following the standard pattern with description, documentation links, and examples.

* docs: add comprehensive Sphinx RST documentation for Networks class

Added complete RST documentation for all 8 Networks class methods and 3 new TypedDict definitions. Documentation includes detailed parameter descriptions, return types, code examples, and links to official TagoIO documentation following the established pattern.

* feat/update-class-profile/SDKPY-149 (#57)

* feat: add comprehensive Profile class implementation with all methods

Added complete implementation of Profile resource management including profile CRUD operations, team management, token operations, usage statistics, and audit logs. Includes new TypedDict definitions and comprehensive test coverage for all methods.

* docs: add comprehensive Sphinx RST documentation for Profile class

Added complete RST documentation for all Profile methods and TypedDict definitions. Includes 10 new TypedDict blocks in Profile_Types.rst and all 17 methods documented in index.rst with proper formatting and cross-references.

* docs: update Help Center link to the new TagoIO Support URL

* fix: update resource references from 'resources.profiles' to 'resources.profile' in doc string examples

* feat/update-class-run/SDKPY-150 (#58)

* feat: add comprehensive documentation and tests for Run class

Add detailed docstrings for all Run class methods with usage examples and authorization policy references. Include new EmailTestData type for email testing functionality. Implement comprehensive test suite covering all Run methods with mocked API responses.

* docs: update Sphinx documentation for Run class methods

Update RST documentation with detailed method descriptions, usage examples, and authorization policy references. Add EmailTestData type documentation and restructure all Run method docs with consistent formatting and Help Center links.

* feat: make query parameter optional in Run.listUsers method

The query parameter is now optional with an empty dict as default value, making it easier to retrieve all users without specifying query filters.

* feat: update listUsers method to use None as default for query parameter

---------

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>

---------

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.

3 participants