Add your description here
Project description
iCloud Resolver
A fast and lightweight Python library and CLI tool to securely resolve and download files from iCloud Drive public links.
How it works
When you share a public iCloud Drive link (e.g., https://www.icloud.com/iclouddrive/...), it is not a direct file download link. Instead, it leads to Apple's web application.
This tool bypasses the browser by interacting directly with Apple's public CloudKit API. It parses the unique identifier from the link, queries the iCloud database, and safely retrieves the original filename along with the highly-secure, direct downloadURL. Finally, it streams the file directly to your disk with a progress bar.
(Note: iCloud Drive folders are currently not supported because downloading them requires user authentication and dynamic zip archiving).
Command Line Interface (CLI)
You can run this tool instantly from your terminal using zero-install execution tools like uvx or pipx:
# Using uvx
uvx icloud-resolver "https://www.icloud.com/iclouddrive/0afGK6zDBog_0drwp6YZoDLIg#Patches"
# Using pipx
pipx run icloud-resolver "https://www.icloud.com/iclouddrive/0afGK6zDBog_0drwp6YZoDLIg#Patches"
If you install the package globally (e.g. uv tool install .), it exposes two aliases that you can use interchangeably: icloud-resolver and the shorter icr.
CLI Options
-
Download to the current directory:
icr "https://www.icloud.com/iclouddrive/..."
-
Specify an output directory or custom file name:
icr -o ./my_downloads "https://www.icloud.com/iclouddrive/..." icr -o custom_file.zip "https://www.icloud.com/iclouddrive/..."
-
Only resolve the URL (print the direct download link without downloading):
icr -r "https://www.icloud.com/iclouddrive/..."
Programmatic Usage
You can also import icloud-resolver directly into your own Python scripts. The library features robust custom exceptions for smooth programmatic error handling.
example.py
from icloud_resolver import resolve_icloud_link, download_file
from icloud_resolver.exceptions import (
ICloudResolverError,
FolderNotSupportedError
)
url = "https://www.icloud.com/iclouddrive/0afGK6zDBog_0drwp6YZoDLIg#Patches"
# Example 1: Resolving the link without downloading
try:
direct_url, filename = resolve_icloud_link(url)
print(f"Original Name: {filename}")
print(f"Direct Link: {direct_url}")
except FolderNotSupportedError:
print("Oops! This link points to a folder, which is unsupported.")
except ICloudResolverError as e:
print(f"Something went wrong: {e}")
# Example 2: Downloading the file directly
try:
# Set target_path to a directory to auto-use the original filename,
# or set it to a full path to use a custom filename.
saved_path = download_file(url, target_path=".")
print(f"File successfully downloaded to: {saved_path}")
except ICloudResolverError as e:
print(f"Download failed: {e}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file icloud_resolver-0.1.0.tar.gz.
File metadata
- Download URL: icloud_resolver-0.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91a52eefd0331c0123d2909e1799014334fb8e7585a42d1d986fa3ef6da8aafa
|
|
| MD5 |
3247794ec2597a9a6835f4aacae10f74
|
|
| BLAKE2b-256 |
bc37dea8ac20501eb4d16926c4df656a5d77d4e1cda82fd3859414dfea5dac93
|
Provenance
The following attestation bundles were made for icloud_resolver-0.1.0.tar.gz:
Publisher:
publish.yml on xxanqw/icloud-resolver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
icloud_resolver-0.1.0.tar.gz -
Subject digest:
91a52eefd0331c0123d2909e1799014334fb8e7585a42d1d986fa3ef6da8aafa - Sigstore transparency entry: 1655035215
- Sigstore integration time:
-
Permalink:
xxanqw/icloud-resolver@076a4927fb3387a285b40a713963b84dd8458e23 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/xxanqw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@076a4927fb3387a285b40a713963b84dd8458e23 -
Trigger Event:
push
-
Statement type:
File details
Details for the file icloud_resolver-0.1.0-py3-none-any.whl.
File metadata
- Download URL: icloud_resolver-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8e12065aefee98d1a9b0e2d0e2ffe1b5b4313bfdf3bb98770ea7b8614164abf
|
|
| MD5 |
604e6b7c5f2f31d85462b7a64433d3e7
|
|
| BLAKE2b-256 |
d5b309c3d45ed5c98995c3fc30a5d071d030d6d427c7babe2214646697480455
|
Provenance
The following attestation bundles were made for icloud_resolver-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on xxanqw/icloud-resolver
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
icloud_resolver-0.1.0-py3-none-any.whl -
Subject digest:
e8e12065aefee98d1a9b0e2d0e2ffe1b5b4313bfdf3bb98770ea7b8614164abf - Sigstore transparency entry: 1655035399
- Sigstore integration time:
-
Permalink:
xxanqw/icloud-resolver@076a4927fb3387a285b40a713963b84dd8458e23 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/xxanqw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@076a4927fb3387a285b40a713963b84dd8458e23 -
Trigger Event:
push
-
Statement type: