LambdaTest SDK Utilities
lambdatest-sdk-utils is a Python utility library designed to provide core functionalities and common tools for integrating with the LambdaTest platform. It typically serves as a foundational component for other LambdaTest Python SDKs, such as those for Selenium or Playwright. The current version is 1.0.5 and it generally follows the release cadence of the broader LambdaTest Python SDK ecosystem.
Warnings
- gotcha This library (`lambdatest-sdk-utils`) is primarily a utility package. It is designed to provide foundational components and helper functions that support other LambdaTest Python SDKs (e.g., Selenium, Playwright), rather than being a standalone testing framework itself. Direct usage might be limited to specific helper functions.
- gotcha LambdaTest SDKs, including those utilizing `lambdatest-sdk-utils`, often rely on environment variables (e.g., `LT_USERNAME`, `LT_ACCESS_KEY`) for authentication with the LambdaTest cloud platform. Failing to set these can lead to authentication errors when interacting with LambdaTest services.
- gotcha There are other Python packages with similar names, such as `lambda_utils` or `lambdautils`, which are often related to AWS Lambda functions and are entirely distinct from `lambdatest-sdk-utils`. Importing the wrong package can lead to unexpected errors or incompatible APIs.
Install
-
pip install lambdatest-sdk-utils
Imports
- LambdaTestLogger
from lambdatest_sdk_utils.logger import LambdaTestLogger
Quickstart
import os
from lambdatest_sdk_utils.logger import LambdaTestLogger
# Configure logging
logger = LambdaTestLogger(logger_name='my_app', level='INFO')
# Example usage of the logger
logger.logger.info('This is an informational message.')
logger.logger.warning('A warning occurred.')
logger.logger.error('An error was logged.')
# In a real scenario, you might use environment variables for credentials
# LT_USERNAME = os.environ.get('LT_USERNAME', 'YOUR_USERNAME')
# LT_ACCESS_KEY = os.environ.get('LT_ACCESS_KEY', 'YOUR_ACCESS_KEY')
print("Check console for log output.")