This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Python bindings for libgphoto2 with an interface that strives to be idiomatic. In contrast to other bindings for Python, gphoto2-cffi hides most of the lower-level abstractions and reduces the API surface while still offering access to most of the library’s features.

import gphoto2 as gp

# List all attached cameras that are supported
cams = gp.list_cameras()

# Get a camera instance by specifying a USB bus and device number
my_cam = gp.Camera(bus=4, device=1)

# Get an instance for the first supported camera
my_cam = gp.Camera()
# or
my_cam = next(gp.list_cameras())

# Capture an image to the camera's RAM and get its data
imgdata = my_cam.capture()

# Grab a preview from the camera
previewdata = my_cam.get_preview()

# Get a list of files on the camera
files = tuple(my_cam.list_all_files())

# Iterate over a file's content
with open("image.jpg", "wb") as fp:
    for chunk in my_cam.files[0].iter_data():
        fp.write(chunk)

# Get a configuration value
image_quality = my_cam.config['capturesettings']['imagequality'].value
# Set a configuration value
my_cam.config['capturesettings']['imagequality'].set("JPEG Fine")

Currently only Python 2.7 and 3.4 (CPython and PyPy) are supported, however support for 2.6 and 3.3 is planned for the future.

Requirements

  • libgphoto2 with development headers
  • A working C compiler
  • cffi

Installation

From Source:

$ pip install git+https://github.com/jbaiter/gphoto2-cffi.git

Similar projects

Release History

Release History

0.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
gphoto2-cffi-0.3.tar.gz (22.3 kB) Copy SHA256 Checksum SHA256 Source Jul 7, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting