Skip to main content

Library for connecting to GogoGate2 and iSmartGate hubs

Project description

Python gogogate2-api Build status codecov PyPI

Python library for controlling GogoGate2 and iSmartGate devices

Installation

pip install gogogate2-api

Usage in Commands

$ gogogate2 --help
Usage: gogogate2 [OPTIONS] COMMAND [ARGS]...

  Interact with the device API.

Options:
  --host TEXT      [required]
  --username TEXT  [required]
  --password TEXT  Omit for interactive prompt. Use '-' to read from stdin.
  --version        Show the version and exit.
  --help           Show this message and exit.

Commands:
  close  Close the door.
  info   Get info from device.
  open   Open the door.


$ ismartgate --help
Usage: ismartgate [OPTIONS] COMMAND [ARGS]...

  Interact with the device API.

Options:
  --host TEXT      [required]
  --username TEXT  [required]
  --password TEXT  Omit for interactive prompt. Use '-' to read from stdin.
  --version        Show the version and exit.
  --help           Show this message and exit.

Commands:
  close  Close the door.
  info   Get info from device.
  open   Open the door.

Usage in Code

from gogogate2_api import GogoGate2Api, ISmartGateApi

# GogoGate2 API
gogogate2_api = GogoGate2Api("10.10.0.23", "admin", "password")

# Get info about device and all doors.
gogogate2_api.info()

# Open/close door.
gogogate2_api.open_door(1)
gogogate2_api.close_door(1)


# iSmartGate API
ismartgate_api = ISmartGateApi("10.10.0.24", "admin", "password")

# Get info about device and all doors.
ismartgate_api.info()

# Open/close door.
ismartgate_api.open_door(1)
ismartgate_api.close_door(1)

Building

Building, testing and linting of the project is all done with one script. You only need a few dependencies.

Dependencies:

  • python3 in your path.
  • The python3 venv module.

The build script will setup the venv, dependencies, test and lint and bundle the project.

./scripts/build.sh

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

gogogate2_api-2.0.1.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

gogogate2_api-2.0.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file gogogate2_api-2.0.1.tar.gz.

File metadata

  • Download URL: gogogate2_api-2.0.1.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-1023-azure

File hashes

Hashes for gogogate2_api-2.0.1.tar.gz
Algorithm Hash digest
SHA256 315f0d38d9cb7b0adc228b9d25efe44dd2ff855597ded0dfd11cd5c1817bb872
MD5 f9ed2b21af6e50b4068758be47fd81f5
BLAKE2b-256 e572b746fc7638112fc1eb706bb0a3b5c97eaed868e47d52b44341e63f16063c

See more details on using hashes here.

File details

Details for the file gogogate2_api-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: gogogate2_api-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-1023-azure

File hashes

Hashes for gogogate2_api-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aa52e29d8290d4aed82cd00ccce5a0a7ad067ac9a2779ab6aa15f3a6a80c3f26
MD5 5cbef90a53e3b1248a8e98ee9a8c9be1
BLAKE2b-256 88eaca60754cf81ad4a61febe98919f049206c98e67e0be56819c91bc1b90ac5

See more details on using hashes here.

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