Skip to main content

Python Library for Vivotek IP Cameras

Project description

python-vivotek

Build Status

A Python library for Vivotek IP cameras.

Getting Started

Install

This library currently supports Python 3.4 and up.

pip3 install libpyvivotek

# Or for only the current user
pip3 install --user libpyvivotek
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.2.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

libpyvivotek-0.2.2-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file libpyvivotek-0.2.2.tar.gz.

File metadata

  • Download URL: libpyvivotek-0.2.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for libpyvivotek-0.2.2.tar.gz
Algorithm Hash digest
SHA256 a58d0b22e81a908955883cb322a3b1cf8dfa89da09c7932553dca7397a1d6bd5
MD5 6f3b0ea4c533e0dcb04f0c853a203a08
BLAKE2b-256 ff138a0712b13289bb8f546c2fa93ef4a079efd5814d8a246beefbe51634b9f5

See more details on using hashes here.

File details

Details for the file libpyvivotek-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: libpyvivotek-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4

File hashes

Hashes for libpyvivotek-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9ed10a0692c9c3cd73573ad5a064536ba659ba35bdc0bca1e7c14fcee7cdeae3
MD5 61ca61cff2056e66c8dd3b37d658f8ef
BLAKE2b-256 b219dba3cdfd3719ec6d2a969a508f9271b82352b2a0891eb48219a89b94cce9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page