Skip to main content

A great way to get IPTCInfo

Project description

Build Status

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.

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']

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

IPTCInfo3-2.1.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

IPTCInfo3-2.1-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file IPTCInfo3-2.1.tar.gz.

File metadata

  • Download URL: IPTCInfo3-2.1.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.16

File hashes

Hashes for IPTCInfo3-2.1.tar.gz
Algorithm Hash digest
SHA256 4bb9d6427d8775347d6b2361365f8c32c0eb2278434b426b46098167c5298d6f
MD5 0b47ddbe82c4705ca5357757f842042e
BLAKE2b-256 8522b51a002a238ccc5e77af8cddfbe544bf39b489dc51d88d4f8ff738be66ea

See more details on using hashes here.

File details

Details for the file IPTCInfo3-2.1-py3-none-any.whl.

File metadata

  • Download URL: IPTCInfo3-2.1-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/2.7.16

File hashes

Hashes for IPTCInfo3-2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 41f6a414568e490fb1005892011e2e19cfd427f662e9ba04760dc92a1b01d5ae
MD5 8ca9f7b02e8dd0da9843292bdbf86409
BLAKE2b-256 ff8d545aa6fbb9de89b6ff7da45a497a34d87fe56442fd086f533b545154b465

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page