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.
await gogogate2_api.async_info()

# Open/close door.
await gogogate2_api.async_open_door(1)
await gogogate2_api.async_close_door(1)


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

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

# Open/close door.
await ismartgate_api.async_open_door(1)
await ismartgate_api.async_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-3.0.0.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

gogogate2_api-3.0.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gogogate2_api-3.0.0.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.4.0-1032-azure

File hashes

Hashes for gogogate2_api-3.0.0.tar.gz
Algorithm Hash digest
SHA256 f11d6f07f4d492eedf259d2023247489c6e901c7a991388b205544adc8a0b1ba
MD5 16e60c1362bae294e2be14761ba22185
BLAKE2b-256 93e0958e46ca64f3a4a1c249da6acc96d5d5d558106ab62aba00633107e7e428

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gogogate2_api-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.6 Linux/5.4.0-1032-azure

File hashes

Hashes for gogogate2_api-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 32d3345aead2d0c0b31573c8bc82033af0dfa0e58eddcc42acf8f6658942d16c
MD5 f6ac7aa3051cf81aa4d777aa2221d92c
BLAKE2b-256 42a44159e642df84a254caf5ced3745caf0b8278106aa3167d0c9b09f42cb72d

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