{ "info": { "author": "Luis Mario Domenzain", "author_email": "ld@airinov.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: End Users/Desktop", "Intended Audience :: Other Audience", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Home Automation", "Topic :: Multimedia", "Topic :: Multimedia :: Graphics", "Topic :: Multimedia :: Graphics :: Capture", "Topic :: Multimedia :: Graphics :: Capture :: Digital Camera", "Topic :: Scientific/Engineering", "Topic :: Software Development :: Libraries", "Topic :: System :: Filesystems", "Topic :: System :: Hardware", "Topic :: System :: Hardware :: Hardware Drivers" ], "description": "# Introduction\n\nPure Python implementation of the PTP standard as specified in\nISO15740:2013(E).\n\nThis implementation is transport agnostic and can be used along with USB,\nserial or IP layers to communicate with PTP compliant cameras.\n\nThe entire codebase, tools and examples are compatible with both Python 3 and\nPython 2.\n\n# Basic Usage\n\nPTPy accomodates both the low-level developers wishing to test their PTP\nimplementation as well as users of the cameras in the market.\n\nBy default, PTPy will automatically detect which extension the camera supports\nand load it so that the interaction is seamless.\n\n> The most basic usage of PTPy with a camera connected is:\n\n```python\nfrom ptpy import PTPy\n\ncamera = PTPy()\nprint(camera.get_device_info())\n\nwith camera.session():\n camera.initiate_capture()\n```\n\nDevelopers might want to disable the extra functionality, or impose an\nextension to use. E.g. when the PTP Extension ID has not been assigned.\n\n> It is possible to get bare PTP functionality with:\n\n```python\nfrom ptpy import PTPy\n\ncamera = PTPy(raw=True)\nprint(camera.get_device_info())\n\nwith camera.session():\n # Do basic things here.\n```\n\nA developer might want to test the case where the extension is incorrectly\nidentified. This is possible by imposing an arbitrary extension.\n\n> Impose MTP (Microsoft PTP Extension) to any camera:\n\n```python\nfrom ptpy import PTPy\nfrom ptpy.extensions.microsoft import PTPDevice as mtp\n\ncamera = PTPy(extension=mtp)\nwith camera.session():\n # Do bizarre things here.\n```\n\nSessions are managed automatically with context managers.\nAll sessions under a top session with share the top session.\n\n> To inspect the current session and transaction use the corresponding properties:\n\n```python\nfrom ptpy import PTPy\n\ncamera = PTPy()\nwith camera.session():\n camera.get_device_info()\n\n print('Top level session:')\n print(camera.session_id)\n print('Transaction ID:')\n print(camera.transaction_id)\n\n with camera.session():\n\n camera.get_device_info()\n\n print('Shared session:')\n print(camera.session_id)\n\n print('Transaction ID increases:')\n print(camera.transaction_id)\n\nwith camera.session():\n camera.get_device_info()\n\n print('First session:')\n print(camera.session_id)\n\n print('Transaction ID:')\n print(camera.transaction_id)\n\nwith camera.session():\n camera.get_device_info()\n\n print('Second session:')\n print(camera.session_id)\n\n print('Transaction ID:')\n print(camera.transaction_id)\n```\n\n# Transports\n\n## USB\nA proof-of-concept USB implementation is provided using PyUSB. Though it might\nnot work with all USB controllers in cameras today. In some operating systems,\nit might be necessary to be `root` in order to access USB devices directly.\n\nFor the USB transport, the `_shutdown` method is provided to explicitly release\nthe USB interface. At the end of the Python interpreter session this will happen\nautomatically.\n\n## IP\nA proof-of-concept PTP/IP implementation is provided using sockets. Since there\nis no device discovery implemented yet, the address must be provided directly.\n\n```python\nfrom ptpy import PTPy\nfrom ptpy.transports.ip import IPTransport\n\n# Default PTP/IP port assumed\nc = PTPy(transport=IPTransport, device='197.168.47.1')\n\n# Optionally:\nc = PTPy(transport=IPTransport, device=('197.168.47.1', 15740))\n```\n\n# Extensions\n\n## State of the art\n\nFull support for the Parrot Drone SAS extension is provided. Extensions are\nmeant to provice vendor-specific sets of operations, events and properties.\n\nPartial support for Canon, Microsoft (MTP), and Nikon extensions is provided.\nFull support is expected eventually.\n\nCanon and Nikon extensions integrate their specific events mechanisms.\n\nExtensions are managed automatically for users or can be imposed by developers.\n\n## Framework\n\nA developer can take any of the sample extensions as a model for others.\n\nIn general extensions do not need to overwrite any base PTP operations, events\nor properties. Indeed most extensions will add some extra commands.\n\n# Installing\n\nTo install issue `pip install .` or `pip install -e .` for developer mode. The\ncommand `python setup.py install` should also work.\n\n# Development\n\n## Requirements\n\nA `requirements.txt` file is provided for ease of development.\nFor developing tests, an additional `tests/requirements.txt` is provided.\n\nUnder Windows, install `libusb` or `libusb-win32` using\n(zadig)[http://zadig.akeo.ie].\n\n## Tests\n\nVendors might want to test their devices against the hardware tests. These\nbecome immediately accessible when a camera is connected.\n\nTo launch tests issue `python setup.py test`.\n\nA convenience Makefile is provided so the command becomes `make test`.\n\nAll tests are implemented using `py.test`, which can also be called directly:\n`py.test ./tests`\n\n# TODO\n\n- Implement extension mapped codes from PTP1.1\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Parrot-Developers/sequoia-ptpy", "keywords": "ptp mtp usb ip ptpip ptpusb parrot canon nikon microsoft", "license": "BSD-3-Clause", "maintainer": "", "maintainer_email": "", "name": "ptpy", "package_url": "https://pypi.org/project/ptpy/", "platform": "", "project_url": "https://pypi.org/project/ptpy/", "project_urls": { "Homepage": "https://github.com/Parrot-Developers/sequoia-ptpy" }, "release_url": "https://pypi.org/project/ptpy/0.3.2/", "requires_dist": null, "requires_python": "", "summary": "A pure Python implementation of Picture Transfer Protocol.", "version": "0.3.2" }, "last_serial": 3427883, "releases": { "0.1.1": [], "0.2.0": [ { "comment_text": "", "digests": { "md5": "1725058af1c1e6d66612be19bbaa959b", "sha256": "ded2ef030e8aa8dab008cde41e7ca03ba71688b37596a77d472c1f6865cf9f34" }, "downloads": -1, "filename": "ptpy-0.2.0-py2-none-any.whl", "has_sig": true, "md5_digest": "1725058af1c1e6d66612be19bbaa959b", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 36195, "upload_time": "2016-08-29T13:53:37", "url": "https://files.pythonhosted.org/packages/f7/9a/fc1603e16ce5523311ba027dc05e8b696a4c0c3940e78d6d0bc716a3bd19/ptpy-0.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e33f7a16dc81ed7255bf882a17a234e5", "sha256": "612d087187f2513f9000ccf29425f90e4adb217ba25d2a403dac52d9b42e897a" }, "downloads": -1, "filename": "ptpy-0.2.0.tar.gz", "has_sig": true, "md5_digest": "e33f7a16dc81ed7255bf882a17a234e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26259, "upload_time": "2016-08-29T13:53:30", "url": "https://files.pythonhosted.org/packages/d0/0b/0ae3b4fbeed9e2393e9a58dfcd6c08e2f2fc9428b7eaf0b67eb2f1f89d09/ptpy-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "0d7d493dac6716e0c39c00000857e903", "sha256": "c1935ee3cec2d381f5f4d8860cd666835ff57f7f39171d4487aa20274a93baa0" }, "downloads": -1, "filename": "ptpy-0.3.0-py2-none-any.whl", "has_sig": true, "md5_digest": "0d7d493dac6716e0c39c00000857e903", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 53035, "upload_time": "2017-08-24T12:35:54", "url": "https://files.pythonhosted.org/packages/f3/a5/e49dcc5d456923466cca1f028b25bd7dd3287f17aadc981007dc5614c889/ptpy-0.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dcb5e3e16edd8dd9a399ef7eaaf85758", "sha256": "780b702d48f2acf37d0fc34eed75ac54c5a6c3753d2ad26e9d07762033c8dde8" }, "downloads": -1, "filename": "ptpy-0.3.0.tar.gz", "has_sig": true, "md5_digest": "dcb5e3e16edd8dd9a399ef7eaaf85758", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40756, "upload_time": "2017-08-24T12:35:47", "url": "https://files.pythonhosted.org/packages/05/eb/4942bb87ef814141e2e3cdbfff0e2078c93ad9ddd926f96521a279e15634/ptpy-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "2e5227fbfba6762306417fa82eaa624b", "sha256": "138727a101304de553b063bb78372d929fbd5cf4e9efba7839103f049d306a87" }, "downloads": -1, "filename": "ptpy-0.3.1-py2-none-any.whl", "has_sig": true, "md5_digest": "2e5227fbfba6762306417fa82eaa624b", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 53150, "upload_time": "2017-11-29T03:03:43", "url": "https://files.pythonhosted.org/packages/fb/24/ba4c2ff8e4b9499541cba620e133a5d1cd7c23e45c12128f5ce1f56d56ff/ptpy-0.3.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "58aeabb8478b436bd1e1ec4a47ff0ca1", "sha256": "5e5198bf661a9383943b759be9a73a8b37c36263b8983c1ee472a612c63dd746" }, "downloads": -1, "filename": "ptpy-0.3.1-py3-none-any.whl", "has_sig": true, "md5_digest": "58aeabb8478b436bd1e1ec4a47ff0ca1", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 53064, "upload_time": "2017-11-29T17:16:51", "url": "https://files.pythonhosted.org/packages/c0/54/8842e4dc6543e20ff6471e469e7fa62e661031a70a1b33b0992fe7004c8a/ptpy-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "207e4b459b2b804bc497b5bc91be9886", "sha256": "a45e8aaf5d9dc5faa3e945d82e71042ce4fbe53c32e90efc315d3a52df57bdba" }, "downloads": -1, "filename": "ptpy-0.3.1.tar.gz", "has_sig": true, "md5_digest": "207e4b459b2b804bc497b5bc91be9886", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42743, "upload_time": "2017-11-29T02:59:26", "url": "https://files.pythonhosted.org/packages/a5/fb/636da0461ff637a5e4928c35a1233e8c76c642e8efd11b4d965190f2199c/ptpy-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "a1c718d2b007f2be54bd6a82a19d8646", "sha256": "a90bc3744d5a55967659984194990ad20a24f8a0892be5ddbc458b7389615a8f" }, "downloads": -1, "filename": "ptpy-0.3.2-py2-none-any.whl", "has_sig": true, "md5_digest": "a1c718d2b007f2be54bd6a82a19d8646", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 53104, "upload_time": "2017-12-19T10:21:44", "url": "https://files.pythonhosted.org/packages/29/57/3bc3435471a3e4777984bc69c71a2c0b30ffb483765535a504db194ad428/ptpy-0.3.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "54f9773a36368303c3603d2562abb13e", "sha256": "31028383361654448f1d5460ecaa9d2f38340984a1e78bb3d551daed77f69810" }, "downloads": -1, "filename": "ptpy-0.3.2-py3-none-any.whl", "has_sig": true, "md5_digest": "54f9773a36368303c3603d2562abb13e", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 53105, "upload_time": "2017-12-19T10:23:18", "url": "https://files.pythonhosted.org/packages/a0/94/9db88cbea56babbd67772db09bda0334d2ee610e556b87a9140ca93451d4/ptpy-0.3.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fc7d921768c9d528a972f2b61643044a", "sha256": "aeee7908406b19bdb6a8cdb53446a94c18d5cd77de92498c4db3507ee63cd8ac" }, "downloads": -1, "filename": "ptpy-0.3.2.tar.gz", "has_sig": true, "md5_digest": "fc7d921768c9d528a972f2b61643044a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43528, "upload_time": "2017-12-19T10:21:34", "url": "https://files.pythonhosted.org/packages/e4/14/a026f9583d7dcfaba2b675cbe8c5c3bc4066082108b8ae9da01ca5129cd4/ptpy-0.3.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a1c718d2b007f2be54bd6a82a19d8646", "sha256": "a90bc3744d5a55967659984194990ad20a24f8a0892be5ddbc458b7389615a8f" }, "downloads": -1, "filename": "ptpy-0.3.2-py2-none-any.whl", "has_sig": true, "md5_digest": "a1c718d2b007f2be54bd6a82a19d8646", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 53104, "upload_time": "2017-12-19T10:21:44", "url": "https://files.pythonhosted.org/packages/29/57/3bc3435471a3e4777984bc69c71a2c0b30ffb483765535a504db194ad428/ptpy-0.3.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "54f9773a36368303c3603d2562abb13e", "sha256": "31028383361654448f1d5460ecaa9d2f38340984a1e78bb3d551daed77f69810" }, "downloads": -1, "filename": "ptpy-0.3.2-py3-none-any.whl", "has_sig": true, "md5_digest": "54f9773a36368303c3603d2562abb13e", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 53105, "upload_time": "2017-12-19T10:23:18", "url": "https://files.pythonhosted.org/packages/a0/94/9db88cbea56babbd67772db09bda0334d2ee610e556b87a9140ca93451d4/ptpy-0.3.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fc7d921768c9d528a972f2b61643044a", "sha256": "aeee7908406b19bdb6a8cdb53446a94c18d5cd77de92498c4db3507ee63cd8ac" }, "downloads": -1, "filename": "ptpy-0.3.2.tar.gz", "has_sig": true, "md5_digest": "fc7d921768c9d528a972f2b61643044a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43528, "upload_time": "2017-12-19T10:21:34", "url": "https://files.pythonhosted.org/packages/e4/14/a026f9583d7dcfaba2b675cbe8c5c3bc4066082108b8ae9da01ca5129cd4/ptpy-0.3.2.tar.gz" } ] }