{"id":45882,"library":"pyicloud","title":"PyiCloud","description":"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.","status":"active","version":"2.6.4","language":"python","source_language":"en","source_url":"https://github.com/picklepete/pyicloud","tags":["icloud","apple","cloud","api","wrapper"],"install":[{"cmd":"pip install pyicloud","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP requests for iCloud API","package":"requests","optional":false},{"reason":"Alternative keyring backend for password storage","package":"keyrings.alt","optional":true}],"imports":[{"note":"The module itself is a package; you need to import the class from the package.","wrong":"import pyicloud","symbol":"PyiCloudService","correct":"from pyicloud import PyiCloudService"}],"quickstart":{"code":"from pyicloud import PyiCloudService\nimport os\n\nusername = os.environ.get('ICLOUD_USERNAME', '')\npassword = os.environ.get('ICLOUD_PASSWORD', '')\n\napi = PyiCloudService(username, password)\n\nif api.requires_2fa:\n    code = input('Enter 2FA code: ')\n    result = api.validate_2fa_code(code)\n    print('2FA validated:', result)\n\nprint('Devices:', api.devices)\n","lang":"python","description":"Authenticate and list iCloud devices."},"warnings":[{"fix":"Use `api.devices` instead of `api.find_my_iphone`.","message":"The `find_my_iphone` attribute is deprecated in favor of `devices`.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Upgrade to Python 3.10+.","message":"Python 3.9 and earlier support removed in pyicloud 2.6.0.","severity":"breaking","affected_versions":">=2.6.0"},{"fix":"Implement token refresh or re-prompt for credentials on failure.","message":"Session tokens expire after a short period, requiring re-authentication.","severity":"gotcha","affected_versions":"all"},{"fix":"Check `api.requires_2fa` and handle the 2FA flow.","message":"2FA may be required even if the account does not appear to have it enabled.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'2.6.4':29 'access':14 'api':40 'appl':38 'cadenc':36 'calendar':20 'cloud':39 'contact':19 'current':26 'drive':17 'enabl':8 'find':23 'icloud':11,16,37 'interact':9 'iphon':25 'modul':6 'photo':18 'provid':13 'pyicloud':1,2 'python':5 'regular':34 'releas':35 'remind':21 'semi':33 'semi-regular':32 'version':27 'webservic':12 'wrapper':41","created_at":"2026-06-07T12:57:11.930457+00:00","updated_at":"2026-06-07T12:57:11.930457+00:00","problems":[{"fix":"Use `api.devices` instead of `api.find_my_iphone`.","cause":"The attribute was renamed to 'devices' in newer versions.","error":"AttributeError: 'PyiCloudService' object has no attribute 'find_my_iphone'"},{"fix":"Run `pip install pyicloud` and use `from pyicloud import PyiCloudService`.","cause":"The library is not installed or the import path is wrong.","error":"ModuleNotFoundError: No module named 'pyicloud'"},{"fix":"Verify credentials and check if 2FA is required with `api.requires_2fa`.","cause":"Incorrect Apple ID credentials or account requires 2FA.","error":"pyicloud.exceptions.PyiCloudFailedLoginException: Invalid username/password combination."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["storage"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-29","last_verified":"2026-06-29","next_check":"2026-07-29","install_tag":null}}