**********
PyExifTool
**********
.. image:: https://img.shields.io/badge/Docs-latest-blueviolet
:alt: GitHub Pages
:target: http://sylikc.github.io/pyexiftool/
.. image:: https://img.shields.io/pypi/pyversions/pyexiftool.svg
:target: https://pypi.org/project/PyExifTool/
:alt: Supported Python Versions
.. image:: https://pepy.tech/badge/pyexiftool
:target: https://pepy.tech/project/pyexiftool
:alt: Total PyPI Downloads
.. image:: https://static.pepy.tech/personalized-badge/pyexiftool?period=month&units=international_system&left_color=black&right_color=orange&left_text=Downloads%2030d
:target: https://pepy.tech/project/pyexiftool
:alt: PyPI Downloads this month
.. DESCRIPTION_START
.. BLURB_START
PyExifTool is a Python library to communicate with an instance of
`Phil Harvey's ExifTool`_ command-line application.
.. _Phil Harvey's ExifTool: https://exiftool.org/
.. BLURB_END
The library provides the class ``exiftool.ExifTool`` that runs the command-line
tool in batch mode and features methods to send commands to that
program, including methods to extract meta-information from one or
more image files. Since ``exiftool`` is run in batch mode, only a
single instance needs to be launched and can be reused for many
queries. This is much more efficient than launching a separate
process for every single query.
.. DESCRIPTION_END
.. contents::
:depth: 2
:backlinks: none
Example Usage
=============
Simple example: ::
import exiftool
files = ["a.jpg", "b.png", "c.tif"]
with exiftool.ExifToolHelper() as et:
metadata = et.get_metadata(files)
for d in metadata:
print("{:20.20} {:20.20}".format(d["SourceFile"],
d["EXIF:DateTimeOriginal"]))
Refer to documentation for more `Examples and Quick Start Guide`_
.. _`Examples and Quick Start Guide`: http://sylikc.github.io/pyexiftool/examples.html
.. INSTALLATION_START
Getting PyExifTool
==================
PyPI
------------
Easiest: Install a version from the official `PyExifTool PyPI`_
::
python -m pip install -U pyexiftool
.. _PyExifTool PyPI: https://pypi.org/project/PyExifTool/
From Source
------------
#. Check out the source code from the github repository
* ``git clone git://github.com/sylikc/pyexiftool.git``
* Alternatively, you can download a tarball_.
#. Run setup.py to install the module from source
* ``python setup.py install [--user|--prefix=<installation-prefix>]``
.. _tarball: https://github.com/sylikc/pyexiftool/tarball/master
PyExifTool Dependencies
=======================
Python
------
PyExifTool runs on **Python 3.6+**. (If you need Python 2.6 support,
please use version v0.4.x). PyExifTool has been tested on Windows and
Linux, and probably also runs on other Unix-like platforms.
Phil Harvey's exiftool
----------------------
For PyExifTool to function, ``exiftool`` command-line tool must exist on
the system. If ``exiftool`` is not on the ``PATH``, you can specify the full
pathname to it by using ``ExifTool(executable=<full path>)``.
PyExifTool requires a **minimum version of 12.15** (which was the first
production version of exiftool featuring the options to allow exit status
checks used in conjuction with ``-echo3`` and ``-echo4`` parameters).
To check your ``exiftool`` version:
::
exiftool -ver
Windows/Mac
^^^^^^^^^^^
Windows/Mac users can download the latest version of exiftool:
::
https://exiftool.org
Linux
^^^^^
Most current Linux distributions have a package which will install ``exiftool``.
Unfortunately, some do not have the minimum required version, in which case you
will have to `build from source`_.
* Ubuntu
::
sudo apt install libimage-exiftool-perl
* CentOS/RHEL
::
yum install perl-Image-ExifTool
.. _build from source: https://exiftool.org/install.html#Unix
.. INSTALLATION_END
Documentation
=============
The current documentation is available at `sylikc.github.io`_.
::
http://sylikc.github.io/pyexiftool/
.. _sylikc.github.io: http://sylikc.github.io/pyexiftool/
Package Structure
-----------------
.. DESIGN_INFO_START
PyExifTool was designed with flexibility and extensibility in mind. The library consists of a few classes, each with increasingly more features.
The base ``ExifTool`` class contains the core functionality exposed in the most rudimentary way, and each successive class inherits and adds functionality.
.. DESIGN_INFO_END
.. DESIGN_CLASS_START
* ``exiftool.ExifTool`` is the base class with core logic to interface with PH's ExifTool process.
It contains only the core features with no extra fluff.
The main methods provided are ``execute()`` and ``execute_json()`` which allows direct interaction with the underlying exiftool process.
* The API is considered stable and should not change much with future releases.
* ``exiftool.ExifToolHelper`` exposes some of the most commonly used functionality. It overloads
some inherited functions to turn common errors into warnings and adds logic to make
``exiftool.ExifTool`` easier to use.
For example, ``ExifToolHelper`` provides wrapper functions to get metadata, and auto-starts the exiftool instance if it's not running (instead of raising an Exception).
``ExifToolHelper`` demonstrates how to extend ``ExifTool`` to your liking if your project demands customizations not directly provided by ``ExifTool``.
* More methods may be added and/or slight API tweaks may occur with future releases.
* ``exiftool.ExifToolAlpha`` further extends the ``ExifToolHelper`` and includes some community-contributed not-very-well-tested methods.
These methods were formerly added ad-hoc by various community contributors, but no longer stand up to the rigor of the current design.
``ExifToolAlpha`` is *not* up to the rigorous testing standard of both
``ExifTool`` or ``ExifToolHelper``. There may be old, buggy, or defunct code.
* This is the least polished of the classes and functionality/API may be changed/added/removed on any release.
* **NOTE: The methods exposed may be changed/removed at any time.**
* If you are using any of these methods in your project, please `Submit an Issue`_ to start a discussion on making those functions more robust, and making their way into ``ExifToolHelper``.
(Think of ``ExifToolAlpha`` as ideas on how to extend ``ExifTool``, where new functionality which may one day make it into the ``ExifToolHelper`` class.)
.. _Submit an Issue: https://github.com/sylikc/pyexiftool/issues
.. DESIGN_CLASS_END
Brief History
=============
.. HISTORY_START
PyExifTool was originally developed by `Sven Marnach`_ in 2012 to answer a
stackoverflow question `Call exiftool from a python script?`_. Over time,
Sven refined the code, added tests, documentation, and a slew of improvements.
While PyExifTool gained popularity, Sven `never intended to maintain it`_ as
an active project. The `original repository`_ was last updated in 2014.
Over the years, numerous issues were filed and several PRs were opened on the
stagnant repository. In early 2019, `Martin Čarnogurský`_ created a
`PyPI release`_ from the 2014 code with some minor updates. Coincidentally in
mid 2019, `Kevin M (sylikc)`_ forked the original repository and started merging
the PR and issues which were reported on Sven's issues/PR page.
In late 2019 and early 2020 there was a discussion started to
`Provide visibility for an active fork`_. There was a conversation to
transfer ownership of the original repository, have a coordinated plan to
communicate to PyExifTool users, amongst other things, but it never materialized.
Kevin M (sylikc) made the first release to the PyPI repository in early 2021.
At the same time, discussions were started, revolving around
`Deprecating Python 2.x compatibility`_ and `refactoring the code and classes`_.
The latest version is the result of all of those discussions, designs,
and development. Special thanks to the community contributions, especially
`Jan Philip Göpfert`_, `Seth P`_, and `Kolen Cheung`_.
.. _Sven Marnach: https://github.com/smarnach/pyexiftool
.. _Call exiftool from a python script?: https://stackoverflow.com/questions/10075115/call-exiftool-from-a-python-script/10075210#10075210
.. _never intended to maintain it: https://github.com/smarnach/pyexiftool/pull/31#issuecomment-569238073
.. _original repository: https://github.com/smarnach/pyexiftool
.. _Martin Čarnogurský: https://github.com/RootLUG
.. _PyPI release: https://pypi.org/project/PyExifTool/0.1.1/#history
.. _Kevin M (sylikc): https://github.com/sylikc
.. _Provide visibility for an active fork: https://github.com/smarnach/pyexiftool/pull/31
.. _Deprecating Python 2.x compatibility: https://github.com/sylikc/pyexiftool/discussions/9
.. _refactoring the code and classes: https://github.com/sylikc/pyexiftool/discussions/10
.. _Jan Philip Göpfert: https://github.com/jangop
.. _Seth P: https://github.com/csparker247
.. _Kolen Cheung: https://github.com/ickc
.. HISTORY_END
Licence
=======
.. LICENSE_START
PyExifTool is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the licence, or
(at your option) any later version, or the BSD licence.
PyExifTool is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See ``LICENSE`` for more details.
.. LICENSE_END
Raw data
{
"_id": null,
"home_page": "http://github.com/sylikc/pyexiftool",
"name": "PyExifTool",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "exiftool image exif metadata photo video photography",
"author": "Kevin M (sylikc), Sven Marnach, various contributors",
"author_email": "sylikc@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/5e/48/406da6691d15abf3c8d399bce8bc588709a5b54e857fd7c22dad2f90c33c/PyExifTool-0.5.6.tar.gz",
"platform": null,
"description": "**********\r\nPyExifTool\r\n**********\r\n\r\n.. image:: https://img.shields.io/badge/Docs-latest-blueviolet\r\n\t:alt: GitHub Pages\r\n\t:target: http://sylikc.github.io/pyexiftool/\r\n\r\n\r\n\r\n\r\n.. image:: https://img.shields.io/pypi/pyversions/pyexiftool.svg\r\n\t:target: https://pypi.org/project/PyExifTool/\r\n\t:alt: Supported Python Versions\r\n\r\n.. image:: https://pepy.tech/badge/pyexiftool\r\n\t:target: https://pepy.tech/project/pyexiftool\r\n\t:alt: Total PyPI Downloads\r\n\r\n.. image:: https://static.pepy.tech/personalized-badge/pyexiftool?period=month&units=international_system&left_color=black&right_color=orange&left_text=Downloads%2030d\r\n\t:target: https://pepy.tech/project/pyexiftool\r\n\t:alt: PyPI Downloads this month\r\n\r\n\r\n\r\n.. DESCRIPTION_START\r\n\r\n.. BLURB_START\r\n\r\nPyExifTool is a Python library to communicate with an instance of\r\n`Phil Harvey's ExifTool`_ command-line application.\r\n\r\n.. _Phil Harvey's ExifTool: https://exiftool.org/\r\n\r\n\r\n.. BLURB_END\r\n\r\nThe library provides the class ``exiftool.ExifTool`` that runs the command-line\r\ntool in batch mode and features methods to send commands to that\r\nprogram, including methods to extract meta-information from one or\r\nmore image files. Since ``exiftool`` is run in batch mode, only a\r\nsingle instance needs to be launched and can be reused for many\r\nqueries. This is much more efficient than launching a separate\r\nprocess for every single query.\r\n\r\n\r\n.. DESCRIPTION_END\r\n\r\n.. contents::\r\n\t:depth: 2\r\n\t:backlinks: none\r\n\r\nExample Usage\r\n=============\r\n\r\nSimple example: ::\r\n\r\n\timport exiftool\r\n\r\n\tfiles = [\"a.jpg\", \"b.png\", \"c.tif\"]\r\n\twith exiftool.ExifToolHelper() as et:\r\n\t metadata = et.get_metadata(files)\r\n\t for d in metadata:\r\n\t print(\"{:20.20} {:20.20}\".format(d[\"SourceFile\"],\r\n\t d[\"EXIF:DateTimeOriginal\"]))\r\n\r\nRefer to documentation for more `Examples and Quick Start Guide`_\r\n\r\n.. _`Examples and Quick Start Guide`: http://sylikc.github.io/pyexiftool/examples.html\r\n\r\n\r\n.. INSTALLATION_START\r\n\r\nGetting PyExifTool\r\n==================\r\n\r\nPyPI\r\n------------\r\n\r\nEasiest: Install a version from the official `PyExifTool PyPI`_\r\n\r\n::\r\n\r\n python -m pip install -U pyexiftool\r\n\r\n.. _PyExifTool PyPI: https://pypi.org/project/PyExifTool/\r\n\r\n\r\nFrom Source\r\n------------\r\n\r\n#. Check out the source code from the github repository\r\n\r\n\t* ``git clone git://github.com/sylikc/pyexiftool.git``\r\n\t* Alternatively, you can download a tarball_.\r\n\r\n#. Run setup.py to install the module from source\r\n\r\n\t* ``python setup.py install [--user|--prefix=<installation-prefix>]``\r\n\r\n\r\n.. _tarball: https://github.com/sylikc/pyexiftool/tarball/master\r\n\r\n\r\nPyExifTool Dependencies\r\n=======================\r\n\r\nPython\r\n------\r\n\r\nPyExifTool runs on **Python 3.6+**. (If you need Python 2.6 support,\r\nplease use version v0.4.x). PyExifTool has been tested on Windows and\r\nLinux, and probably also runs on other Unix-like platforms.\r\n\r\nPhil Harvey's exiftool\r\n----------------------\r\n\r\nFor PyExifTool to function, ``exiftool`` command-line tool must exist on\r\nthe system. If ``exiftool`` is not on the ``PATH``, you can specify the full\r\npathname to it by using ``ExifTool(executable=<full path>)``.\r\n\r\nPyExifTool requires a **minimum version of 12.15** (which was the first\r\nproduction version of exiftool featuring the options to allow exit status\r\nchecks used in conjuction with ``-echo3`` and ``-echo4`` parameters).\r\n\r\nTo check your ``exiftool`` version:\r\n\r\n::\r\n\r\n exiftool -ver\r\n\r\n\r\nWindows/Mac\r\n^^^^^^^^^^^\r\n\r\nWindows/Mac users can download the latest version of exiftool:\r\n\r\n::\r\n\r\n https://exiftool.org\r\n\r\nLinux\r\n^^^^^\r\n\r\nMost current Linux distributions have a package which will install ``exiftool``.\r\nUnfortunately, some do not have the minimum required version, in which case you\r\nwill have to `build from source`_.\r\n\r\n* Ubuntu\r\n ::\r\n\r\n sudo apt install libimage-exiftool-perl\r\n\r\n* CentOS/RHEL\r\n ::\r\n\r\n yum install perl-Image-ExifTool\r\n\r\n.. _build from source: https://exiftool.org/install.html#Unix\r\n\r\n\r\n.. INSTALLATION_END\r\n\r\n\r\nDocumentation\r\n=============\r\n\r\nThe current documentation is available at `sylikc.github.io`_.\r\n\r\n::\r\n\r\n http://sylikc.github.io/pyexiftool/\r\n\r\n.. _sylikc.github.io: http://sylikc.github.io/pyexiftool/\r\n\r\n\r\nPackage Structure\r\n-----------------\r\n\r\n.. DESIGN_INFO_START\r\n\r\nPyExifTool was designed with flexibility and extensibility in mind. The library consists of a few classes, each with increasingly more features.\r\n\r\nThe base ``ExifTool`` class contains the core functionality exposed in the most rudimentary way, and each successive class inherits and adds functionality.\r\n\r\n.. DESIGN_INFO_END\r\n\r\n.. DESIGN_CLASS_START\r\n\r\n* ``exiftool.ExifTool`` is the base class with core logic to interface with PH's ExifTool process.\r\n It contains only the core features with no extra fluff.\r\n The main methods provided are ``execute()`` and ``execute_json()`` which allows direct interaction with the underlying exiftool process.\r\n\r\n * The API is considered stable and should not change much with future releases.\r\n\r\n* ``exiftool.ExifToolHelper`` exposes some of the most commonly used functionality. It overloads\r\n some inherited functions to turn common errors into warnings and adds logic to make\r\n ``exiftool.ExifTool`` easier to use.\r\n For example, ``ExifToolHelper`` provides wrapper functions to get metadata, and auto-starts the exiftool instance if it's not running (instead of raising an Exception).\r\n ``ExifToolHelper`` demonstrates how to extend ``ExifTool`` to your liking if your project demands customizations not directly provided by ``ExifTool``.\r\n\r\n * More methods may be added and/or slight API tweaks may occur with future releases.\r\n\r\n* ``exiftool.ExifToolAlpha`` further extends the ``ExifToolHelper`` and includes some community-contributed not-very-well-tested methods.\r\n These methods were formerly added ad-hoc by various community contributors, but no longer stand up to the rigor of the current design.\r\n ``ExifToolAlpha`` is *not* up to the rigorous testing standard of both\r\n ``ExifTool`` or ``ExifToolHelper``. There may be old, buggy, or defunct code.\r\n\r\n * This is the least polished of the classes and functionality/API may be changed/added/removed on any release.\r\n\r\n * **NOTE: The methods exposed may be changed/removed at any time.**\r\n\r\n * If you are using any of these methods in your project, please `Submit an Issue`_ to start a discussion on making those functions more robust, and making their way into ``ExifToolHelper``.\r\n (Think of ``ExifToolAlpha`` as ideas on how to extend ``ExifTool``, where new functionality which may one day make it into the ``ExifToolHelper`` class.)\r\n\r\n.. _Submit an Issue: https://github.com/sylikc/pyexiftool/issues\r\n\r\n\r\n.. DESIGN_CLASS_END\r\n\r\n\r\nBrief History\r\n=============\r\n\r\n.. HISTORY_START\r\n\r\nPyExifTool was originally developed by `Sven Marnach`_ in 2012 to answer a\r\nstackoverflow question `Call exiftool from a python script?`_. Over time,\r\nSven refined the code, added tests, documentation, and a slew of improvements.\r\nWhile PyExifTool gained popularity, Sven `never intended to maintain it`_ as\r\nan active project. The `original repository`_ was last updated in 2014.\r\n\r\nOver the years, numerous issues were filed and several PRs were opened on the\r\nstagnant repository. In early 2019, `Martin \u010carnogursk\u00fd`_ created a\r\n`PyPI release`_ from the 2014 code with some minor updates. Coincidentally in\r\nmid 2019, `Kevin M (sylikc)`_ forked the original repository and started merging\r\nthe PR and issues which were reported on Sven's issues/PR page.\r\n\r\nIn late 2019 and early 2020 there was a discussion started to\r\n`Provide visibility for an active fork`_. There was a conversation to\r\ntransfer ownership of the original repository, have a coordinated plan to\r\ncommunicate to PyExifTool users, amongst other things, but it never materialized.\r\n\r\nKevin M (sylikc) made the first release to the PyPI repository in early 2021.\r\nAt the same time, discussions were started, revolving around\r\n`Deprecating Python 2.x compatibility`_ and `refactoring the code and classes`_.\r\n\r\nThe latest version is the result of all of those discussions, designs,\r\nand development. Special thanks to the community contributions, especially\r\n`Jan Philip G\u00f6pfert`_, `Seth P`_, and `Kolen Cheung`_.\r\n\r\n.. _Sven Marnach: https://github.com/smarnach/pyexiftool\r\n.. _Call exiftool from a python script?: https://stackoverflow.com/questions/10075115/call-exiftool-from-a-python-script/10075210#10075210\r\n.. _never intended to maintain it: https://github.com/smarnach/pyexiftool/pull/31#issuecomment-569238073\r\n.. _original repository: https://github.com/smarnach/pyexiftool\r\n.. _Martin \u010carnogursk\u00fd: https://github.com/RootLUG\r\n.. _PyPI release: https://pypi.org/project/PyExifTool/0.1.1/#history\r\n.. _Kevin M (sylikc): https://github.com/sylikc\r\n.. _Provide visibility for an active fork: https://github.com/smarnach/pyexiftool/pull/31\r\n.. _Deprecating Python 2.x compatibility: https://github.com/sylikc/pyexiftool/discussions/9\r\n.. _refactoring the code and classes: https://github.com/sylikc/pyexiftool/discussions/10\r\n.. _Jan Philip G\u00f6pfert: https://github.com/jangop\r\n.. _Seth P: https://github.com/csparker247\r\n.. _Kolen Cheung: https://github.com/ickc\r\n\r\n\r\n.. HISTORY_END\r\n\r\nLicence\r\n=======\r\n\r\n.. LICENSE_START\r\n\r\nPyExifTool is free software: you can redistribute it and/or modify\r\nit under the terms of the GNU General Public License as published by\r\nthe Free Software Foundation, either version 3 of the licence, or\r\n(at your option) any later version, or the BSD licence.\r\n\r\nPyExifTool is distributed in the hope that it will be useful,\r\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\nSee ``LICENSE`` for more details.\r\n\r\n\r\n.. LICENSE_END\r\n",
"bugtrack_url": null,
"license": "GPLv3+/BSD",
"summary": "Python wrapper for exiftool",
"version": "0.5.6",
"project_urls": {
"Changelog": "https://github.com/sylikc/pyexiftool/blob/master/CHANGELOG.md",
"Documentation": "https://sylikc.github.io/pyexiftool/",
"Homepage": "http://github.com/sylikc/pyexiftool",
"Source": "https://github.com/sylikc/pyexiftool",
"Tracker": "https://github.com/sylikc/pyexiftool/issues"
},
"split_keywords": [
"exiftool",
"image",
"exif",
"metadata",
"photo",
"video",
"photography"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fcb9175e9a1f8f3f94b22f622f0fcac853ae2c43cb4ac6034f849269c6086dac",
"md5": "df84a15ffa508bb3e347fcd97b971808",
"sha256": "ac7d7836d2bf373f20aa558528f6b2222c4c0d896ed28c951a3ff8e6cec05a87"
},
"downloads": -1,
"filename": "PyExifTool-0.5.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "df84a15ffa508bb3e347fcd97b971808",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 51243,
"upload_time": "2023-10-22T23:18:16",
"upload_time_iso_8601": "2023-10-22T23:18:16.614048Z",
"url": "https://files.pythonhosted.org/packages/fc/b9/175e9a1f8f3f94b22f622f0fcac853ae2c43cb4ac6034f849269c6086dac/PyExifTool-0.5.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5e48406da6691d15abf3c8d399bce8bc588709a5b54e857fd7c22dad2f90c33c",
"md5": "08e45de1be95829f43e07767698a6f3e",
"sha256": "22a972c1c212d1ad5f61916fded5057333dcc48fb8e42eed12d2ff9665b367ae"
},
"downloads": -1,
"filename": "PyExifTool-0.5.6.tar.gz",
"has_sig": false,
"md5_digest": "08e45de1be95829f43e07767698a6f3e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 56365,
"upload_time": "2023-10-22T23:18:18",
"upload_time_iso_8601": "2023-10-22T23:18:18.819613Z",
"url": "https://files.pythonhosted.org/packages/5e/48/406da6691d15abf3c8d399bce8bc588709a5b54e857fd7c22dad2f90c33c/PyExifTool-0.5.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-22 23:18:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sylikc",
"github_project": "pyexiftool",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pyexiftool"
}