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.
- install:
pip install pyexiv2 - source code on github
Features
- Supports running on Linux 64bit, with GLIBC_2.27(required by libexiv2.so).
- Supports running on Windows 64bit, with Python3(64bit).
- Supports Unicode characters that can be used 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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyexiv2-1.2.0.tar.gz | 2.1 MB | Without provenance | Details for pyexiv2-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyexiv2-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for pyexiv2-1.2.0-py3-none-any.whl |
Total release size: 4.2 MB
Release files / pyexiv2-1.2.0.tar.gz
| Download URL | pyexiv2-1.2.0.tar.gz |
|---|---|
| Size | 2.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e99b6049449d72cece291ca250ad1bde7fc78754130643f635bbf9d1ac0bfd11
|
|
BLAKE2b-256 checksum How to use checksums |
79bd628abd4e2d3b0a755e7f8449425e7b433b8adb286cfc67d83d24991d50a5
|
| 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.0-py3-none-any.whl
| Download URL | pyexiv2-1.2.0-py3-none-any.whl |
|---|---|
| Size | 2.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6dfaf68481005fcc32ce7c4f5fea8954cc652c068a825cf8d00959272c7d228
|
|
BLAKE2b-256 checksum How to use checksums |
4826f836cc0f18815c8bacfb70d48d4a2a5bcdb731c492c4934293679cc727f4
|
| 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
|
Security for pyexiv2 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.