Skip to main content

Python gogogate2-api Build status Coverage Status 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

Metadata

Release files for gogogate2-api 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gogogate2-api 3.0.1
File Size Uploaded
gogogate2_api-3.0.1.tar.gz 12.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gogogate2-api 3.0.1
File Interpreter ABI Platform
gogogate2_api-3.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 25.2 kB

Release files / gogogate2_api-3.0.1.tar.gz

Download URL gogogate2_api-3.0.1.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f8622ca469cff3ab13a66bf1950128f436817c097e7a71a706787095b56707f3
BLAKE2b-256 checksum
How to use checksums
d778be3d9db7ce5ff0de6e1f3db8a0a1e7ffc48873436a86cffa435f959252a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.8.17 Linux/5.15.0-1040-azure

Release files / gogogate2_api-3.0.1-py3-none-any.whl

Download URL gogogate2_api-3.0.1-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
479ef3c5040a03e749deb661be67209d3949a8379ffb8424c167f5b0957b1721
BLAKE2b-256 checksum
How to use checksums
22c01d3beb419b1a168a2fa8d85b87e649d089e798341440a909ee953b5140d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.8.17 Linux/5.15.0-1040-azure

Release history Release notifications | RSS feed

This release

3.0.1 This release

2 release files

3.0.0

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page