Affinity Python SDK¶
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.
Install¶
pip install affinity-sdk
Requires Python 3.10+.
Quickstart¶
from affinity import Affinity
with Affinity(api_key="your-api-key") as client:
me = client.whoami()
print(me.user.email)
Next steps¶
- Getting started - Authentication, first request, common patterns
- Examples
- CLI
- AI Integrations - MCP Server & Claude Code plugins
- Troubleshooting
- API reference
Guides¶
- Authentication - API keys, env vars, context managers
- Pagination - Iterating large result sets
- Filtering - Filter query syntax
- Field values - Custom field data
- Errors & retries - Exception handling
- Rate limits - Managing API quotas
- Datetime handling - Timezone behavior
- Sync vs async - Choosing the right client