Skip to main content

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.

Installation

Install from PyPI:

pip install IPTCInfo3

Or with uv:

uv pip install IPTCInfo3

Requirements

  • Python 3.8 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')

Metadata

Release files for IPTCInfo3 2.3.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.3.0
File Size Uploaded
iptcinfo3-2.3.0.tar.gz 15.3 kB Details

Built distribution (wheel)

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

Total release size: 28.9 kB

Release files / iptcinfo3-2.3.0.tar.gz

Download URL iptcinfo3-2.3.0.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
aee2ee68b6b77aa6e317eed956ff36affc7dfba033c95458026815fa41b4a5e6
BLAKE2b-256 checksum
How to use checksums
b5f62a24128400e61b90fb18d969a9c77db5ce1ea61e8e72fb7f5e9f10258310
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.5

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

Download URL iptcinfo3-2.3.0-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f71c9619dfd8c697e3aa9ab8dc5cf0c12643e211326fa9c02fe218feef84bef5
BLAKE2b-256 checksum
How to use checksums
bd4d19e46e8379a6548736095573af66b3437c9585cf5079be8bb75adcd5a254
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.5

Release history Release notifications | RSS feed

This release

2.3.0 This release

2 release files

2.2.0

2 release files

2.1.4

2 release files

2.1

2 release files

2.0.3

2 release files

2.0.2

1 release file

2.0.1

2 release files

2.0.0

1 release file

1.9.5-8

1 release file

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