affinity-python-sdk

Interact with the Affinity CRM API using the Python SDK.

1|2|Updated Feb 2, 2026
One-click install
npx skills add https://github.com/oneryalcin/affinity-sdk --skill affinity-python-sdk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: affinity-python-sdk
Source: https://github.com/oneryalcin/affinity-sdk/tree/main/plugins/affinity-sdk/.claude-plugin/skills/affinity-python-sdk
Command: npx skills add https://github.com/oneryalcin/affinity-sdk --skill affinity-python-sdk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies using the Affinity Python SDK to interact with the Affinity CRM API, providing typed IDs, pagination, and both sync/async access patterns in a Pythonic way.

Core Features & Use Cases

  • Typed IDs for safe, correct API calls with PersonId, CompanyId, ListId, and more.
  • Async and sync client support enabling flexible integration patterns.
  • Pagination helpers and CLI automation to streamline data retrieval and batch processing.
  • Use Case: Build a data integration that fetches companies and persons, paginates results, and stores them in a warehouse or analytics pipeline.

Quick Start

Install the SDK with pip install affinity-sdk, initialize a client from environment variables or a simple from_env call, and perform a basic read operation such as listing companies or retrieving the current user.

Frequently Asked Questions about affinity-python-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I interact with the Affinity CRM API using Python?

Use the Affinity Python SDK to interact with the Affinity CRM API by installing the affinity-sdk package, initializing a client via environment variables or from_env, and performing read operations like listing companies or retrieving the current user.

Can I use async and sync clients to fetch Affinity data?

Yes, the Affinity Python SDK supports both async and sync client access patterns, enabling flexible integration strategies for fetching and manipulating CRM data within your automation scripts and pipelines.

What are typed IDs and why do they matter for Affinity API calls?

Typed IDs like PersonId, CompanyId, and ListId ensure safe, correct API calls by enforcing type safety, preventing mismatched identifier types when fetching or manipulating records in the Affinity CRM.

How do I handle pagination when retrieving Affinity CRM records?

The Affinity Python SDK provides built-in pagination helpers and CLI automation to streamline data retrieval and batch processing, allowing you to efficiently paginate large sets of companies and persons.

Do I need explicit approval to write data back to Affinity using Python?

Yes, the Affinity Python SDK operates read-only by default to ensure safety, requiring explicit user approval before performing any write operations to manipulate Affinity CRM data.

What's the best way to build a data pipeline fetching companies from Affinity?

Build a data pipeline by using the SDK's async or sync clients to fetch companies and persons, apply pagination helpers for batch processing, and store the retrieved results in a data warehouse or analytics pipeline.