ismartgate


Nameismartgate JSON
Version 5.0.1 PyPI version JSON
download
home_pagehttps://github.com/bdraco/ismartgate
SummaryiSmartGate and GogoGate2 API
upload_time2023-09-20 08:25:50
maintainer
docs_urlNone
authorRobbie Van Gorkom; J. Nick Koston
requires_python>=3.8
licenseMIT license
keywords ismartgate
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ismartgate

[![Build Status](https://github.com/bdraco/ismartgate/workflows/Build%20Main/badge.svg)](https://github.com/bdraco/ismartgate/actions)
[![Documentation](https://github.com/bdraco/ismartgate/workflows/Documentation/badge.svg)](https://bdraco.github.io/ismartgate/)
[![Code Coverage](https://codecov.io/gh/bdraco/ismartgate/branch/main/graph/badge.svg)](https://codecov.io/gh/bdraco/ismartgate)

iSmartGate and GogoGate2 API

---

## About

This is a fork of vangorra's excellent `python_gogogate2_api` library from https://github.com/vangorra/python_gogogate2_api

## Installation

**Stable Release:** `pip install ismartgate`<br>
**Development Head:** `pip install git+https://github.com/bdraco/ismartgate.git`

## 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 ismartgate 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)
```

## Documentation

For full package documentation please visit [bdraco.github.io/ismartgate](https://bdraco.github.io/ismartgate).

## Development

See [CONTRIBUTING.md](CONTRIBUTING.md) for information related to developing the code.

## The Four Commands You Need To Know

1. `pip install -e .[dev]`

    This will install your package in editable mode with all the required development
    dependencies (i.e. `tox`).

2. `make build`

    This will run `tox` which will run all your tests in both Python 3.7
    and Python 3.8 as well as linting your code.

3. `make clean`

    This will clean up various Python and build generated files so that you can ensure
    that you are working in a clean environment.

4. `make docs`

    This will generate and launch a web browser to view the most up-to-date
    documentation for your Python package.

#### Additional Optional Setup Steps:

-   Turn your project into a GitHub repository:
    -   Make an account on [github.com](https://github.com)
    -   Go to [make a new repository](https://github.com/new)
    -   _Recommendations:_
        -   _It is strongly recommended to make the repository name the same as the Python
            package name_
        -   _A lot of the following optional steps are *free* if the repository is Public,
            plus open source is cool_
    -   After a GitHub repo has been created, run the commands listed under:
        "...or push an existing repository from the command line"
-   Register your project with Codecov:
    -   Make an account on [codecov.io](https://codecov.io)(Recommended to sign in with GitHub)
        everything else will be handled for you.
-   Ensure that you have set GitHub pages to build the `gh-pages` branch by selecting the
    `gh-pages` branch in the dropdown in the "GitHub Pages" section of the repository settings.
    ([Repo Settings](https://github.com/bdraco/ismartgate/settings))
-   Register your project with PyPI:
    -   Make an account on [pypi.org](https://pypi.org)
    -   Go to your GitHub repository's settings and under the
        [Secrets tab](https://github.com/bdraco/ismartgate/settings/secrets/actions),
        add a secret called `PYPI_TOKEN` with your password for your PyPI account.
        Don't worry, no one will see this password because it will be encrypted.
    -   Next time you push to the branch `main` after using `bump2version`, GitHub
        actions will build and deploy your Python package to PyPI.

#### Suggested Git Branch Strategy

1. `main` is for the most up-to-date development, very rarely should you directly
   commit to this branch. GitHub Actions will run on every push and on a CRON to this
   branch but still recommended to commit to your development branches and make pull
   requests to main. If you push a tagged commit with bumpversion, this will also release to PyPI.
2. Your day-to-day work should exist on branches separate from `main`. Even if it is
   just yourself working on the repository, make a PR from your working branch to `main`
   so that you can ensure your commits don't break the development head. GitHub Actions
   will run on every push to any branch or any pull request from any branch to any other
   branch.
3. It is recommended to use "Squash and Merge" commits when committing PR's. It makes
   each set of changes to `main` atomic and as a side effect naturally encourages small
   well defined PR's.


**MIT license**


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/bdraco/ismartgate",
    "name": "ismartgate",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "ismartgate",
    "author": "Robbie Van Gorkom; J. Nick Koston",
    "author_email": "nick@koston.org",
    "download_url": "https://files.pythonhosted.org/packages/ea/48/8f7c935cb2b3c996b836eda8ad14021a3fcd84ef4d867e0fd3a555134b7a/ismartgate-5.0.1.tar.gz",
    "platform": null,
    "description": "# ismartgate\n\n[![Build Status](https://github.com/bdraco/ismartgate/workflows/Build%20Main/badge.svg)](https://github.com/bdraco/ismartgate/actions)\n[![Documentation](https://github.com/bdraco/ismartgate/workflows/Documentation/badge.svg)](https://bdraco.github.io/ismartgate/)\n[![Code Coverage](https://codecov.io/gh/bdraco/ismartgate/branch/main/graph/badge.svg)](https://codecov.io/gh/bdraco/ismartgate)\n\niSmartGate and GogoGate2 API\n\n---\n\n## About\n\nThis is a fork of vangorra's excellent `python_gogogate2_api` library from https://github.com/vangorra/python_gogogate2_api\n\n## Installation\n\n**Stable Release:** `pip install ismartgate`<br>\n**Development Head:** `pip install git+https://github.com/bdraco/ismartgate.git`\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 ismartgate 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## Documentation\n\nFor full package documentation please visit [bdraco.github.io/ismartgate](https://bdraco.github.io/ismartgate).\n\n## Development\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for information related to developing the code.\n\n## The Four Commands You Need To Know\n\n1. `pip install -e .[dev]`\n\n    This will install your package in editable mode with all the required development\n    dependencies (i.e. `tox`).\n\n2. `make build`\n\n    This will run `tox` which will run all your tests in both Python 3.7\n    and Python 3.8 as well as linting your code.\n\n3. `make clean`\n\n    This will clean up various Python and build generated files so that you can ensure\n    that you are working in a clean environment.\n\n4. `make docs`\n\n    This will generate and launch a web browser to view the most up-to-date\n    documentation for your Python package.\n\n#### Additional Optional Setup Steps:\n\n-   Turn your project into a GitHub repository:\n    -   Make an account on [github.com](https://github.com)\n    -   Go to [make a new repository](https://github.com/new)\n    -   _Recommendations:_\n        -   _It is strongly recommended to make the repository name the same as the Python\n            package name_\n        -   _A lot of the following optional steps are *free* if the repository is Public,\n            plus open source is cool_\n    -   After a GitHub repo has been created, run the commands listed under:\n        \"...or push an existing repository from the command line\"\n-   Register your project with Codecov:\n    -   Make an account on [codecov.io](https://codecov.io)(Recommended to sign in with GitHub)\n        everything else will be handled for you.\n-   Ensure that you have set GitHub pages to build the `gh-pages` branch by selecting the\n    `gh-pages` branch in the dropdown in the \"GitHub Pages\" section of the repository settings.\n    ([Repo Settings](https://github.com/bdraco/ismartgate/settings))\n-   Register your project with PyPI:\n    -   Make an account on [pypi.org](https://pypi.org)\n    -   Go to your GitHub repository's settings and under the\n        [Secrets tab](https://github.com/bdraco/ismartgate/settings/secrets/actions),\n        add a secret called `PYPI_TOKEN` with your password for your PyPI account.\n        Don't worry, no one will see this password because it will be encrypted.\n    -   Next time you push to the branch `main` after using `bump2version`, GitHub\n        actions will build and deploy your Python package to PyPI.\n\n#### Suggested Git Branch Strategy\n\n1. `main` is for the most up-to-date development, very rarely should you directly\n   commit to this branch. GitHub Actions will run on every push and on a CRON to this\n   branch but still recommended to commit to your development branches and make pull\n   requests to main. If you push a tagged commit with bumpversion, this will also release to PyPI.\n2. Your day-to-day work should exist on branches separate from `main`. Even if it is\n   just yourself working on the repository, make a PR from your working branch to `main`\n   so that you can ensure your commits don't break the development head. GitHub Actions\n   will run on every push to any branch or any pull request from any branch to any other\n   branch.\n3. It is recommended to use \"Squash and Merge\" commits when committing PR's. It makes\n   each set of changes to `main` atomic and as a side effect naturally encourages small\n   well defined PR's.\n\n\n**MIT license**\n\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "iSmartGate and GogoGate2 API",
    "version": "5.0.1",
    "project_urls": {
        "Homepage": "https://github.com/bdraco/ismartgate"
    },
    "split_keywords": [
        "ismartgate"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a68402b92d8911f04e4b50d53b6d9f7b4275aeae5cd4b2405c4da24f7c3d5570",
                "md5": "219ee4fa79c9c2f4fd6afedcb490c94c",
                "sha256": "bd782eaa1a45ca91978fabca843f00de5d20346ecfba097d6b966a73fe140306"
            },
            "downloads": -1,
            "filename": "ismartgate-5.0.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "219ee4fa79c9c2f4fd6afedcb490c94c",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 23149,
            "upload_time": "2023-09-20T08:25:48",
            "upload_time_iso_8601": "2023-09-20T08:25:48.862287Z",
            "url": "https://files.pythonhosted.org/packages/a6/84/02b92d8911f04e4b50d53b6d9f7b4275aeae5cd4b2405c4da24f7c3d5570/ismartgate-5.0.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ea488f7c935cb2b3c996b836eda8ad14021a3fcd84ef4d867e0fd3a555134b7a",
                "md5": "01acfee37bcbc7f0aa19da503abedf65",
                "sha256": "03c065621c0e3c58a95dc0ec0fd0ffc54027e5ce69d39d580a37adf82ce56ae1"
            },
            "downloads": -1,
            "filename": "ismartgate-5.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "01acfee37bcbc7f0aa19da503abedf65",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 31816,
            "upload_time": "2023-09-20T08:25:50",
            "upload_time_iso_8601": "2023-09-20T08:25:50.521304Z",
            "url": "https://files.pythonhosted.org/packages/ea/48/8f7c935cb2b3c996b836eda8ad14021a3fcd84ef4d867e0fd3a555134b7a/ismartgate-5.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-20 08:25:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bdraco",
    "github_project": "ismartgate",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "ismartgate"
}
        
Elapsed time: 0.11780s