Skip to main content

A Python client for the Aloha ABA Practice Management Software API

Project description

Aloha API Client

A Python client for the Aloha ABA Practice Management Software API.

Python package PyPi Package

Installation

pip install aloha_api

Configuration

The client requires the following environment variables to be set:

  • ALOHA_CLIENT_ID: Your Aloha API client ID
  • ALOHA_SECRET_KEY: Your Aloha API secret key
  • ALOHA_API_BASE_URL: (Optional) API base URL, defaults to https://customerapi.alohaaba.com

You can set these either in your environment or in a .env file. A template is provided in .env.template.

Usage

from aloha_api import get_access_token, list_clients

# Get an access token
token = get_access_token()

# List all clients
clients = list_clients(token)
print(clients)

Available Functions

  • get_access_token(): Authenticate and get an access token
  • refresh_access_token(access_token, refresh_token): Refresh an expired token
  • list_clients(access_token): Get a list of all clients
  • list_appointments(access_token, start_date, end_date): Get appointments for a date range
  • list_authorizations(access_token, start_date, end_date): Get authorizations for a date range
  • list_billing_ledger(access_token, start_date, end_date): Get billing data for a date range
  • list_authorizations_without_appointments(access_token, start_date, end_date): Find unused authorizations

Development

Setting up the development environment

  1. Clone the repository
  2. Install development dependencies:
    pip install -r requirements.txt
    
  3. Copy .env.template to .env and fill in your credentials:
    cp .env.template .env
    

Running Tests

The test suite includes both unit tests and integration tests.

Unit Tests

Run unit tests with:

pytest

Integration Tests

Integration tests make real API calls and require valid credentials.

To run integration tests:

  1. Configure your .env file with valid credentials
  2. Enable integration tests by setting RUN_INTEGRATION_TESTS=1 in your .env
  3. Run the tests:
    # Run all tests including integration
    pytest
    
    # Run only integration tests
    pytest -v -k "Integration"
    
    # Run specific integration test class
    python -m unittest tests.test_api.TestAlohaIntegration
    

Code Style

This project uses ruff for code formatting and linting:

# Format code
ruff format .

# Check style
ruff check .

Documentation

See vendor-doc.md or https://api-docs.alohaaba.com for complete API documentation.

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

aloha_api-0.2.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

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

aloha_api-0.2.0-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

File details

Details for the file aloha_api-0.2.0.tar.gz.

File metadata

  • Download URL: aloha_api-0.2.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for aloha_api-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d056d55cb4e1a6d14735b64c8b108431c3f5d21eded385330b7c66b11b80c524
MD5 1101ea215f6ceb8151af598a60b39398
BLAKE2b-256 31119d678966a8baa26f2d748bb0a4fb5611a30f1e42c7cdccbc08eaefb6d886

See more details on using hashes here.

Provenance

The following attestation bundles were made for aloha_api-0.2.0.tar.gz:

Publisher: python-publish.yml on jhaisley/aloha_api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aloha_api-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: aloha_api-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 25.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for aloha_api-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73c913ab1258dd019d5778a22253ec9ae39ccb475974fc55d5ecc69fa6e7975b
MD5 ecde9bb3c4d320b33145aa355bbeecc9
BLAKE2b-256 4bca76e565eb2e311b2d2799fd39e8adee2143d1383e859cd613d48810397363

See more details on using hashes here.

Provenance

The following attestation bundles were made for aloha_api-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on jhaisley/aloha_api

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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