Skip to main content

PyiCloud

Build Status GitHub stars GitHub issues GitHub license Documentation Status

Library version Supported versions Downloads

Lines of Code Code style: Ruff Duplicated Lines (%) Coverage

Vulnerabilities Security Rating Maintainability Rating Reliability Rating Quality Gate Status Code Smells Bugs Technical Debt

PyiCloud is a module which allows pythonistas to interact with iCloud webservices. It's powered by the fantastic requests HTTP library.

At its core, PyiCloud connects to the iCloud web application using your username and password, then performs regular queries against its API.

Please see the terms of use for your responsibilities when using this library.

For support and discussions, join our Discord community: Join our Discord community

Installation

Install the library and CLI with:

$ pip install "pyicloud[cli]"

For the optional local MCP extension, install pyicloud[mcp]; use pyicloud[all] for both CLI and MCP support (excluding development tools). The MCP foundation currently exposes offline local status and capabilities only. See the MCP guide.

This installs the icloud command line interface alongside the Python package. To install the library on its own run pip without the cli extra.

$ pip install pyicloud

Authentication

Authentication without using a saved password is as simple as passing your username and password to the PyiCloudService class:

from pyicloud import PyiCloudService

api = PyiCloudService("jappleseed@apple.com", "password")

In the event that the username/password combination is invalid, a PyiCloudFailedLoginException exception is thrown.

For China mainland accounts, long-running daemon settings, family polling, pause_2fa, and the full two-step / two-factor (2SA/2FA) flow, see the Authentication guide. The icloud CLI can also store your password in the system keyring; see the Command-Line Interface guide.

Documentation

Full documentation lives under docs/. It is also published, with a generated API reference, at pyicloud.readthedocs.io.

Guides

Services

  • Account — account info, storage, and summary plan
  • Devices & Find My — list devices and locate, ring, lock, or erase them
  • Calendar — calendars, events, alarms, and invitees
  • Contacts — the address book and MeCard
  • File Storage (Drive) — iCloud Drive and the legacy Ubiquity API
  • Photos — browse, sync, upload, and modify the photo library
  • Hide My Email — generate and manage email aliases
  • Mail — experimental folder and message reads, verified sender identities, bounded single-/multi-folder searches, previews, Unread/Flagged thread filters, cursor enumeration of filtered thread identities (icloud mail filter-threads), private JSON and original MIME/EML export (icloud mail export-eml), restricted size-bounded Mail Drop downloads (icloud mail download-maildrop), exact message lookup (icloud mail get by ID or UID), opt-in mailbox/thread/flag-filter UID enumeration, folder-scoped thread expansion, bodies, attachment streams, and one-shot POSIX metadata inventory synchronization (icloud mail sync), also available through icloud mail; plus separate explicit single-message read/unread and flag/unflag writes and ordinary mailbox moves through set_read(), set_flagged(), move(), and icloud mail mark / icloud mail move, plus guarded draft saves/discard with recipients and ordinary attachment uploads and folder creation, renaming, and confirmed irreversible deletion through the library and CLI, plus explicit reply/forward drafts and confirmed sending and confirmed single-message permanent deletion from Trash
  • Reminders — lists, reminders, alarms, tags, and attachments
  • Notes — private note and folder management, rendering, and HTML export
  • Invites — read events and respond to invitations

Examples

If you want to see some code samples, see the examples.

Contributing

Contributions are welcome! Please read the Contributing guide, the Code of Conduct, and the Terms of Use before getting started.

To report a security vulnerability, use private vulnerability reporting rather than opening a public issue (see SECURITY.md).

Metadata

Release files for pyicloud 2026.11.1

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

Source distribution (sdist)

Source distribution for pyicloud 2026.11.1
File Size Uploaded Provenance Actions
pyicloud-2026.11.1.tar.gz 1.4 MB With provenance Details for pyicloud-2026.11.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyicloud 2026.11.1
File Interpreter ABI Platform Actions
pyicloud-2026.11.1-py3-none-any.whl Python 3 none any Details for pyicloud-2026.11.1-py3-none-any.whl

Total release size: 2.0 MB

Release files / pyicloud-2026.11.1.tar.gz

Download URL pyicloud-2026.11.1.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
e9f8756f2bdfb08db766474d7d8d025ca8146d3bd8efec2b7c24f1c627d50785
BLAKE2b-256 checksum
How to use checksums
6f7744722418a550b88690756916f3fd6b6724ab06ea6582d51952cac4b75299
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / pyicloud-2026.11.1-py3-none-any.whl

Download URL pyicloud-2026.11.1-py3-none-any.whl
Size 586.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9a844ca37066aeaf917c39e7022269b991bb6bdfda1484d931fbb9a780c83f0
BLAKE2b-256 checksum
How to use checksums
c0c3c38b7a5e364f0fc3586a7718a664fc8d8f75a5e60dfefe55fbac6b8a366f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Security for pyicloud 2026.11.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyicloud-2026.11.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2026.11.1 This release

2 release files Full provenance

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