Skip to main content

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.

Release files for aloha-api 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aloha-api 0.2.0
File Size Uploaded
aloha_api-0.2.0.tar.gz 16.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aloha-api 0.2.0
File Interpreter ABI Platform
aloha_api-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.6 kB

Release files / aloha_api-0.2.0.tar.gz

Download URL aloha_api-0.2.0.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d056d55cb4e1a6d14735b64c8b108431c3f5d21eded385330b7c66b11b80c524
BLAKE2b-256 checksum
How to use checksums
31119d678966a8baa26f2d748bb0a4fb5611a30f1e42c7cdccbc08eaefb6d886
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 11, 2025.

Transparency log

Release files / aloha_api-0.2.0-py3-none-any.whl

Download URL aloha_api-0.2.0-py3-none-any.whl
Size 25.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73c913ab1258dd019d5778a22253ec9ae39ccb475974fc55d5ecc69fa6e7975b
BLAKE2b-256 checksum
How to use checksums
4bca76e565eb2e311b2d2799fd39e8adee2143d1383e859cd613d48810397363
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 11, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page