Skip to main content

Python client for Eagle Eye Networks APIv3

Project description

EagleEyev3

Summary

This is a python package for working with the Eagle Eye Networks APIv3. It takes some liberties with the API to make it more pythonic. There is plenty of sugar sprinkled in to make it a little easier to use.

Features

This is still a very early project that hasn't reached 1.0.0 yet.

Included

  • Login through Oauth2 flow
  • Login with refresh_token
  • Reseller account switching
  • List of Cameras (attached, available, multi)
  • List of Bridges
  • List of Accounts
  • List of Status Events for Cameras
  • List of Videos (main, mp4) for Camera
  • Get live preview image
  • Get list of available feeds

Coming Soon

  • Download video (main, mp4)
  • Get live video (hls)
  • Get Thumbnail image
  • Archive (files)
  • VSP
  • PTZ
  • Event Subscriptions
  • Alerts
  • Notifications
  • Tags

Getting Started

Start by import the package and the config from settings (see the Settings File section below)

from EagleEyev3 import *
from settings import config

Make a new instance

een = EagleEyev3(config)

If you are going to use the Oauth2 login flow, construct the login url

base_url     =  "https://auth.eagleeyenetworks.com/oauth2/authorize"
path_url     =  f"?client_id={een.client_id}&response_type=code&scope=vms.all&redirect_uri={een.redirect_uri}"
login_url    =  f"{base_url}{path_url}"  }

Handle the callback from Oauth2 including the code, proceed to get access and refresh tokens

oauth_object = een.login_tokens(code)

Alternatively you can login using the refresh_token

een.login_tokens(code=None, cascade=True, refresh_token=<refresh_token>)

You'll probably want to get a list of cameras

een.get_list_of_cameras()

There are helpers to get online cameras

[i for i in een.cameras if i.is_online()]

and offline

[i for i in een.cameras if i.is_offline()]

You can get a live preview image

camera.get_live_preview()

You can get a list of all feeds

een.get_list_of_feeds()

Settings File

There is file settings.py that is needed to run. It should look similar to this:

config = {

	# Set up your application and get client id/secrete first
	# https://developerv3.eagleeyenetworks.com/page/my-application
	"client_id": "",
	"client_secret": "",

	# you will need to add approved redirect_uris in your application
	# this examples assumes you've added http://127.0.0.1:3333/login_callback
	# change the following variables if you did something different
	# Note: do not use localhost for server_host, use 127.0.0.1 instead
	"server_protocol": "http",
	"server_host": "127.0.0.1", 
	"server_port": "3333",
	"server_path": "login_callback",
}

You can create your application and setup credentials at: [https://developerv3.eagleeyenetworks.com/page/my-application-html](my applications). You can also reach out to api_support@een.com for help.

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

eagleeyev3-0.0.24.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

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

eagleeyev3-0.0.24-py2.py3-none-any.whl (10.4 kB view details)

Uploaded Python 2Python 3

File details

Details for the file eagleeyev3-0.0.24.tar.gz.

File metadata

  • Download URL: eagleeyev3-0.0.24.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.29.0

File hashes

Hashes for eagleeyev3-0.0.24.tar.gz
Algorithm Hash digest
SHA256 a7c97753f988aba9a93066573547a8f1d29b800025b974dd37c60a9a5a4710ad
MD5 6f6412db247ef2319d23257e50ae11e7
BLAKE2b-256 bc2a7471f62d4d6075de58a388d98cb53dae0bab61a6c4d02bfe84115292842a

See more details on using hashes here.

File details

Details for the file eagleeyev3-0.0.24-py2.py3-none-any.whl.

File metadata

  • Download URL: eagleeyev3-0.0.24-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.29.0

File hashes

Hashes for eagleeyev3-0.0.24-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 76bdf6ff52c97fc85bf4fdd8d454e9a1ac0c1c1106cd4d81f70cbc7b61662cd4
MD5 26f7bb63563a54fe560669024fcfe9cd
BLAKE2b-256 e1bf8e0507e2d6d96c4447b68249b94709656866eafebddb7d95c328ae0639df

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