Aloha API Client
A Python client for the Aloha ABA Practice Management Software API.
Installation
pip install aloha_api
Configuration
The client requires the following environment variables to be set:
ALOHA_CLIENT_ID: Your Aloha API client IDALOHA_SECRET_KEY: Your Aloha API secret keyALOHA_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 tokenrefresh_access_token(access_token, refresh_token): Refresh an expired tokenlist_clients(access_token): Get a list of all clientslist_appointments(access_token, start_date, end_date): Get appointments for a date rangelist_authorizations(access_token, start_date, end_date): Get authorizations for a date rangelist_billing_ledger(access_token, start_date, end_date): Get billing data for a date rangelist_authorizations_without_appointments(access_token, start_date, end_date): Find unused authorizations
Development
Setting up the development environment
- Clone the repository
- Install development dependencies:
pip install -r requirements.txt
- Copy
.env.templateto.envand 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:
- Configure your
.envfile with valid credentials - Enable integration tests by setting
RUN_INTEGRATION_TESTS=1in your.env - 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.
Metadata
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aloha_api-0.2.0.tar.gz | 16.6 kB | With provenance | Details for aloha_api-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aloha_api-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for aloha_api-0.2.0-py3-none-any.whl |
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 logRelease 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 logSecurity for aloha-api 0.2.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for aloha_api-0.2.0.tar.gz
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 logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.