Skip to main content

zoho-people-sdk

CI Docs PyPI Python License: MIT

Python SDK for the Zoho People REST API.

Covers attendance, timesheet, leave management, and employee records — with automatic OAuth token refresh, typed exceptions, and full type hints.

📚 Full documentation: zoho-sdk-people.readthedocs.io


Features

  • Attendance — check-in / check-out, bulk import, user reports, shift configuration
  • Timesheet — create, submit, approve time logs and timesheet periods
  • Leave — apply, approve, cancel leave requests; leave balance report
  • Employees — list, search by email / ID, create and update records
  • OAuth 2.0 — automatic token refresh, from_env() helper, multi data-centre support
  • Typed exceptions — ZohoPeopleAuthError, ZohoPeoplePermissionError, ZohoPeopleRateLimitError, …
  • PEP 561 — fully typed, py.typed marker included

Installation

pip install zoho-people-sdk

With browser fallback for attendance (when API permissions are unavailable):

pip install "zoho-people-sdk[browser]"
playwright install chromium

Quick Start

from zoho_people import ZohoPeopleAuth, ZohoPeopleClient

# Load credentials from environment variables:
# ZOHO_CLIENT_ID, ZOHO_CLIENT_SECRET, ZOHO_REFRESH_TOKEN, ZOHO_DATA_CENTRE
auth   = ZohoPeopleAuth.from_env()
client = ZohoPeopleClient(auth=auth)

# Employees
employees = client.employee.list()

# Add a time log
client.timesheet.add_timelog(
    user="mario.rossi@company.com",
    work_date="2026-04-25",
    hours="08:00",
    job_name="My Project",
)

# Pending leave requests
pending = client.leave.get_pending(
    from_date="01-Apr-2026",
    to_date="30-Apr-2026",
)

# Monthly attendance report
report = client.attendance.get_user_report(
    start_date="01/04/2026",
    end_date="30/04/2026",
    date_format="dd/MM/yyyy",
)

Environment Variables

Copy .env.example to .env:

ZOHO_CLIENT_ID=1000.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ZOHO_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ZOHO_DATA_CENTRE=US          # US | EU | IN | AU | JP
ZOHO_REFRESH_TOKEN=1000.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ZOHO_USER_EMAIL=you@company.com

Required OAuth scopes:

ZOHOPEOPLE.forms.ALL,ZOHOPEOPLE.attendance.ALL,ZOHOPEOPLE.timetracker.ALL,ZOHOPEOPLE.leave.ALL

Error Handling

from zoho_people.exceptions import (
    ZohoPeopleAuthError,
    ZohoPeoplePermissionError,
    ZohoPeopleRateLimitError,
    ZohoPeopleNotFoundError,
    ZohoPeopleValidationError,
    ZohoPeopleError,
)

try:
    client.timesheet.add_timelog(...)
except ZohoPeoplePermissionError:
    print("Missing role permission in Zoho People settings")
except ZohoPeopleAuthError:
    print("Invalid or expired OAuth token")
except ZohoPeopleRateLimitError:
    print("Rate limit hit — SDK will auto-retry")
except ZohoPeopleError as e:
    print(f"API error {e.status_code}: {e.message}")

Data Centres

Region Code Accounts URL
US US accounts.zoho.com
Europe EU accounts.zoho.eu
India IN accounts.zoho.in
Australia AU accounts.zoho.com.au
Japan JP accounts.zoho.jp

Documentation

Full documentation at zoho-sdk-people.readthedocs.io in English and Italian:


Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Install dev dependencies: pip install -e ".[dev]"
  4. Run tests: pytest
  5. Lint: ruff check src/
  6. Open a pull request

License

MIT © 2026 madyel83

Metadata

Release files for zoho-people-sdk 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zoho-people-sdk 0.1.0
File Size Uploaded
zoho_people_sdk-0.1.0.tar.gz 21.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for zoho-people-sdk 0.1.0
File Interpreter ABI Platform
zoho_people_sdk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 44.1 kB

Release files / zoho_people_sdk-0.1.0.tar.gz

Download URL zoho_people_sdk-0.1.0.tar.gz
Size 21.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6b607330cdf649842e95adadf51e296c0b5e946ba591b40aa9a478bcf66e8951
BLAKE2b-256 checksum
How to use checksums
377cee7ab4809be8ea14c6d38eab93edfda3dc31086eb04bff578c60fafcbfec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / zoho_people_sdk-0.1.0-py3-none-any.whl

Download URL zoho_people_sdk-0.1.0-py3-none-any.whl
Size 23.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4beca643cc44ff6b607f00a7d6889a6018496096ff0dd5723852559e0b19b486
BLAKE2b-256 checksum
How to use checksums
757eae914b858737f7d8bd035f87ce83a036a8a6eeb0f63ec76f12f85eed55e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page