Skip to content

Repository files navigation

Crisphive Python

The official Python SDK for the Crisphive API.

Typed access to the public /v1 API — customers, bookings, catalog, team and fleet.

Requirements

Python 3.8+.

Installation

pip install crisphive

Authentication

Every request is authenticated with a secret API key sent as a bearer token. Create keys from your Crisphive business dashboard. The key prefix selects the data environment:

  • chsk_live_… → live (production) data
  • chsk_test_… → sandbox (isolated test) data

Load keys from the environment — never commit them.

Usage

import os
import crisphive
from crisphive.rest import ApiException

config = crisphive.Configuration(
    access_token=os.environ["CRISPHIVE_API_KEY"],  # SDK adds the "Bearer " prefix
)

with crisphive.ApiClient(config) as api_client:
    customers = crisphive.CustomerApi(api_client)

    # List customers.
    res = customers.list_customers(limit=20)
    for c in (res.data.customers or []):
        print(c.id, c.full_name)

    # Create a customer.
    try:
        created = customers.create_customer(
            crisphive.CustomerCreateRequest(full_name="Ada Lovelace", email="ada@example.com")
        )
        print("created", created.data.customer_id)
    except ApiException as e:
        print("error", e.status, e.body)

Pagination

List methods accept page / limit and return a meta object (total, count, per_page, current_page, total_pages).

Idempotency

create_* calls (customers, bookings) accept an Idempotency-Key header so retries never create a duplicate.

Errors

Non-2xx responses raise crisphive.rest.ApiException; inspect e.status and e.body for the Crisphive error code.

Documentation

License

MIT

About

Official Crisphive Python SDK — agentic scheduling & field service API — jobs, crews, dispatch, CRM, fleet

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages