Skip to content

Conversation

@mateuscardosodeveloper
Copy link
Contributor

@mateuscardosodeveloper mateuscardosodeveloper commented Nov 14, 2025

What does PR do?

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

Core Changes

  • Added missing Account methods: Implemented tokenCreate() and tokenDelete() methods for token management operations
  • Enhanced documentation: Updated all method docstrings to follow the standardized pattern with @description, @see, and @example sections
  • Type safety improvements: Added proper type hints and return types for all methods
  • Complete RST documentation: Added comprehensive Sphinx documentation for all Account methods and types

Implementation Details

New Methods:

  • tokenCreate(): Creates a new token for the account with specified permissions
  • tokenDelete(): Removes an existing token from the account

Documentation Updates:

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

Quality Assurance

  • All existing tests continue to pass
  • Code follows project conventions and style guidelines
  • Linting passes with Ruff
  • Documentation builds successfully with Sphinx

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

JIRA cards.

SDKPY-143

Type of alteration

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

- 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)
@mateuscardosodeveloper mateuscardosodeveloper added documentation Improvements or additions to documentation enhancement New feature or request labels Nov 14, 2025
Update documentation with proper RST heading underlines and fix Account.edit() code example to include required id parameter.
* 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 Analysis class initialization and region handling

- Add instance attributes (params, started, _running) for better state management
- Fix autostart logic to explicitly check for False instead of falsy values
- Fix region configuration to safely handle missing region parameter using .get()

This improves the Analysis class initialization by adding proper state tracking and preventing potential KeyError when region is not provided.

* feat: update Analysis class to start automatically based on autostart parameter

* feat: modify autostart parameter default to True in Analysis class

* feat: refactor Analysis class initialization and improve region support

Restructured Analysis class to separate initialization from execution flow using new init() method pattern. Modified TagoContext from TypedDict to class for better runtime flexibility. Updated documentation examples to reflect Python runtime instead of Deno.

* feat: update Analysis class to correctly assign analysis_id and environment from environment variables
@mateuscardosodeveloper mateuscardosodeveloper merged commit 6d70fbd into main Dec 9, 2025
6 checks passed
@mateuscardosodeveloper mateuscardosodeveloper deleted the feat/updated-account-class/SDKPY-143 branch December 9, 2025 19:24
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