biostarPython


NamebiostarPython JSON
Version 0.4.0.1 PyPI version JSON
download
home_pagehttps://github.com/gcartlidge/biostarPython
SummaryPython client for Suprema GSDK with included callable classes.
upload_time2024-08-13 11:14:32
maintainerNone
docs_urlNone
authorSupremaUK
requires_python>3.5.2
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python Client for Suprema GSDK

This is the pip distributable version of the Suprema GSDK Python client, which makes it easier to interact with the GSDK.<br>

The examples from the [Suprema GSDK Wiki](https://supremainc.github.io/g-sdk/) can be used, but with this package, all dependencies are handled via PIP. The EventCode .json file and device list are also initialized automatically when importing package.<br>
### Tips
On some clients (Particularly android) the  EventCode json can sometimes not be loaded. If this happens, an error will display. You can then call 

```python
JsonFileLocation = "C:\\biostarPython\\event_code.json"
biostarPython.initCodeMap(JsonFileLocation)
```
To check Event codes, call 
```python
biostarPython.getEventString(eventCode,subCode)
```
To check device type, call 
```python
biostarPython.deviceType[deviceCode]
```
I'd also recommend checking out [Advanced Installer](https://www.advancedinstaller.com/)! They allow free licences for open-source projects and the features of the program licences are well worth it!

## How to use the rest of the classes.

All classes that can be used are imported under the biostarPython package.
The ones currently written are:<br>
**GatewayClient, ConnectSvc, DeviceSvc, FaceSvc, FingerSvc, StatusSvc, UserSvc, DisplaySvc, AdminSvc, WiegandSvc, TimeSvc, CardSvc, EventSvc, NetworkSvc, ServerSvc, SystemSvc, DoorSvc, RS485Svc, AuthSvc, AccessSvc, ScheduleSvc, ActionSvc, TNASvc, OperatorSvc, LockZoneSvc, TimedAPBZoneSvc, APBZoneSvc, IntrusionZoneSvc, FireZoneSvc, InterlockZoneSvc, UDPSvc & TestSvc**

With the remaining being added in a future release. 
I think im up to date! <br>

With all of these services, they are a callable class underneath the biostarPython package. An example of initial setup with the GatewayClient and ConnectSvc is below:
For all of the functions below these services, they are formated with the first letter in lowercase, so to search a device would be searchDevice(), to get info would be getInfo().<br>
The guides on how to use these are present at the the  [GSDK Homepage](https://supremainc.github.io/g-sdk/)<br>
```python
# import the service duh!
import biostarPython as g
# connect to the gateway, get a channel, then funnel this through to the 
# services!
gateway = g.GatewayClient('127.0.0.1',4000,'ca.crt')
channel = gateway.getChannel()
connect = g.ConnectSvc(channel)
face = g.FaceSvc(channel)
network = g.NetworkSvc(channel)
# will return a list of devices visible on UDP
deviceInfo = connect.searchDevice(300) 
# needs IP address, port and SSL state
bs3 = connect.connect(connect.getConnInfo('192.168.0.50', 51211, False))
# 4 is the default scan threshold
face.scan(bs3,4)
#lets get and change an IP Config
existingConfig = network.getIPConfig(bs3)
existingConfig.useDHCP = False
existingConfig.IPAddress = '192.168.0.20'
network.setIPConfig(bs3, existingConfig)
```

All of the specific APIs can be found at the wiki Above.

### changelog

- 0.4.0.1 - Added UpdateSlideImages to DisplaySvc and added Fingerprint to TestSvc.
- 0.4.0.0 - Updated proto files to 1.7.0 (New Features, BEW3 support), added TestSvc (Waiting on support from device), fixed factoryDefault parameters.
- 0.3.0.5 - Added UDPSvc for changing IP config via UDP, Updated Proto generation to 1.6.0 version of GSDK.
- 0.3.0.2 - Fixed no response recieved from some user commands, also added newEventFilter()
          under event service, to create a new Filter.
- 0.3.0.0 - Support for BS3, VOIP, RTSP and Wiegand User ID
- 0.2.1.4 - Version Push
- 0.2.1.2 - Fixed issue with importing none existent package
- 0.2.1.0 - Addes getJobCode, setJobCode, setJobCodeMulti and setAccessGroupMulti to the UserSvc
- 0.2.0.1 - Added searchInfoToConnectInfo(self, searchInfo, isAsync) under ConnectSvc, allowing generation of Connection Parameters directly from search results
- 0.2.0.0 - Upgraded support for gRPC to the newest version supported by python (Regenerated .py files from .proto)
- 0.1.9.0 - Added zone services, LockZone, APBZone, TimedAPBZone, FireZone, InterlockZone and IntrusionZone are included. Also edited protobuf version to include security fixes (3.20.1)
- 0.1.8.8 - Fixed minor issue with finger.scan (Did not return data)
- 0.1.8.6 - Fixed minor issues
- 0.1.8 - Implemented version check for Protobuf (3.20)
- 0.1.7 - Implemented proper logging, a GSDKlog.log file is now used instead of the standard print command.
- 0.1.6 - Added firmwareUpdateMulti to DeviceSvc (Needed for multiple device upgrade internally)
- 0.1.5 - Added OperatorSvc call so operators above 10 can be added. Supports getList, add, delete, deleteAll, addMulti, deleteMulti and deleteAllMulti
- 0.1.4 - Added getFinger, getFace and getCard to UserSvc. Added getQRConfig, setQRConfig and writeQR to CardSvc()
- 0.1.3 - Added AuthSvc, AccessSvc, ScheduleSvc, ActionSvc and TNASvc.
        Under UserSvc, added newUser, newUserCard, newUserFinger and newUserFace for ease of calling when enrolling new user info.
- 0.1.2 - Updated initial json file string, so import on linux works
- 0.1.1 - Added Readme
- 0.1.0 - Initial Commit


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gcartlidge/biostarPython",
    "name": "biostarPython",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">3.5.2",
    "maintainer_email": null,
    "keywords": null,
    "author": "SupremaUK",
    "author_email": "gcartlidge@supremainc.com",
    "download_url": "https://files.pythonhosted.org/packages/ff/24/c37b48136c5a8a8c1c17c38f53323a546eb94f916034df786df66a67399d/biostarpython-0.4.0.1.tar.gz",
    "platform": null,
    "description": "# Python Client for Suprema GSDK\r\n\r\nThis is the pip distributable version of the Suprema GSDK Python client, which makes it easier to interact with the GSDK.<br>\r\n\r\nThe examples from the [Suprema GSDK Wiki](https://supremainc.github.io/g-sdk/) can be used, but with this package, all dependencies are handled via PIP. The EventCode .json file and device list are also initialized automatically when importing package.<br>\r\n### Tips\r\nOn some clients (Particularly android) the  EventCode json can sometimes not be loaded. If this happens, an error will display. You can then call \r\n\r\n```python\r\nJsonFileLocation = \"C:\\\\biostarPython\\\\event_code.json\"\r\nbiostarPython.initCodeMap(JsonFileLocation)\r\n```\r\nTo check Event codes, call \r\n```python\r\nbiostarPython.getEventString(eventCode,subCode)\r\n```\r\nTo check device type, call \r\n```python\r\nbiostarPython.deviceType[deviceCode]\r\n```\r\nI'd also recommend checking out [Advanced Installer](https://www.advancedinstaller.com/)! They allow free licences for open-source projects and the features of the program licences are well worth it!\r\n\r\n## How to use the rest of the classes.\r\n\r\nAll classes that can be used are imported under the biostarPython package.\r\nThe ones currently written are:<br>\r\n**GatewayClient, ConnectSvc, DeviceSvc, FaceSvc, FingerSvc, StatusSvc, UserSvc, DisplaySvc, AdminSvc, WiegandSvc, TimeSvc, CardSvc, EventSvc, NetworkSvc, ServerSvc, SystemSvc, DoorSvc, RS485Svc, AuthSvc, AccessSvc, ScheduleSvc, ActionSvc, TNASvc, OperatorSvc, LockZoneSvc, TimedAPBZoneSvc, APBZoneSvc, IntrusionZoneSvc, FireZoneSvc, InterlockZoneSvc, UDPSvc & TestSvc**\r\n\r\nWith the remaining being added in a future release. \r\nI think im up to date! <br>\r\n\r\nWith all of these services, they are a callable class underneath the biostarPython package. An example of initial setup with the GatewayClient and ConnectSvc is below:\r\nFor all of the functions below these services, they are formated with the first letter in lowercase, so to search a device would be searchDevice(), to get info would be getInfo().<br>\r\nThe guides on how to use these are present at the the  [GSDK Homepage](https://supremainc.github.io/g-sdk/)<br>\r\n```python\r\n# import the service duh!\r\nimport biostarPython as g\r\n# connect to the gateway, get a channel, then funnel this through to the \r\n# services!\r\ngateway = g.GatewayClient('127.0.0.1',4000,'ca.crt')\r\nchannel = gateway.getChannel()\r\nconnect = g.ConnectSvc(channel)\r\nface = g.FaceSvc(channel)\r\nnetwork = g.NetworkSvc(channel)\r\n# will return a list of devices visible on UDP\r\ndeviceInfo = connect.searchDevice(300) \r\n# needs IP address, port and SSL state\r\nbs3 = connect.connect(connect.getConnInfo('192.168.0.50', 51211, False))\r\n# 4 is the default scan threshold\r\nface.scan(bs3,4)\r\n#lets get and change an IP Config\r\nexistingConfig = network.getIPConfig(bs3)\r\nexistingConfig.useDHCP = False\r\nexistingConfig.IPAddress = '192.168.0.20'\r\nnetwork.setIPConfig(bs3, existingConfig)\r\n```\r\n\r\nAll of the specific APIs can be found at the wiki Above.\r\n\r\n### changelog\r\n\r\n- 0.4.0.1 - Added UpdateSlideImages to DisplaySvc and added Fingerprint to TestSvc.\r\n- 0.4.0.0 - Updated proto files to 1.7.0 (New Features, BEW3 support), added TestSvc (Waiting on support from device), fixed factoryDefault parameters.\r\n- 0.3.0.5 - Added UDPSvc for changing IP config via UDP, Updated Proto generation to 1.6.0 version of GSDK.\r\n- 0.3.0.2 - Fixed no response recieved from some user commands, also added newEventFilter()\r\n          under event service, to create a new Filter.\r\n- 0.3.0.0 - Support for BS3, VOIP, RTSP and Wiegand User ID\r\n- 0.2.1.4 - Version Push\r\n- 0.2.1.2 - Fixed issue with importing none existent package\r\n- 0.2.1.0 - Addes getJobCode, setJobCode, setJobCodeMulti and setAccessGroupMulti to the UserSvc\r\n- 0.2.0.1 - Added searchInfoToConnectInfo(self, searchInfo, isAsync) under ConnectSvc, allowing generation of Connection Parameters directly from search results\r\n- 0.2.0.0 - Upgraded support for gRPC to the newest version supported by python (Regenerated .py files from .proto)\r\n- 0.1.9.0 - Added zone services, LockZone, APBZone, TimedAPBZone, FireZone, InterlockZone and IntrusionZone are included. Also edited protobuf version to include security fixes (3.20.1)\r\n- 0.1.8.8 - Fixed minor issue with finger.scan (Did not return data)\r\n- 0.1.8.6 - Fixed minor issues\r\n- 0.1.8 - Implemented version check for Protobuf (3.20)\r\n- 0.1.7 - Implemented proper logging, a GSDKlog.log file is now used instead of the standard print command.\r\n- 0.1.6 - Added firmwareUpdateMulti to DeviceSvc (Needed for multiple device upgrade internally)\r\n- 0.1.5 - Added OperatorSvc call so operators above 10 can be added. Supports getList, add, delete, deleteAll, addMulti, deleteMulti and deleteAllMulti\r\n- 0.1.4 - Added getFinger, getFace and getCard to UserSvc. Added getQRConfig, setQRConfig and writeQR to CardSvc()\r\n- 0.1.3 - Added AuthSvc, AccessSvc, ScheduleSvc, ActionSvc and TNASvc.\r\n        Under UserSvc, added newUser, newUserCard, newUserFinger and newUserFace for ease of calling when enrolling new user info.\r\n- 0.1.2 - Updated initial json file string, so import on linux works\r\n- 0.1.1 - Added Readme\r\n- 0.1.0 - Initial Commit\r\n\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python client for Suprema GSDK with included callable classes.",
    "version": "0.4.0.1",
    "project_urls": {
        "Homepage": "https://github.com/gcartlidge/biostarPython"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c77da8393845a2f7fe957d0d12206aa63bdf1ebfadcb83d94d0d76c2cf198e99",
                "md5": "4aefdd4d2656c0f6d56c9ab3bc39429d",
                "sha256": "4d0a7812f906ea7fa3534d06f9eceea3047f0f30be05d8d821721013cf9f722a"
            },
            "downloads": -1,
            "filename": "biostarPython-0.4.0.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4aefdd4d2656c0f6d56c9ab3bc39429d",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">3.5.2",
            "size": 254947,
            "upload_time": "2024-08-13T11:14:30",
            "upload_time_iso_8601": "2024-08-13T11:14:30.973519Z",
            "url": "https://files.pythonhosted.org/packages/c7/7d/a8393845a2f7fe957d0d12206aa63bdf1ebfadcb83d94d0d76c2cf198e99/biostarPython-0.4.0.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ff24c37b48136c5a8a8c1c17c38f53323a546eb94f916034df786df66a67399d",
                "md5": "4440acf73619293713c4963021511b8c",
                "sha256": "f27d3b175521c9a83e33f9a980cf8ae31735e85e828335d4764f152216dbdcc0"
            },
            "downloads": -1,
            "filename": "biostarpython-0.4.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4440acf73619293713c4963021511b8c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">3.5.2",
            "size": 153518,
            "upload_time": "2024-08-13T11:14:32",
            "upload_time_iso_8601": "2024-08-13T11:14:32.560900Z",
            "url": "https://files.pythonhosted.org/packages/ff/24/c37b48136c5a8a8c1c17c38f53323a546eb94f916034df786df66a67399d/biostarpython-0.4.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-13 11:14:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gcartlidge",
    "github_project": "biostarPython",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "biostarpython"
}
        
Elapsed time: 0.39831s