IDs and types¶
The SDK uses strongly-typed ID classes to reduce accidental ID mixups.
from affinity import Affinity
from affinity.types import CompanyId
with Affinity(api_key="your-key") as client:
company = client.companies.get(CompanyId(123))
print(company.name)
See reference/types.md.