gogogate2-api


Namegogogate2-api JSON
Version 3.0.1 PyPI version JSON
download
home_pagehttps://github.com/vangorra/python_gogogate2_api
SummaryLibrary for connecting to GogoGate2 and iSmartGate hubs
upload_time2023-06-24 15:56:35
maintainer
docs_urlNone
authorRobbie Van Gorkom
requires_python>=3.8.1,<4
licenseMIT
keywords gogogate2 ismartgate api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python gogogate2-api [![Build status](https://github.com/vangorra/python_gogogate2_api/workflows/Build/badge.svg?branch=master)](https://github.com/vangorra/python_gogogate2_api/actions?workflow=Build) [![Coverage Status](https://coveralls.io/repos/github/vangorra/python_gogogate2_api/badge.svg?branch=devops_cleanup)](https://coveralls.io/github/vangorra/python_gogogate2_api?branch=master) [![PyPI](https://img.shields.io/pypi/v/gogogate2-api)](https://pypi.org/project/gogogate2-api/)
Python library for controlling GogoGate2 and iSmartGate devices


## Installation

    pip install gogogate2-api

## Usage in Commands
```shell script
$ 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
```python
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.
```bash
./scripts/build.sh
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/vangorra/python_gogogate2_api",
    "name": "gogogate2-api",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8.1,<4",
    "maintainer_email": "",
    "keywords": "gogogate2,ismartgate,api",
    "author": "Robbie Van Gorkom",
    "author_email": "robbie.van.gorkom@protonmail.com",
    "download_url": "https://files.pythonhosted.org/packages/d7/78/be3d9db7ce5ff0de6e1f3db8a0a1e7ffc48873436a86cffa435f959252a9/gogogate2_api-3.0.1.tar.gz",
    "platform": null,
    "description": "# Python gogogate2-api [![Build status](https://github.com/vangorra/python_gogogate2_api/workflows/Build/badge.svg?branch=master)](https://github.com/vangorra/python_gogogate2_api/actions?workflow=Build) [![Coverage Status](https://coveralls.io/repos/github/vangorra/python_gogogate2_api/badge.svg?branch=devops_cleanup)](https://coveralls.io/github/vangorra/python_gogogate2_api?branch=master) [![PyPI](https://img.shields.io/pypi/v/gogogate2-api)](https://pypi.org/project/gogogate2-api/)\nPython library for controlling GogoGate2 and iSmartGate devices\n\n\n## Installation\n\n    pip install gogogate2-api\n\n## Usage in Commands\n```shell script\n$ gogogate2 --help\nUsage: gogogate2 [OPTIONS] COMMAND [ARGS]...\n\n  Interact with the device API.\n\nOptions:\n  --host TEXT      [required]\n  --username TEXT  [required]\n  --password TEXT  Omit for interactive prompt. Use '-' to read from stdin.\n  --version        Show the version and exit.\n  --help           Show this message and exit.\n\nCommands:\n  close  Close the door.\n  info   Get info from device.\n  open   Open the door.\n\n\n$ ismartgate --help\nUsage: ismartgate [OPTIONS] COMMAND [ARGS]...\n\n  Interact with the device API.\n\nOptions:\n  --host TEXT      [required]\n  --username TEXT  [required]\n  --password TEXT  Omit for interactive prompt. Use '-' to read from stdin.\n  --version        Show the version and exit.\n  --help           Show this message and exit.\n\nCommands:\n  close  Close the door.\n  info   Get info from device.\n  open   Open the door.\n```\n\n## Usage in Code\n```python\nfrom gogogate2_api import GogoGate2Api, ISmartGateApi\n\n# GogoGate2 API\ngogogate2_api = GogoGate2Api(\"10.10.0.23\", \"admin\", \"password\")\n\n# Get info about device and all doors.\nawait gogogate2_api.async_info()\n\n# Open/close door.\nawait gogogate2_api.async_open_door(1)\nawait gogogate2_api.async_close_door(1)\n\n\n# iSmartGate API\nismartgate_api = ISmartGateApi(\"10.10.0.24\", \"admin\", \"password\")\n\n# Get info about device and all doors.\nawait ismartgate_api.async_info()\n\n# Open/close door.\nawait ismartgate_api.async_open_door(1)\nawait ismartgate_api.async_close_door(1)\n```\n\n## Building\nBuilding, testing and linting of the project is all done with one script. You only need a few dependencies.\n\nDependencies:\n- python3 in your path.\n- The python3 `venv` module.\n\nThe build script will setup the venv, dependencies, test and lint and bundle the project.\n```bash\n./scripts/build.sh\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Library for connecting to GogoGate2 and iSmartGate hubs",
    "version": "3.0.1",
    "project_urls": {
        "Homepage": "https://github.com/vangorra/python_gogogate2_api",
        "Repository": "https://github.com/vangorra/python_gogogate2_api"
    },
    "split_keywords": [
        "gogogate2",
        "ismartgate",
        "api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "22c01d3beb419b1a168a2fa8d85b87e649d089e798341440a909ee953b5140d2",
                "md5": "e79112a361ceb7c9c17029b003b7b940",
                "sha256": "479ef3c5040a03e749deb661be67209d3949a8379ffb8424c167f5b0957b1721"
            },
            "downloads": -1,
            "filename": "gogogate2_api-3.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e79112a361ceb7c9c17029b003b7b940",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.1,<4",
            "size": 12666,
            "upload_time": "2023-06-24T15:56:34",
            "upload_time_iso_8601": "2023-06-24T15:56:34.498583Z",
            "url": "https://files.pythonhosted.org/packages/22/c0/1d3beb419b1a168a2fa8d85b87e649d089e798341440a909ee953b5140d2/gogogate2_api-3.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d778be3d9db7ce5ff0de6e1f3db8a0a1e7ffc48873436a86cffa435f959252a9",
                "md5": "1e15c18e9c4bfc1cfb387b89c1fe2cc6",
                "sha256": "f8622ca469cff3ab13a66bf1950128f436817c097e7a71a706787095b56707f3"
            },
            "downloads": -1,
            "filename": "gogogate2_api-3.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "1e15c18e9c4bfc1cfb387b89c1fe2cc6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.1,<4",
            "size": 12518,
            "upload_time": "2023-06-24T15:56:35",
            "upload_time_iso_8601": "2023-06-24T15:56:35.815463Z",
            "url": "https://files.pythonhosted.org/packages/d7/78/be3d9db7ce5ff0de6e1f3db8a0a1e7ffc48873436a86cffa435f959252a9/gogogate2_api-3.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-24 15:56:35",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vangorra",
    "github_project": "python_gogogate2_api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "gogogate2-api"
}
        
Elapsed time: 0.09769s