Skip to main content

AveeCare Python Library

PyPI version Python versions CI License: MIT

The official Python library for the AveeCare API. Read and write your home care agency's patients, visits, invoices and more from your own servers, with typed models, sync and async clients, automatic pagination, retries and idempotency built in.

  • Python 3.9+, one dependency (httpx)
  • Sync AveeCare and async AsyncAveeCare clients
  • Typed models (py.typed), typed errors, automatic retries and idempotency keys

Install

pip install aveecare

Quickstart

Create an API key in AveeCare, then:

import os

from aveecare import AveeCare

client = AveeCare(api_key=os.environ["AVEECARE_API_KEY"])

page = client.patients.list(status="Active", limit=25)
for patient in page.data:
    print(patient.id, patient.first_name, patient.last_name)

Authentication

Every request is authenticated with your secret API key, sent as Authorization: Bearer ak_<keyId>_<secret>. Pass it as api_key, or set the AVEECARE_API_KEY environment variable and call AveeCare(). Keys are read-only or read and write; see Authentication.

Keep keys on your server. Never put an API key in browser or mobile code.

Usage

# Retrieve, create, update and delete
patient = client.patients.retrieve("pat_8f2k1m9x")
created = client.patients.create(first_name="Margaret", last_name="Alvarez")
updated = client.patients.update(created.id, scheduling_notes="Prefers morning visits", email=None)
client.patients.delete(created.id)

# Visits are listed by start-time window (at most 93 days)
visits = client.visits.list(start_from="2026-10-01T00:00:00Z", start_to="2026-10-08T00:00:00Z")

# The API key making the request
me = client.me.retrieve()

Attributes and arguments are snake_case (first_name, created_at); the library maps them to the API's camelCase JSON. On updates, passing None clears a field, and leaving an argument out leaves the field unchanged. patient.raw holds the JSON exactly as the API returned it, and patient.to_dict() converts a model back to API JSON.

Async

import asyncio

from aveecare import AsyncAveeCare


async def main() -> None:
    async with AsyncAveeCare() as client:
        page = await client.patients.list(limit=25)
        async for patient in client.patients.list(status="Active"):
            print(patient.id)


asyncio.run(main())

Pagination

list() returns the first page. Iterating the page walks every item across every page, fetching more as needed:

for patient in client.patients.list(limit=100):
    print(patient.id)

# Or one page at a time
page = client.patients.list(limit=25)
while page.has_next_page():
    page = page.get_next_page()

Errors

Every error is an AveeCareError. API errors carry status, code, type, message and request_id:

from aveecare import AveeCareError, NotFoundError

try:
    client.patients.retrieve("pat_missing")
except NotFoundError as err:
    print("No such patient", err.request_id)
except AveeCareError as err:
    print(err.status, err.code, err.message)
Status Class Example codes
400 InvalidRequestError invalid_request, unknown_field
401 AuthenticationError unauthorized
403 PermissionError forbidden, insufficient_scope
404 NotFoundError not_found
409 ConflictError idempotency_conflict
429 RateLimitError rate_limited
other APIError internal_error

Network failures raise APIConnectionError, and timeouts APITimeoutError.

Retries, timeouts and idempotency

Rate-limited (429), server error (5xx) and network failures are retried twice by default with jittered exponential backoff. When the API sends Retry-After, the client waits that long.

Every create sends an Idempotency-Key (a random UUID), and the same key is reused across retries, so a retried create never makes a duplicate. Pass your own key to make a create safe to repeat across processes:

client = AveeCare(max_retries=4, timeout=20.0)

client.patients.create(
    first_name="Margaret",
    last_name="Alvarez",
    idempotency_key="import-row-1042",
    timeout=5.0,
)

Configuration

Argument Default
api_key AVEECARE_API_KEY Your secret key
base_url AVEECARE_BASE_URL, then https://api.aveecare.com API origin
timeout 60.0 Seconds per attempt
max_retries 2 Retries for 429, 5xx and network errors
default_headers none Headers sent with every request
http_client a new httpx.Client Your own client (proxies, transports)

Every request sends User-Agent: aveecare-python/<version>.

Documentation

The full API reference, with every resource and field, is at www.aveecare.com/docs/api. Building an integration to offer other agencies? See the AveeCare Partner Center.

Other official SDKs

License

MIT. See LICENSE.


Built by AveeCare — home care software.

Metadata

Release files for aveecare 0.1.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 aveecare 0.1.0
File Size Uploaded
aveecare-0.1.0.tar.gz 66.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aveecare 0.1.0
File Interpreter ABI Platform
aveecare-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 131.4 kB

Release files / aveecare-0.1.0.tar.gz

Download URL aveecare-0.1.0.tar.gz
Size 66.0 kB
Tags Source
SHA-256 checksum
How to use checksums
081cf5dd919b81f2bee9b05cc8cbfd7b0dea5df2a40ac5e0c3f53fe6d9f51322
BLAKE2b-256 checksum
How to use checksums
71d96df6f9e0e3381be147f43a706ea181ac0470add0923ff7542bb324f91676
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 7, 2026.

Transparency log

Release files / aveecare-0.1.0-py3-none-any.whl

Download URL aveecare-0.1.0-py3-none-any.whl
Size 65.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2286a741bd34912fea2bf9dfc2171a4beb321f642ebe4b18e899252175569e1a
BLAKE2b-256 checksum
How to use checksums
75232e01211005045cd6c475dc90602501eb6fb77487f2c068fcdbf14f83f378
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

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