Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 2.16.0 instead.
Reason given by maintainers: Hide the old version on pypi. If you insist, download it from https://github.com/LeoHsiao1/pyexiv2/releases

pyexiv2

Read and modify metadata of digital image, including EXIF, IPTC, XMP. It runs on C++ API of exiv2.

Features

  • Supports running on Linux 64bit, with GLIBC_2.27.
  • Supports running on Windows 64bit, with Python3(64bit).
  • Supports various formats
  • Supports Unicode characters that contained in image paths and data.
  • Not thread-safe, because some global variables have been used in api.cpp.

Usage

  • read metadata

    >>> from pyexiv2 import Image
    
    >>> i = Image("tests/1.jpg")
    >>> i.read_exif()
    {'Exif.Image.DateTime': '2019:06:23 19:45:17', 'Exif.Image.Artist': 'TEST', 'Exif.Image.Rating': '4', ...}
    >>> i.read_iptc()
    {'Iptc.Envelope.CharacterSet': '\x1b%G', 'Iptc.Application2.ObjectName': 'TEST', 'Iptc.Application2.Keywords': 'TEST', ...}
    >>> i.read_xmp()
    {'Xmp.dc.format': 'image/jpeg', 'Xmp.dc.rights': 'lang="x-default" TEST', 'Xmp.dc.subject': 'TEST', ...}
    
  • modify metadata

    >>> # prepare the XMP data you want to modify
    >>> _dict = {"Xmp.xmp.CreateDate": "2019-06-23T19:45:17.834",   # this will overwrite its original value, or add it if it doesn't exist
    ...          "Xmp.xmp.Rating": ""}  # set an empty str explicitly to delete the datum
    }
    
    >>> i.modify_xmp(_dict)
    >>> xmp_dict = i.read_xmp()         # read it again
    >>> xmp_dict["Xmp.xmp.CreateDate"]
    '2019-06-23T19:45:17.834'           # it has been set
    >>> xmp_dict["Xmp.xmp.Rating"]
    KeyError: 'Xmp.xmp.Rating'          # it has been deleted
    
    # use i.modify_exif() and i.modify_iptc() in the same way
    
  • Metadata reference tables: https://www.exiv2.org/metadata.html

  • You may be interested in these metadata on Windows:

    {'Xmp.dc.title': 'lang="x-default" I am title',
    'Xmp.dc.subject': 'label1; label2; label3',
    'Xmp.MicrosoftPhoto.Rating':'75'}
    

Tests

There are some test cases in folder "pyexiv2/tests". Run them by pytest:

pip install pytest psutil
pytest -v

Metadata

Release files for pyexiv2 1.2.1

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

Source distribution (sdist)

Source distribution for pyexiv2 1.2.1
File Size Uploaded
pyexiv2-1.2.1.tar.gz 2.1 MB Details

Built distribution (wheel)

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

Total release size: 4.2 MB

Release files / pyexiv2-1.2.1.tar.gz

Download URL pyexiv2-1.2.1.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
c068049a0cdccfa2e77acc41184c4d53c1675dfdfbd6bf13c419e72d9b0dc8b9
BLAKE2b-256 checksum
How to use checksums
c6fae3a5f74c2294cf90c808935886c659564d72dcf8c73b1294ead897d497be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release files / pyexiv2-1.2.1-py3-none-any.whl

Download URL pyexiv2-1.2.1-py3-none-any.whl
Size 2.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
de3270a61a8a5ddf46bfae6f379f7a6aba19a257625feaadd614729104b174a7
BLAKE2b-256 checksum
How to use checksums
60d38f6f6b4670ba79e37cd5afbee702f581a335bf383ac1d9a466c2f5a7479f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release history Release notifications | RSS feed

2.15.2

1 release file

2.15.1

1 release file

2.8.2

26 release files

2.8.1

21 release files

2.8.0

18 release files

2.7.1

18 release files

2.7.0

15 release files

2.6.3

15 release files

2.6.2

15 release files

2.6.1

15 release files

2.6.0

16 release files

2.5.0

16 release files

2.4.1

16 release files

2.4.0

1 release file

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.3.0

2 release files

1.2.3

2 release files

1.2.2

2 release files

This release

1.2.1 This release

2 release files

1.2.0

2 release files

1.1.0

2 release files

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