pyicloud
PyiCloud is a module which allows pythonistas to interact with iCloud webservices.
What it is and what it does
PyiCloud is a Python client library for Apple's iCloud web services. It authenticates with an Apple ID and provides programmatic access to iCloud features: finding devices, managing calendars and contacts, syncing photos, accessing notes and reminders, and inspecting account details. The library wraps iCloud's web API and handles authentication, including two-factor authentication and security-key challenges via FIDO2.
The package includes both a Python API (instantiate PyiCloudService with credentials) and a command-line tool (icloud subcommands for auth, devices, photos, calendar, etc.). Passwords can be stored in the system keyring to avoid repeated prompts. The library depends on requests for HTTP, cryptography and fido2 for security, keyring for credential storage, and pydantic for data validation.
Use it for:
- Locate or retrieve information about Apple devices registered to an account programmatically.
- Sync iCloud photos to a local directory on a schedule or on-demand.
- Query or manipulate iCloud calendars, contacts, notes, and reminders from Python scripts.
- Build automation workflows that interact with iCloud services without manual web login.
- Use the icloud CLI to manage iCloud account operations from shell scripts or cron jobs.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyiCloud provides Python access to iCloud web services, including device location, calendars, contacts, photos, and account management, with both a library API and command-line interface.
Yes, if you need programmatic access to iCloud services. The library is actively maintained, has low install friction, carries an MIT license, and supports current Python versions (3.10–3.14). No known vulnerabilities. Caveat: Apple's iCloud API is not officially documented, so compatibility may shift; review the terms of use before deploying in production.
Install
pyicloud on PyPI
pip
pip install pyiclouduv
uv add pyicloudpoetry
poetry add pyicloudInstalling pyicloud
Before you install
Low install friction with a pure-Python wheel and stable maintenance: last commit 2026-08-10, active status, and 11 runtime dependencies that are all widely-used libraries (requests, cryptography, keyring, protobuf, pydantic). Requires Python 3.10 or later.
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you retain the license notice.
Quickstart
pip install pyicloud
from pyicloud import PyiCloudService
api = PyiCloudService('user@apple.com', 'password')
devices = api.devices
Requires Python 3.10 or later; Apple ID credentials and may require two-factor authentication setup.
Verify before relying
- Whether two-factor authentication is required for all accounts or only some.
- Rate limits or throttling imposed by Apple's iCloud API.
- Stability and compatibility of the iCloud API endpoints being called.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 11 — certifi, cryptography, fido2, keyring, keyrings.alt, protobuf, pydantic, requests, srp, tinyhtml, tzlocal |
| Maintenance | actively maintained — 66 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 105,343/month — #12,704 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyicloud-2.6.5-py3-none-any.whl
Keywords: icloud, find-my-iphone
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
pyobjc-framework-CloudKitProvides Python bindings to Apple's CloudKit…
permissive · top 15,000 on PyPI
icaleventsDownloads, parses, and queries iCalendar (.ics)…
permissive · top 15,000 on PyPI
ipfshttpclientA Python HTTP client library for interacting…
permissive · top 15,000 on PyPI
opendatalabOpenDataLab Python SDK provides programmatic…
permissive · top 15,000 on PyPI
o365O365 provides a Pythonic interface to Microsoft…
permissive · top 5,000 on PyPI
aiogoogleAiogoogle is an async Python client for…
permissive · top 5,000 on PyPI
ring-doorbellExposes Ring.com doorbell, camera, and chime…
copyleft · top 15,000 on PyPI
webdav4A WebDAV client library that provides a Python…
permissive · top 15,000 on PyPI
vdirsyncerVdirsyncer is a command-line tool that…
permissive · top 15,000 on PyPI
pyhiveapiA Python library for controlling Hive smart…
permissive · top 15,000 on PyPI