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.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d056d55cb4e1a6d14735b64c8b108431c3f5d21eded385330b7c66b11b80c524
|
|
| MD5 |
1101ea215f6ceb8151af598a60b39398
|
|
| BLAKE2b-256 |
31119d678966a8baa26f2d748bb0a4fb5611a30f1e42c7cdccbc08eaefb6d886
|
Provenance
The following attestation bundles were made for aloha_api-0.2.0.tar.gz:
Publisher:
python-publish.yml on jhaisley/aloha_api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aloha_api-0.2.0.tar.gz -
Subject digest:
d056d55cb4e1a6d14735b64c8b108431c3f5d21eded385330b7c66b11b80c524 - Sigstore transparency entry: 180458764
- Sigstore integration time:
-
Permalink:
jhaisley/aloha_api@bf80332cfdd43d6f3aef293064a3de9b34133b44 -
Branch / Tag:
refs/tags/0.2.0-build.a - Owner: https://github.com/jhaisley
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@bf80332cfdd43d6f3aef293064a3de9b34133b44 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73c913ab1258dd019d5778a22253ec9ae39ccb475974fc55d5ecc69fa6e7975b
|
|
| MD5 |
ecde9bb3c4d320b33145aa355bbeecc9
|
|
| BLAKE2b-256 |
4bca76e565eb2e311b2d2799fd39e8adee2143d1383e859cd613d48810397363
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aloha_api-0.2.0-py3-none-any.whl -
Subject digest:
73c913ab1258dd019d5778a22253ec9ae39ccb475974fc55d5ecc69fa6e7975b - Sigstore transparency entry: 180458767
- Sigstore integration time:
-
Permalink:
jhaisley/aloha_api@bf80332cfdd43d6f3aef293064a3de9b34133b44 -
Branch / Tag:
refs/tags/0.2.0-build.a - Owner: https://github.com/jhaisley
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@bf80332cfdd43d6f3aef293064a3de9b34133b44 -
Trigger Event:
release
-
Statement type: