Metadata-Version: 2.4
Name: IPTCInfo3
Version: 2.3.0
Summary: Extract and modify IPTC metadata from JPEG images
Project-URL: Homepage, https://github.com/jamesacampbell/iptcinfo3
Project-URL: Repository, https://github.com/jamesacampbell/iptcinfo3
Project-URL: Issues, https://github.com/jamesacampbell/iptcinfo3/issues
Author-email: Tamas Gulacsi <gthomas@fw.hu>
Maintainer-email: James Campbell <jc@normail.co>
License: Artistic-1.0 OR GPL-1.0-or-later
License-File: LICENSE
Keywords: exif,iptc,jpeg,metadata,photography
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Artistic License
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Provides-Extra: dev
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest-watch>=4.2; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/x-rst

``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.

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')``
