Add some new utility and info functions to Tower SDK#168
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds new utility and diagnostic functions to the Tower SDK, making it easier for users to access runtime information, retrieve parameters and secrets, and check execution context.
Changes:
- Added a new
infomodule with functions to retrieve runtime environment details (schedule info, run metadata, runner details, execution context) - Added utility functions in
_utils.pyfor accessing parameters and secrets from environment variables - Exposed the new
infomodule and utility functions through the main SDK package
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/tower/info/init.py | Implements diagnostic functions to retrieve runtime environment information such as schedule details, run metadata, hostname/port, runner info, and execution context |
| src/tower/_utils.py | Adds utility functions for retrieving parameters and secrets from environment variables |
| src/tower/init.py | Exports the new utility functions and info module to make them accessible to SDK users |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
konstantinoscs
approved these changes
Jan 14, 2026
| return os.getenv(name, default) | ||
|
|
||
|
|
||
| def parameter(name: str, default: str = ""): |
Contributor
Author
There was a problem hiding this comment.
Just for convenience.
Contributor
There was a problem hiding this comment.
Then why not just get rid of the param method altogether? feels weird
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Title says it all. We need some new utility functions in the Tower SDK that make it easier to get diagnostic info (see the
infomodule) as well as get getting parameters and secrets. This just makes things a little easier for users.