clari-sdk-patterns

Featured

Production-ready Clari API client patterns in Python and TypeScript. Use when building reusable Clari clients, implementing export pipelines, or wrapping the Clari v4 API for team use. Trigger with phrases like "clari API patterns", "clari client wrapper", "clari Python client", "clari TypeScript client".

AI & Automation 2,359 stars 334 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Clari SDK Patterns ## Overview Clari has no official SDK -- build typed wrappers around the v4 REST API. These patterns cover the Export API for forecasts, job polling, and data transformation pipelines. ## Prerequisites - Completed `clari-install-auth` setup - Python 3.10+ (primary) or TypeScript 5+ ## Instructions ### Step 1: Python Client ```python # clari_client.py import os import time import requests from dataclasses import dataclass, field from typing import Optional @dataclass class ClariConfig: api_key: str base_url: str = "https://api.clari.com/v4" poll_interval: int = 5 max_poll_attempts: int = 60 class ClariClient: def __init__(self, config: Optional[ClariConfig] = None): self.config = config or ClariConfig( api_key=os.environ["CLARI_API_KEY"] ) self.session = requests.Session() self.session.headers.update({ "apikey": self.config.api_key, "Content-Type": "text/plain", }) def list_forecasts(self) -> list[dict]: resp = self.session.get(f"{self.config.base_url}/export/forecast/list") resp.raise_for_status() return resp.json()["forecasts"] def export_forecast( self, forecast_name: str, time_period: str, types: list[str] = None, currency: str = "USD", export_format: str = "JSON", ) -> dict: payload = { "timePeriod": time_period, "typesToExport": ty...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
8 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category