What is this?
WifiCamera is a Python module for controlling the network camera CS-W07G-CY. About the device, see http://www.planex.co.jp/product/camera/cs-w07g-cy/.
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='192.168.111.200')
data = camera.snapshot()
with open('snapshot.jpg', 'wb') as f:
f.write(data)
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 = Image.open(StringIO(data))
img.save('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:
f.write(data)
count += 1
def is_continue(): # stop condition
global count
if count < 100:
return True
else:
return False
camera.stream(on_data, is_continue)
License
WifiCamera is licensed under the MIT Licence. See LICENSE for more details.
Metadata
Release files for wificamera 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wificamera-0.1.1.zip | 7.6 kB | Without provenance | Details for wificamera-0.1.1.zip |
Release files / wificamera-0.1.1.zip
| Download URL | wificamera-0.1.1.zip |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40397a133df5fb7aac8b96db76af58426bb17ee29d7b9f432c6d01a60bf8a8f1
|
|
BLAKE2b-256 checksum How to use checksums |
e67ab66b2521afdc94fdc46b8ff4eb69a3ba3727e650072e04b78228b0e24608
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for wificamera 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.