Skip to main content

PetCareers Python SDK

Typed synchronous and asynchronous clients for the PetCareers Partner API. Requires Python 3.11+. Distributed under MIT; see the included LICENSE.

Install

python -m pip install petcareers-sdk

The package name is petcareers-sdk; the import name is petcareers.

Synchronous client

import os
from petcareers import PetCareers, PetCareersError

with PetCareers(
    api_key=os.environ["PARTNER_API_KEY"],
    environment="sandbox",
    locale="en",
) as client:
    identity = client.get_identity("clinics:read")
    clinics = client.list_clinics(limit=10)
    for clinic in client.iterate_clinics(limit=100):
        profile = client.get_clinic(clinic["connectionId"])
        # Process the authorized clinic without logging personal data.

Asynchronous client

import asyncio
import os
from petcareers import AsyncPetCareers

async def main():
    async with AsyncPetCareers(api_key=os.environ["PARTNER_API_KEY"]) as client:
        offers = await client.list_offers(limit=10)
        async for offer in client.iterate_offers(limit=100):
            pass  # Process each offer.

asyncio.run(main())

Responses preserve the wire envelope: response["data"] and response["requestId"]. List data contains items and nextCursor. Keep API keys server-side. Your key needs the scopes and clinic connections required by each operation. Use a separate production application/key with environment="production" when ready.

Both clients expose get_clinic, get_offer, get_logo, mutation operations and webhook management. verify_webhook verifies signed raw webhook bytes; your receiver must persist event IDs for deduplication. Catch PetCareersError and inspect sanitized code, status, request_id, retry_after and current_version rather than logging raw payloads. Reads have bounded retries; eligible idempotent writes require explicit retry opt-in. Always close clients using context managers or close() / aclose(). The SDK sends no telemetry.

Polski

SDK wymaga Python 3.11+. Instalacja: python -m pip install petcareers-sdk; import: from petcareers import PetCareers. Licencja MIT obejmuje SDK, a dostęp do API wymaga osobnej autoryzacji.

PetCareers działa synchronicznie, a AsyncPetCareers obsługuje asyncio. Używaj with lub async with, aby zamknąć połączenia. Domyślne środowisko to sandbox; ustaw locale="pl" dla języka polskiego. Klucz przechowuj wyłącznie na serwerze i nadaj mu wymagane zakresy dostępu.

Odpowiedzi zawierają data i requestId; listy mają data.items i data.nextCursor. Iteratory automatycznie obsługują strony. Błędy mają typ PetCareersError i oczyszczone pola diagnostyczne. Nie loguj danych osobowych ani kluczy. Zapis wymaga osobnego klucza idempotencji i jawnego włączenia ponowień dla obsługiwanych operacji. verify_webhook weryfikuje podpis oryginalnych bajtów; odbiorca musi zapisywać identyfikatory zdarzeń, aby zapobiegać duplikatom. SDK nie wysyła telemetrii.

English guide · Polski poradnik

Repository guides require access while the GitHub repository is private.

Metadata

Release files for petcareers-sdk 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 petcareers-sdk 0.1.0
File Size Uploaded Provenance
petcareers_sdk-0.1.0.tar.gz 70.9 kB With provenance Details

Built distribution (wheel)

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

Total release size: 85.3 kB

Release files / petcareers_sdk-0.1.0.tar.gz

Download URL petcareers_sdk-0.1.0.tar.gz
Size 70.9 kB
Tags Source
SHA-256 checksum
How to use checksums
8d9f468ca37b27314b898d16271fc8f7410249fe990b3704ed308be23c10b0fd
BLAKE2b-256 checksum
How to use checksums
9ff6b083f7de5fc6fbe35f3a72ac6da85970bf2bfdab4e8d81bda16e69f7c9c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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

Transparency log

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

Download URL petcareers_sdk-0.1.0-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f0d7c1ea048e7fc09bdda391532120e80c3795a64d7a55653d95cd21a4d9df0a
BLAKE2b-256 checksum
How to use checksums
8b438a1ad549ad6bddcbd51e8446ab4676cadaf2350d07c006e5969dc22d8fb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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

Transparency log

Security for petcareers-sdk 0.1.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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for petcareers_sdk-0.1.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 Oct 25, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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