Skip to main content

Exiftool protocol and stream endpoint plugin to be used with Twisted

Project description

https://travis-ci.org/znerol/txexiftool.svg?branch=master

Exiftool protocol and stream endpoint plugin to be used with twisted.

Usage

from twisted.internet import defer, endpoints, protocol, reactor
from txexiftool import ExiftoolProtocol

@defer.inlineCallbacks
def test():
    # Construct an exiftool endpoint. If the tool is installed in a custom
    # location, specify the path to the binary as the first argument. E.g.
    # 'exiftool:/path/to/exiftool'
    ep = endpoints.clientFromString(reactor, 'exiftool')

    # Instantiate the protocol by connecting to the endpoint
    f = protocol.Factory.forProtocol(ExiftoolProtocol)
    p = yield ep.connect(f)

    # Run commands and retrieve results.
    metadata = yield p.execute('-j', '/usr/share/pixmaps/gtkvim.png')
    print metadata

    # Disconnect
    yield p.loseConnection()

    reactor.stop()

reactor.callWhenRunning(test)
reactor.run()

License

The software is subject to the MIT license.

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

txExiftool-0.1.3.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file txExiftool-0.1.3.tar.gz.

File metadata

  • Download URL: txExiftool-0.1.3.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for txExiftool-0.1.3.tar.gz
Algorithm Hash digest
SHA256 9d07bab5eb0cbfd559ef5035d61127fbff60110846f27ddd381abd81a6f9c42e
MD5 451d49b3a8a9ca6cd9d891f196ac3b4d
BLAKE2b-256 675a2ba52db90233fbb23983c6b0f2656f22aed773184140d98cbb7a170e2aab

See more details on using hashes here.

Supported by

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