Like IPTCInfo but finally compatible for Python 3
Ported from Josh Carter’s Perl IPTCInfo-1.9.pm by Tamas Gulacsi. This fork is maintained by Sanyam Khurana.
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.
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 IPTCInfo3Plus 2.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| iptcinfo3plus-2.1.5.tar.gz | 13.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| IPTCInfo3Plus-2.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.5 kB
Release files / iptcinfo3plus-2.1.5.tar.gz
| Download URL | iptcinfo3plus-2.1.5.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fdac5d61aec6258530748f466b9468ceb24342113647e7000314634ec582d10d
|
|
BLAKE2b-256 checksum How to use checksums |
6234e1f7e0e06ffe51df88b2af42f205c4072a6ed71a4ad033cc6f033b4ecb38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.0
|
Release files / IPTCInfo3Plus-2.1.5-py3-none-any.whl
| Download URL | IPTCInfo3Plus-2.1.5-py3-none-any.whl |
|---|---|
| Size | 12.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72a40b49af6631fe275e1b1651a76f63a5c74eebfb4b99cecd208c4e18464c8d
|
|
BLAKE2b-256 checksum How to use checksums |
a9194bf53d8f64680152689988ab5599d84f404ea9796b996cd35581ab080a8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.0
|