Skip to main content

Shims for the PiCamera library for the CounterFit virtual IoT device app

Project description

CounterFit Shims - Picamera

Picamera Shim PyPI

Shims for the Picamera to read from a virtual camera

See the Picamera Docs for the API documentation.

Getting started

To use these shims, you will need to install CounterFit and have it running, with the appropriate camera hardware created. Create the camera with a name of Picamera.

  • Install this package from pip:

    pip install counterfit-shims-picamera
    
  • Import Picamera using the counterfit_shims_picamera package instead of the picamera package, as well as importing the CounterFitConnection from the counterfit_shims_grove.counterfit_connection module:

    from counterfit_connection import CounterFitConnection
    import counterfit_shims_picamera
    
  • Configure the connection to the CounterFit app. Change the hostname and port to where you are running it:

    CounterFitConnection.init('127.0.0.1', 5000)
    
  • Write your Picamers code as usual.

    For example, to capture an image as a JPEG:

    camera = PiCamera()
    image = io.BytesIO()
    camera.capture(image, 'jpeg')
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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