Client

Core HTTP client for Zoho People SDK.

Response format

Zoho People wraps most responses as:

{"response": {"status": 0, "result": [...]}}

where status=0 means success and status=1 means an application-level error. Some older endpoints return a plain JSON list or dict.

URL routing

  • v2/... paths → {base}/api/v2/... (no /people/ prefix)

  • All other paths → {base}/people/api/{path}

class zoho_people.client.ZohoPeopleClient(auth, timeout=30, max_retries=3, retry_backoff=1.0)[source]

Bases: object

Entry point for the Zoho People SDK.

Parameters:
  • auth (ZohoPeopleAuth) – Authentication object.

  • timeout (int) – HTTP request timeout in seconds (default 30).

  • max_retries (int) – Number of retries on rate-limit or transient errors (default 3).

  • retry_backoff (float) – Base wait time (seconds) between retries, doubled on each attempt.

Example

>>> from zoho_people import ZohoPeopleClient, ZohoPeopleAuth
>>> auth   = ZohoPeopleAuth.from_env()
>>> client = ZohoPeopleClient(auth=auth)
>>> emp    = client.employee.get_by_email("mario.rossi@company.com")
property employee: EmployeeAPI
property attendance: AttendanceAPI
property timesheet: TimesheetAPI
property leave: LeaveAPI
build_url(path)[source]

Build the full request URL from a relative path.

Paths starting with v2/ use {base}/api/v2/.... All other paths use {base}/people/api/....

Parameters:

path (str)

Return type:

str

get(path, params=None)[source]

HTTP GET with automatic auth and retry.

Parameters:
Return type:

Any

post(path, params=None, data=None)[source]

HTTP POST with automatic auth and retry.

Parameters:
Return type:

Any

close()[source]

Close the underlying HTTP session.

Return type:

None