Registry / storage / pyicloud

pyicloud

JSON →
library2.6.4pypypi✓ verified 88d ago

PyiCloud is a Python module that enables interaction with iCloud webservices, providing access to iCloud Drive, Photos, Contacts, Calendars, Reminders, and Find My iPhone. Current version is 2.6.4, with a semi-regular release cadence.

pip install pyicloud
INSTALL
IMPORT
SIG · PYICLOUD
P
pyicloud
storagepythonv2.6.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PyiCloudService
✓ from pyicloud import PyiCloudService
✗ import pyicloud
The module itself is a package; you need to import the class from the package.

Authenticate and list iCloud devices.

from pyicloud import PyiCloudService import os username = os.environ.get('ICLOUD_USERNAME', '') password = os.environ.get('ICLOUD_PASSWORD', '') api = PyiCloudService(username, password) if api.requires_2fa: code = input('Enter 2FA code: ') result = api.validate_2fa_code(code) print('2FA validated:', result) print('Devices:', api.devices)
Debug
Known issues
deprecatedThe `find_my_iphone` attribute is deprecated in favor of `devices`.
fix
Use `api.devices` instead of `api.find_my_iphone`.
affects: >=2.0.0
breakingPython 3.9 and earlier support removed in pyicloud 2.6.0.
fix
Upgrade to Python 3.10+.
affects: >=2.6.0
gotchaSession tokens expire after a short period, requiring re-authentication.
fix
Implement token refresh or re-prompt for credentials on failure.
affects: all
gotcha2FA may be required even if the account does not appear to have it enabled.
fix
Check `api.requires_2fa` and handle the 2FA flow.
affects: all
Errors
Common errors & fixes
AttributeError: 'PyiCloudService' object has no attribute 'find_my_iphone'
The attribute was renamed to 'devices' in newer versions.
fix
Use `api.devices` instead of `api.find_my_iphone`.
ModuleNotFoundError: No module named 'pyicloud'
The library is not installed or the import path is wrong.
fix
Run `pip install pyicloud` and use `from pyicloud import PyiCloudService`.
pyicloud.exceptions.PyiCloudFailedLoginException: Invalid username/password combination.
Incorrect Apple ID credentials or account requires 2FA.
fix
Verify credentials and check if 2FA is required with `api.requires_2fa`.
Upgrade
Version history
2.6.4latest on PyPI · released May 29, 2026
Audit
Dependencies
requestsrequiredHTTP requests for iCloud API
keyrings.altoptionalAlternative keyring backend for password storage
Agent activity
32 hits · last 30 days
node
30
OpenAI (training)
1
Resources

No resource links recorded.

pyicloud — pip install pyicloud · libregistry