PTP / IP client
Project description
Getting started
pip install ptpip
from ptpip.client import PtpIpClient
from ptpip.report.html_device import HtmlDeviceReportGenerator
async def usePtpIpClient(client: PtpIpClient):
device = await client.getDeviceInfo()
props = []
for idx, prop in enumerate(device.properties):
prop_desc = await client.getDevicePropDesc(
prop=prop,
delay=0
)
props.append(prop_desc)
discoveredProps = await client.discoverDevicePropDesc(device, delay=0)
html = HtmlDeviceReportGenerator(device, props, discoveredProps) \
.generate()
reportFileName = 'd5300.html'
f = open(reportFileName, 'w')
f.write(html)
f.close()
print('Report saved ! ' + reportFileName)
setExposureIndexResponse = await client.setDevicePropValue(
prop = DevicePropertyType.ExposureIndex.value,
propType = PropertyType.Uint16,
value = 3200
)
print('setExposureIndexResponse: ' + str(setExposureIndexResponse))
exposureIndex = await client.getDevicePropValue(
prop = DevicePropertyType.ExposureIndex.value,
propType = PropertyType.Uint16
)
print('Exposure index : ' + str(exposureIndex))
PtpIpClient(usePtpIpClient)
References
https://github.com/mmattes/ptpip
http://www.gphoto.org/doc/ptpip.php
https://github.com/Fimagena/libptp
https://github.com/whoozle/android-file-transfer-linux/tree/master/mtp/ptp
https://github.com/Parrot-Developers/sequoia-ptpy/blob/master/ptpy/ptp.py
https://api.ricoh/docs/theta-web-api/property/still_capture_mode/
https://manualzz.com/download/46005016 D5000 MTP Specifications
https://www.usb.org/sites/default/files/MTPv1_1.zip
https://github.com/gphoto/libgphoto2/
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
ptpip-0.0.5.tar.gz
(30.8 kB
view hashes)
Built Distribution
ptpip-0.0.5-py3-none-any.whl
(53.2 kB
view hashes)