Skip to main content

Foscam Python Library for H.264 IP Cameras (FI9821W/P/HD816W/P)

Project description


Foscam Python Library for H.264 IP Cameras (FI9821W/P/HD816W/P)

1. Package and upload to pypi.
2. Support more camera models.

Getting Started
### Simple example:
Here is a simple example to move camera lens up and stop after 1s.
from foscam import FoscamCamera
from time import sleep

mycam = FoscamCamera('', 88, 'admin', 'foscam')

### Asynchronous feature:
This example uses the asynchronous feature provided by ``FoscamCamera``.
Normally, a command is sent synchronously, waiting for results and blocking the main thread.
By initializing ``FoscamCamera`` with `daemon=True` (defaults to False), commands are sent asynchronously.
mycam = FoscamCamera('', 88, 'admin', 'foscam', daemon=True)

### Send command with callback:
This example illustrates the use of a callback function when the command completes.
from foscam import FoscamCamera, FOSCAM_SUCCESS
def print_ipinfo(returncode, params):
if returncode != FOSCAM_SUCCESS:
print 'Failed to get IPInfo!'
print 'IP: %s, Mask: %s' % (params['ip'], params['mask'])

mycam = FoscamCamera('', 88, 'admin', 'foscam', daemon=False)

Project details

Download files

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

Source Distribution

pyfoscam-1.2.tar.gz (7.2 kB view hashes)

Uploaded Source

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