Skip to main content

A Python client library for interacting with the AML Optima Compass API.

Project description

AML Optima Compass API Client

A Python client library for interacting with the AML Optima Compass API.

Installation

pip install amlcompass_api

Configuration

There are two ways to configure the client:

Environment Variables (Recommended)

Create a .env file in your project root:

CONSUMER_KEY=your_consumer_key
CONSUMER_SECRET=your_consumer_secret
API_URL=https://api.amlcompass.com

Explicit Configuration

from amlcompass_api import AMLCompassAPIClient

aml_client = AMLCompassAPIClient(
    consumer_key="your_consumer_key",
    consumer_secret="your_consumer_secret",
    api_url="https://api.amlcompass.com"
)

Usage Examples

Transaction Operations

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,
}

Available Features

  • Authentication

    • OAuth 1.0 support
  • Transaction Services

    • Transaction data retrieval
    • Transaction validation
    • Document attachment
  • Future Services (Coming Soon)

Development

Setup Local Environment

# 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

Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -am 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Create Pull Request

Development Guidelines

  • Run tests before submitting PRs
  • Add documentation for new features
  • Follow Python type hinting conventions
  • Update changelog

License

MIT License - See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

amlcompass_api-0.1.3.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

amlcompass_api-0.1.3-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file amlcompass_api-0.1.3.tar.gz.

File metadata

  • Download URL: amlcompass_api-0.1.3.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for amlcompass_api-0.1.3.tar.gz
Algorithm Hash digest
SHA256 9d6f622a67910421a6a69b8f16e8d74c5a7325bfc3e17a092ead1d5f116e9bb7
MD5 390048b18e9ce8f7f45114bb622035e9
BLAKE2b-256 16612f6899943a090197f5399d819a3b272c33d6128ad1612166a92e8295eef4

See more details on using hashes here.

File details

Details for the file amlcompass_api-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: amlcompass_api-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for amlcompass_api-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 91feec8b92c6b6d2d99a4168d9ddc86a5ee1c3395c7e2f67878e574bad49b4cc
MD5 a926d14f1e359593f9159642cb2d458e
BLAKE2b-256 cf7d21ad08799a2c6e16dbb767f7b721a7e65c7dd3af29953b31d97b217eac0b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page