Import photos and videos from your iPhone to your computer via USB.
Project description
dcimport
dcimport copies photos and videos from an iPhone (or any iOS device) to a local folder, reading the camera roll (/DCIM) over USB via AFC. It bypasses iCloud and iTunes, installs nothing on the device, and only ever reads from it.
Runs are incremental: a local SQLite database records what was copied, so re-runs fetch only new or changed files. Downloads run in parallel and are committed by atomic rename, so an interrupted run resumes with a plain re-run. Original mtimes are preserved.
Beyond a plain copy: filename/folder layout templates, --since/--until date filtering, HEIC→JPEG conversion, skipping the video half of Live Photos, and a JSON manifest per run.
Install
Requires Python 3.11+.
uv tool install dcimport # or: pip install dcimport
uv tool install "dcimport[heic]" # to enable --convert-heic
Usage
dcimport ~/Pictures/iPhone
Connect the iPhone by USB, unlock it, and tap Trust. On Windows, iTunes or the Apple Devices app must be installed for the drivers.
dcimport ~/Pictures --layout "{mtime:%Y}/{mtime:%m}/{name}" # sort into year/month folders
dcimport ~/Pictures --since 2024-01-01 --convert-heic # recent photos, converted to JPEG
dcimport ~/Pictures --manifest run.json # also write a JSON report
Run dcimport --help for the full list of options.
Layout
--layout is a template of {name} (original filename) and {mtime:...} (capture time, strftime codes), and may contain / for subfolders. The default is {mtime:%Y-%m-%d_%H-%M-%S}_{name} → 2024-01-02_03-04-05_IMG_0001.JPG. The layout is stored with the library on first use and reused on later runs; changing it requires --force.
How it tracks files
Each copied file is recorded — by on-device path, size, and modification time — in media.db inside the output directory, and skipped on later runs. Editing a photo on the phone changes its mtime, so it re-imports as a new file; deleting media.db re-imports everything. Local files are never overwritten — name clashes get a _1, _2, … suffix.
Development
git clone https://github.com/artificiadrian/dcimport.git
cd dcimport && uv sync --all-extras && uv run pytest
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 dcimport-0.1.1.tar.gz.
File metadata
- Download URL: dcimport-0.1.1.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8525cfbf7d1e3802c1c4187d965f807ac0cb89a442c428ca10d259536002584e
|
|
| MD5 |
3cf75a6d6e11065ff221c2e77c544172
|
|
| BLAKE2b-256 |
f29b3ef0b453a766052d8367e65c4ccae5236956a38b78a483c5107c44f1c4c1
|
Provenance
The following attestation bundles were made for dcimport-0.1.1.tar.gz:
Publisher:
publish.yml on artificiadrian/dcimport
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dcimport-0.1.1.tar.gz -
Subject digest:
8525cfbf7d1e3802c1c4187d965f807ac0cb89a442c428ca10d259536002584e - Sigstore transparency entry: 2084519520
- Sigstore integration time:
-
Permalink:
artificiadrian/dcimport@55d9461d7410ad61df62a7b9b26ead72e808ecf9 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/artificiadrian
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@55d9461d7410ad61df62a7b9b26ead72e808ecf9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dcimport-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dcimport-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cad98df8348e68ad4e53145f290af139a7c6b061588458cc77b384385fb827c6
|
|
| MD5 |
fab3e6bd87207779894e15da2aead306
|
|
| BLAKE2b-256 |
659fbdaf2fa547cc120d6ced8012c9f0b08e64af2167ed39d4438f16e31bb76e
|
Provenance
The following attestation bundles were made for dcimport-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on artificiadrian/dcimport
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dcimport-0.1.1-py3-none-any.whl -
Subject digest:
cad98df8348e68ad4e53145f290af139a7c6b061588458cc77b384385fb827c6 - Sigstore transparency entry: 2084519548
- Sigstore integration time:
-
Permalink:
artificiadrian/dcimport@55d9461d7410ad61df62a7b9b26ead72e808ecf9 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/artificiadrian
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@55d9461d7410ad61df62a7b9b26ead72e808ecf9 -
Trigger Event:
push
-
Statement type: