Installation Guide
Prerequisites
Before installing the testing-api, ensure your environment meets the following requirements:
- Python: Version 3.8 or higher.
- Package Manager:
pip(included with Python). - Supervised AI Account: Access to the Supervised AI platform and a valid API Key.
Installation
You can install the testing-api directly from the repository using pip.
Standard Installation
Run the following command in your terminal to install the package:
pip install git+https://github.com/UditAkhourii/testing-api.git
Development Installation
If you intend to modify the structure or contribute to the testing framework, clone the repository and install it in editable mode:
# Clone the repository
git clone https://github.com/UditAkhourii/testing-api.git
# Navigate to the directory
cd testing-api
# Install dependencies and the package
pip install -e .
Configuration
The testing-api requires specific environment variables to authenticate with the Supervised AI platform.
- Create a
.envfile in your project root. - Add the following configuration keys:
SUPERVISED_AI_API_KEY=your_api_key_here
TESTING_API_ENV=production
LOG_LEVEL=INFO
Environment Variables Detail
| Variable | Description | Type | Required |
| :--- | :--- | :--- | :--- |
| SUPERVISED_AI_API_KEY | Your unique platform authentication key. | String | Yes |
| TESTING_API_ENV | Target environment (development, staging, or production). | String | No (Default: production) |
| LOG_LEVEL | Detail level of logs (DEBUG, INFO, WARNING, ERROR). | String | No (Default: INFO) |
Initialization
To verify that the installation was successful and the environment is configured correctly, initialize the testing client in a Python script:
from testing_api import TestingClient
# Initialize the client
# The client automatically loads credentials from environment variables
client = TestingClient()
# Check connection status
status = client.get_status()
print(f"Connection Status: {status['state']}")
Verification via CLI
You can also run the built-in health check to ensure all dependencies are resolved:
python -m testing_api.healthcheck
If successful, the output will confirm a valid connection to the Supervised AI platform services.