A Python client library for interacting with the AML Optima Compass API.
pip install amlcompass_apiThere are two ways to configure the client:
Create a .env file in your project root:
CONSUMER_KEY=your_consumer_key
CONSUMER_SECRET=your_consumer_secret
API_URL=https://api.amlcompass.com
from amlcompass_api import AMLCompassAPIClient
aml_client = AMLCompassAPIClient(
consumer_key="your_consumer_key",
consumer_secret="your_consumer_secret",
api_url="https://api.amlcompass.com"
)from amlcompass_api import AMLCompassAPIClient
# Define transaction data
transaction_id: str = "123456"
document_url: str = "https://example.com/document.pdf"
document_type: int = 1
# Initialize client.
# If you have set environment variables, you can skip the explicit configuration.
aml_client = AMLCompassAPIClient()
# Check if a transaction is valid:
aml_client.transaction_service.is_valid(transaction_id)
# Get Transaction Data:
aml_client.transaction_service.get_data(transaction_id)
# Add a document to a transaction:
aml_client.transaction_service.add_document(transaction_id, document_url, document_type)
# Responses example:
{
"data": {"valid": True, "transaction_id": "123456"},
"status_code": 200,
}
-
Authentication
- OAuth 1.0 support
-
Transaction Services
- Transaction data retrieval
- Transaction validation
- Document attachment
-
Future Services (Coming Soon)
# Clone repository
git clone https://github.com/yarel2l/amlcompass_api.git
cd amlcompass_api
# Install development dependencies
pip install -r requirements.txt
# Run tests
pytest- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -am 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Create Pull Request
- Run tests before submitting PRs
- Add documentation for new features
- Follow Python type hinting conventions
- Update changelog
MIT License - See LICENSE for details.