技能潮 SkillTide 提交收录
官方说明2 个来源开源项目7 天前
yaniv-golan/affinity-sdk

yaniv-golan/affinity-sdk

Unofficial strongly-typed Python SDK for the Affinity CRM API - full read/write coverage, Pydantic v2, MCP…
在 GitHub 查看 ↗直链 · 无中转页
官方说明Unofficial strongly-typed Python SDK for the Affinity CRM API - full read/write coverage, Pydantic v2, MCP server included. For when you need more than Affinity's official MCP
★ 数取值
0 ★ · yaniv-golan/affinity-sdk · 取自该仓库的 GitHub 页面 · (2026-10-16 20:00:20 核对)
来源明细
从该仓库的 GitHub 页面直接读取 · 条目类型:开源项目
收录与活跃
收录于 2026-10-10 · 最近见到 2026-10-16 · 共见到 13 次 · 被 2 个来源列出
评分构成
综合分 203 · 2 个来源 · repo
安装
pip install affinity-sdk
常见问题(答案都来自我们的记录)
怎么安装?
该仓库给出的安装命令是 pip install affinity-sdk。我们的记录里它是仓库自己提供的;不保证在你的客户端上直接可用。
它适合谁 / 用来做什么?
我们把它归在这些标签下: 开源项目。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
仓库 yaniv-golan/affinity-sdk;我们收录于 2026-10-10;最近见到 2026-10-16。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。
第三方质量标记

Affinity Python SDK

以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →

A modern, strongly-typed Python wrapper for the Affinity CRM API.
Disclaimer: This is an unofficial community project and is not affiliated with, endorsed by, or sponsored by Affinity. “Affinity” and related marks are trademarks of their respective owners. Use of the Affinity API is subject to Affinity’s Terms of Service.
Maintainer: GitHub: yaniv-golan
Documentation: https://yaniv-golan.github.io/affinity-sdk/latest/
Affinity's Official MCP Server
Affinity runs an official MCP Server: a hosted server you connect to from Claude, ChatGPT, Copilot, Notion and other AI clients with OAuth sign-in. It reads and updates most CRM records and is the easiest way to work with Affinity in a chat.
This SDK serves a different purpose — it's a strongly-typed Python client and CLI for the Affinity API (companies, persons, opportunities, lists, field values, notes, reminders, interactions, webhooks, files, and more). Use it when you work with Affinity in code, scripts or a terminal: bulk updates, exports, data pipelines, webhooks, or custom integrations and tooling.
For a detailed comparison, see Affinity SDK vs. Official MCP.
Table of Contents
- Features
- Installation
- Quick Start
- Usage Examples
- Type System
- API Coverage
- Authentication
- Configuration
- Error Handling
- Async Support
- Development
Features
- **Broad API coverage** - V1 and V2, routed per operation (6 V2 operations still planned)
- **CLI included** - Scriptable command-line interface for automation
- **Strong typing** - Full Pydantic V2 models with typed ID classes
- **No magic numbers** - Comprehensive enums for all API constants
- **Automatic pagination** - Iterator support for seamless pagination
- **Rate limit handling** - Automatic retry with exponential backoff
- **Response caching** - Optional caching for field metadata
- **Both sync and async** - Full support for both patterns
AI Integrations
- **Claude Code plugins** - SDK and CLI knowledge for AI-assisted development
- **MCP Server** - Connect desktop AI tools to Affinity
Installation
Requires Python 3.10+.
Optional (local dev): load .env automatically:
Optional: install the CLI:
The CLI includes a powerful query command for structured data extraction with filtering, aggregations, and relationship includes. Output formats include JSON, CSV, markdown, and TOON (token-optimized for LLMs).
CLI docs: https://yaniv-golan.github.io/affinity-sdk/latest/cli/
MCP Server
Connect desktop AI tools to Affinity CRM.
**Claude Desktop** (easiest - MCPB bundle):
1. Install CLI: pipx install "affinity-sdk[cli]"
2. *(Optional)* Pre-configure API key: xaffinity config setup-key
- If skipped, Claude Desktop will prompt for your API key during MCPB install
3. Download the .mcpb bundle from GitHub Releases
4. Double-click to install (or drag to Claude Desktop)
**Other clients** (Cursor, Windsurf, VS Code + Copilot, Zed, etc.):
These require manual configuration. See the MCP Server docs for step-by-step instructions.
MCP docs: https://yaniv-golan.github.io/affinity-sdk/latest/mcp/
Claude Code Plugins
If you use Claude Code, install plugins for SDK/CLI knowledge:
Plugin docs: https://yaniv-golan.github.io/affinity-sdk/latest/guides/claude-code-plugins/
Documentation
- Full documentation
- MCP Server
- CLI Reference
- API Reference
Quick Start
Usage Examples
Working with Companies
Working with Persons
Working with Lists
Notes
Reminders
Files
Webhooks
Rate Limits
Type System
The SDK uses strongly-typed ID classes (int/str subclasses) to prevent accidental mixing:
All magic numbers are replaced with enums:
API Coverage
Which Affinity API the SDK uses for each feature. The SDK uses V2 wherever V2 can do the job and
来源
github · https://github.com/yaniv-golan/affinity-sdk
按领域浏览
开源项目
收录于
昨天

更多开源项目

查看开源项目全部 731 条 →

所属领域与标签

每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。

浏览全部领域 →

← 返回索引