Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

WifiCamera is a Python module for controlling the network camera CS-W07G-CY.

Project description

What is this?

WifiCamera is a Python module for controlling the network camera CS-W07G-CY. About the device, see

Getting started

WifiCamera can be installed with pip or easy_install:

pip install wificamera

Create WifiCamera object, and you can take and save a snapshot:

from wificamera import WifiCamera
camera = WifiCamera(host='')
data = camera.snapshot()
with open('snapshot.jpg', 'wb') as f:

You can get/set some kinds of parameters for the camera:

print(camera.resolution)        # 'VGA'
camera.resolution = 'QQVGA'     # set resolution 'QQVGA'

print(camera.compression)       # 'standard'
camera.compression = 'high'     # set compression 'high'

print(camera.brightness)        # 4
camera.brightness = 7           # set brightness 7

print(camera.contrast)          # 2
camera.contrast = 4             # set contrast 4

To load a snapshot as a PIL object, use StringIO module:

from cStringIO import StringIO
import Image
data = camera.snapshot()
img ='snapshot.jpg')

To use streaming, define callback and call ‘stream’ method:

count = 0

def on_data(data):  # callback
    global count
    with open('streaming.jpg', 'wb') as f:
    count += 1

def is_continue():  # stop condition
    global count
    if count < 100:
        return True
        return False, is_continue)


WifiCamera is licensed under the MIT Licence. See LICENSE for more details.

Project details

Download files

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

Files for wificamera, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size (7.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page