Installation

The Community DevOps Agent API can be installed using pip or from source.

From Source

git clone https://github.com/community-devops-agent/devopsagent-api.git
cd devopsagent-api
pip install -e .

Development Installation

For development and testing:

pip install -e ".[dev]"

This installs additional development dependencies including pytest, black, mypy, and sphinx.

Requirements

  • Python 3.8+

  • AWS credentials configured

  • Access to AWS DevOps Agent service

AWS Credentials Setup

Option 1: AWS CLI (Recommended)

aws configure
# Enter your AWS Access Key ID, Secret Access Key, and default region

Option 2: Environment Variables

export AWS_ACCESS_KEY_ID=your-access-key
export AWS_SECRET_ACCESS_KEY=your-secret-key
export AWS_REGION=us-east-1

Option 3: AWS Credentials File

# ~/.aws/credentials
[default]
aws_access_key_id = your-access-key
aws_secret_access_key = your-secret-key

# ~/.aws/config
[default]
region = us-east-1

Verification

After installation, verify the library is working:

import devopsagent_api
import boto3

# This should work without errors
client = boto3.client('community-devops-agent', region_name='us-east-1')
print("Installation successful!")

Troubleshooting

Import Error

If you get an import error, ensure the package is installed:

pip list | grep devopsagent

Service Registration Error

If the service fails to register, check your AWS credentials:

aws sts get-caller-identity

Permission Error

Ensure you have the necessary permissions for the DevOps Agent API.