feat/update-analyses-class-and-enable-regions/SDKPY-144#53
Merged
mateuscardosodeveloper merged 8 commits intofeat/updated-account-class/SDKPY-143from Dec 9, 2025
Conversation
…ntation 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.
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.
- 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.
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.
…analyses-class-and-enable-regions/SDKPY-144
…onment from environment variables
felipefdl
approved these changes
Dec 8, 2025
dd099e5
into
feat/updated-account-class/SDKPY-143
3 checks passed
mateuscardosodeveloper
added a commit
that referenced
this pull request
Dec 9, 2025
* 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) * docs: fix Account class documentation formatting and examples Update documentation with proper RST heading underlines and fix Account.edit() code example to include required id parameter. * feat/update-analyses-class-and-enable-regions/SDKPY-144 (#53) * 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does PR do?
🚀 SDK Enhancement: Analyses Class Improvements and Multi-Region Support
This PR enhances the TagoIO Python SDK with two major improvements: comprehensive Analyses class documentation with snippet support, and expanded multi-region capabilities including EU region and TDeploy integration.
📊 Analyses Class - Snippet Integration & Documentation
listSnippets()- Fetches available code snippets from TagoIO's public repositorygetSnippetFile()- Retrieves raw source code content of specific snippetsSnippetRuntime- Literal type for supported runtimes (node-legacy, python-legacy, node-rt2025, python-rt2025, deno-rt2025)SnippetItem- Individual snippet metadata structureSnippetsListResponse- API response containing snippets metadata🌍 Multi-Region Support Enhancement
eu-w1region support alongside existingus-e1RegionsObjTDeploytype for TDeploy project IDsRegionsObjsupporting both API/SSE and TDeploy configurationsruntimeRegion) for improved performancesetRuntimeRegion()- Configure runtime regiongetConnectionURI()- Retrieve region configuration with automatic environment detectiontest_tdeploy.py)🔧 Analysis Runtime Improvements
ConsoleServiceintegrationAnalysisConstructorParams- Constructor parameters with autostart optionAnalysisFunction- Type signature for analysis functionsapi_socket.pyJSONParseSafe.pyutility for safer JSON parsingThese changes to match the JavaScript SDK functionality! 🎉
JIRA cards
Type of alteration