Skip to main content

IPTCINFO 3

Like IPTCInfo but finally compatible for Python 3

Ported from Josh Carter’s Perl IPTCInfo-1.9.pm by Tamas Gulacsi

Ever wish you add information to your photos like a caption, the place you took it, the date, and perhaps even keywords and categories? You already can. The International Press Telecommunications Council (IPTC) defines a format for exchanging meta-information in news content, and that includes photographs. You can embed all kinds of information in your images. The trick is putting it to use.

That’s where this IPTCInfo Python module comes into play. You can embed information using many programs, including Adobe Photoshop, and IPTCInfo will let your web server – and other automated server programs – pull it back out. You can use the information directly in Python programs, export it to XML, or even export SQL statements ready to be fed into a database.

Wikidata item https://www.wikidata.org/wiki/Q137179516

Installation

Install from PyPI:

pip install IPTCInfo3

Or with uv:

uv pip install IPTCInfo3

On Gentoo Linux: on gentoo-zh overlay.

Requirements

  • Python 3.10 or higher

  • No external dependencies required

Usage

from iptcinfo3 import IPTCInfo

Create new info object info = IPTCInfo('doge.jpg')

Print list of keywords, supplemental categories, contacts print(info['keywords']) print(info['supplementalCategories']) print(info['contacts'])

Get specific attributes… caption = info['caption/abstract']

Create object for file that may not have IPTC data info = IPTCInfo('such_iptc.jpg', force=True)

Add/change an attribute info['caption/abstract'] = 'Witty caption here' info['supplemental category'] = ['portrait']

Lists for keywords, so you can just append! info['keywords']).append('cool')

Save new info to file info.save() info.save_as('very_meta.jpg')

For real life usage example see https://gitlab.com/vitaly-zdanevich/upload_to_commons_with_categories_from_iptc/-/blob/master/upload_to_commons_with_categories_from_iptc.py

Metadata

Release files for IPTCInfo3 2.4.0

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

Source distribution (sdist)

Source distribution for IPTCInfo3 2.4.0
File Size Uploaded Provenance Actions
iptcinfo3-2.4.0.tar.gz 16.6 kB Without provenance Details for iptcinfo3-2.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 30.7 kB

Release files / iptcinfo3-2.4.0.tar.gz

Download URL iptcinfo3-2.4.0.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
ebe322981bfbacaecce2615e3859aab668fc538924e7a730da9f7635ae3a6241
BLAKE2b-256 checksum
How to use checksums
14a1e97774afceee4eb9d6f3749571594c9e25e6b4a15c3f3e1af9dbf2c5d288
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / iptcinfo3-2.4.0-py3-none-any.whl

Download URL iptcinfo3-2.4.0-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3fbe8283d7f1f8d7a193c49b575342c88d7f39237060425cb3c975e3c555ad07
BLAKE2b-256 checksum
How to use checksums
b8ed0351bb8b93b608adf2fe3920a7864b17c78bf95a210738c14ff6086f534c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for IPTCInfo3 2.4.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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