Gphoto2 Cffi

Python bindings for libgphoto2 with an idiomatic API
Alternatives To Gphoto2 Cffi
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Pyzmq3,29512,45979515 hours ago75June 20, 2022116bsd-3-clausePython
PyZMQ: Python bindings for zeromq
Maturin1,873364 days ago160July 05, 202239apache-2.0Rust
Build and publish crates with pyo3, rust-cpython and cffi bindings as well as rust binaries as python packages
Gopy1,495132 months ago25July 11, 202241bsd-3-clauseGo
gopy generates a CPython extension module from a go package.
9 months agoapache-2.0Python
Python bindings for libspotify (no longer working as of May 2022)
Pyvips484112921 days ago24June 12, 2022130mitPython
python binding for libvips using cffi
Misaka413443236 months ago13December 02, 20189mitC
A Python binding for Hoedown.
Cl Opengl255
6 months ago50otherCommon Lisp
cl-opengl is a set of CFFI bindings to the OpenGL, GLU and GLUT APIs.
14 years ago6May 21, 20164mitGo
Go buildmodes prototype: Expose net/http.Server as a library with C bindings
Myo Python202212 years ago11September 04, 20218otherPython
Python bindings for the Myo SDK
Cairocffi195792683 days ago29September 23, 202211bsd-3-clausePython
CFFI-based cairo bindings for Python.
Alternatives To Gphoto2 Cffi
Select To Compare

Alternative Project Comparisons


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 gphoto2cffi 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():

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

Python 2.7 and 3.4 or newer (CPython and PyPy) are supported.


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


From Source:

$ pip install git+

Similar projects

Popular Bindings Projects
Popular Cffi Projects
Popular Libraries Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Python Bindings