Python Library for Vivotek IP Cameras
Project description
python-vivotek
A Python library for Vivotek IP cameras.
Getting Started
from libpyvivotek import VivotekCamera
cam = VivotekCamera(host='192.168.1.123', port=443, usr='user', pwd='passw0rd')
print("Camera model is %s" % cam.model_name)
# Camera model is IB8369A
Load password from Keyring
We can use Python Keyring to load the password rather than from a string.
# Install the package
pip install --user keyring
# Set the password using the command-line interface.
python -m keyring set camera user passw0rd
import keyring
from libpyvivotek import VivotekCamera
cam = VivotekCamera(host='192.168.1.123', port=443, usr='user',
pwd=keyring.get_password('camera', 'user'))
print("Camera model is %s" % cam.model_name)
# Camera model is IB8369A
View a snapshot image
from libpyvivotek import VivotekCamera
from PIL import Image
from io import BytesIO
import keyring
cam = VivotekCamera(host='192.168.1.123', port=443, usr='user',
pwd=keyring.get_password('camera', 'user'))
snapshot = Image.open(BytesIO(cam.snapshot()))
snapshot.show()
Getting parameters
cam.get_param('capability_api_httpversion')
# "'0311b_1'"
cam.get_param('capability_naudioin')
# "'0'"
cam.get_param('capability_protocol_https')
# "'1'"
cam.get_param('event_i0_enable')
# "'1'"
cam.get_param('motion_c0_enable')
# "'1'"
Setting parameters
cam.set_param('event_i0_enable', 1)
# "'1'"
cam.set_param('event_i0_enable', 0)
# "'0'"
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
libpyvivotek-0.1.tar.gz
(2.9 kB
view hashes)
Built Distribution
libpyvivotek-0.1-py3-none-any.whl
(15.4 kB
view hashes)
Close
Hashes for libpyvivotek-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4346796f00373bbe521dc26ce043ae97f4b62da8ad99dc62e67e18e94f2cd620 |
|
MD5 | 8338ee03a22fd82b9a8c3d98194a453a |
|
BLAKE2b-256 | 379f05aeda1eceb1040908d36ce4dcedd9c19e6e41d98ea59d45588bdd67bc91 |