pyzkaccess


Namepyzkaccess JSON
Version 1.1 PyPI version JSON
download
home_pagehttps://github.com/bdragon300/pyzkaccess
SummaryLibrary and CLI tool for working with ZKTeco ZKAccess C3-100/200/400 controllers
upload_time2024-11-09 09:05:45
maintainerNone
docs_urlNone
authorIgor Derkach
requires_python<4.0,>=3.8
licenseApache-2.0
keywords zkaccess zkteco c3-100 c3-200 c3-400 access control door controller zkaccess control
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyZKAccess

[![version](https://img.shields.io/pypi/v/pyzkaccess)](https://pypi.org/project/pyzkaccess/)
[![pyversions](https://img.shields.io/pypi/pyversions/pyzkaccess)](https://pypi.org/project/pyzkaccess/)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/bdragon300/pyzkaccess/commit.yaml?branch=master)
[![codecov](https://codecov.io/gh/bdragon300/pyzkaccess/branch/master/graph/badge.svg)](https://codecov.io/gh/bdragon300/pyzkaccess)
[![license](https://img.shields.io/github/license/bdragon300/pyzkaccess)](https://github.com/bdragon300/pyzkaccess/blob/master/LICENSE)

**PyZKAccess** is a library and command-line interface for working with ZKTeco ZKAccess
C3-100/200/400 access controllers.

This package is Windows-only, but it can be used on *nix systems with [Wine](https://www.winehq.org/).
It built on top of the ZKTeco PULL SDK and fully supports all its features.

This package, once installed, may be used as library for your project or command-line interface.
It's also distributed as a portable Windows executable, created by [PyInstaller](https://pyinstaller.org/en/stable/) with built-in 32-bit Python
interpreter.

[Read documentation](https://bdragon300.github.io/pyzkaccess)

## Features

We support all the features the ZKTeco PULL SDK provides:

- Can be used as a code library or a command-line tool
- Reading and writing the device data tables
- Making queries to device data tables
- CSV format support
- On-board relays control
- Read the realtime events of a particular reader, aux input, door or the whole device
- Manipulation the device parameters such as datetime, network settings, entry modes, backup time, etc.
- Manipulation the door parameters such as smart card modes, intervals, entry modes, etc.
- Restart a device
- Scan the local network for active C3 devices
- Download/upload files from PC to/from a device
- Cancel alarm function
- Reset the device IP address by its MAC address

## Quick start

The quickest way is to use [portable pyzkaccess.exe](https://github.com/bdragon300/pyzkaccess/releases/latest).
It contains the full `pyzkaccess` package with built-in Python and necessary libraries.

*You can also install the package from PyPI (the __32-bit__ Python>=3.8 version is required) `pip install pyzkaccess`*

Run this to setup the environment:

```console
pyzkaccess setup
```

This command will make a quick compatibility check of your system and suggest you to install PULL SDK from the
official ZKTeco site (*you can also specify your own SDK archive or you can install SDK manually, see
[docs](https://bdragon300.github.io/pyzkaccess#installation) for more info*).

![pyzkaccess setup](docs/img/setup_screenshot.png)

All set! Now let's find out what ZKAccess devices are available on the local network:

```console
$ pyzkaccess search_devices
+---------------+-------------------+--------+---------------------+--------------------------+
| ip            | mac               | model  | serial_number       | version                  |
+---------------+-------------------+--------+---------------------+--------------------------+
| 192.168.1.201 | 00:17:61:C3:BA:55 | C3-400 | DGD9190010050345332 | AC Ver 4.3.4 Apr 28 2017 |
+---------------+-------------------+--------+---------------------+--------------------------+
```

Let's enumerate all users registered on a device:

```console
$ pyzkaccess connect 192.168.1.201 table User
+----------+------------+-------+----------+-----+------------+-----------------+
| card     | end_time   | group | password | pin | start_time | super_authorize |
+----------+------------+-------+----------+-----+------------+-----------------+
| 16268812 | 2020-12-01 | 2     | 123456   | 1   | 2020-06-01 | 1               |
| 16268813 |            | 3     | 123451   | 3   |            | 0               |
+----------+------------+-------+----------+-----+------------+-----------------+
```

Or print a particular one:

```console
$ pyzkaccess connect 192.168.1.201 table User where --card=16268812
+----------+------------+-------+----------+-----+------------+-----------------+
| card     | end_time   | group | password | pin | start_time | super_authorize |
+----------+------------+-------+----------+-----+------------+-----------------+
| 16268812 | 2020-12-01 | 2     | 123456   | 1   | 2020-06-01 | 1               |
+----------+------------+-------+----------+-----+------------+-----------------+
```

Adding, updating, or deleting records from a device table:

```console
$ cat users1.csv | pyzkaccess --format=csv connect 192.168.1.201 table User upsert
$ cat users2.csv | pyzkaccess --format=csv connect 192.168.1.201 table User delete
$ pyzkaccess connect 192.168.1.201 table User --card=16268812 delete_all
```

Switching relays and awaiting device events:

```console
$ pyzkaccess connect 192.168.1.201 relays switch_on
$ pyzkaccess connect 192.168.1.201 events --event_type=23 poll
           card door     entry_exit     event_type  pin                     time    verify_mode
       16268813    1              0             23    3      2020-05-09 22:35:55              0
```

Getting and setting parameters:

```console
$ pyzkaccess connect 192.168.1.201 parameters --names=ip_address,serial_number,datetime
+---------------------+---------------+---------------------+
| datetime            | ip_address    | serial_number       |
+---------------------+---------------+---------------------+
| 2020-05-09 22:42:31 | 192.168.1.201 | DGD9190010050345332 |
+---------------------+---------------+---------------------+
$ pyzkaccess connect 192.168.1.201 parameters set --datetime='2020-05-09 22:42:31' --rs232_baud_rate=57600
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/bdragon300/pyzkaccess",
    "name": "pyzkaccess",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "zkaccess, zkteco, c3-100, c3-200, c3-400, access control, door controller, zkaccess control",
    "author": "Igor Derkach",
    "author_email": "gosha753951@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/7b/4e/349639213f93c4d0cbd33e0e009c00ef341c543db8361948f0393a4274a4/pyzkaccess-1.1.tar.gz",
    "platform": null,
    "description": "# PyZKAccess\n\n[![version](https://img.shields.io/pypi/v/pyzkaccess)](https://pypi.org/project/pyzkaccess/)\n[![pyversions](https://img.shields.io/pypi/pyversions/pyzkaccess)](https://pypi.org/project/pyzkaccess/)\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/bdragon300/pyzkaccess/commit.yaml?branch=master)\n[![codecov](https://codecov.io/gh/bdragon300/pyzkaccess/branch/master/graph/badge.svg)](https://codecov.io/gh/bdragon300/pyzkaccess)\n[![license](https://img.shields.io/github/license/bdragon300/pyzkaccess)](https://github.com/bdragon300/pyzkaccess/blob/master/LICENSE)\n\n**PyZKAccess** is a library and command-line interface for working with ZKTeco ZKAccess\nC3-100/200/400 access controllers.\n\nThis package is Windows-only, but it can be used on *nix systems with [Wine](https://www.winehq.org/).\nIt built on top of the ZKTeco PULL SDK and fully supports all its features.\n\nThis package, once installed, may be used as library for your project or command-line interface.\nIt's also distributed as a portable Windows executable, created by [PyInstaller](https://pyinstaller.org/en/stable/) with built-in 32-bit Python\ninterpreter.\n\n[Read documentation](https://bdragon300.github.io/pyzkaccess)\n\n## Features\n\nWe support all the features the ZKTeco PULL SDK provides:\n\n- Can be used as a code library or a command-line tool\n- Reading and writing the device data tables\n- Making queries to device data tables\n- CSV format support\n- On-board relays control\n- Read the realtime events of a particular reader, aux input, door or the whole device\n- Manipulation the device parameters such as datetime, network settings, entry modes, backup time, etc.\n- Manipulation the door parameters such as smart card modes, intervals, entry modes, etc.\n- Restart a device\n- Scan the local network for active C3 devices\n- Download/upload files from PC to/from a device\n- Cancel alarm function\n- Reset the device IP address by its MAC address\n\n## Quick start\n\nThe quickest way is to use [portable pyzkaccess.exe](https://github.com/bdragon300/pyzkaccess/releases/latest).\nIt contains the full `pyzkaccess` package with built-in Python and necessary libraries.\n\n*You can also install the package from PyPI (the __32-bit__ Python>=3.8 version is required) `pip install pyzkaccess`*\n\nRun this to setup the environment:\n\n```console\npyzkaccess setup\n```\n\nThis command will make a quick compatibility check of your system and suggest you to install PULL SDK from the\nofficial ZKTeco site (*you can also specify your own SDK archive or you can install SDK manually, see\n[docs](https://bdragon300.github.io/pyzkaccess#installation) for more info*).\n\n![pyzkaccess setup](docs/img/setup_screenshot.png)\n\nAll set! Now let's find out what ZKAccess devices are available on the local network:\n\n```console\n$ pyzkaccess search_devices\n+---------------+-------------------+--------+---------------------+--------------------------+\n| ip            | mac               | model  | serial_number       | version                  |\n+---------------+-------------------+--------+---------------------+--------------------------+\n| 192.168.1.201 | 00:17:61:C3:BA:55 | C3-400 | DGD9190010050345332 | AC Ver 4.3.4 Apr 28 2017 |\n+---------------+-------------------+--------+---------------------+--------------------------+\n```\n\nLet's enumerate all users registered on a device:\n\n```console\n$ pyzkaccess connect 192.168.1.201 table User\n+----------+------------+-------+----------+-----+------------+-----------------+\n| card     | end_time   | group | password | pin | start_time | super_authorize |\n+----------+------------+-------+----------+-----+------------+-----------------+\n| 16268812 | 2020-12-01 | 2     | 123456   | 1   | 2020-06-01 | 1               |\n| 16268813 |            | 3     | 123451   | 3   |            | 0               |\n+----------+------------+-------+----------+-----+------------+-----------------+\n```\n\nOr print a particular one:\n\n```console\n$ pyzkaccess connect 192.168.1.201 table User where --card=16268812\n+----------+------------+-------+----------+-----+------------+-----------------+\n| card     | end_time   | group | password | pin | start_time | super_authorize |\n+----------+------------+-------+----------+-----+------------+-----------------+\n| 16268812 | 2020-12-01 | 2     | 123456   | 1   | 2020-06-01 | 1               |\n+----------+------------+-------+----------+-----+------------+-----------------+\n```\n\nAdding, updating, or deleting records from a device table:\n\n```console\n$ cat users1.csv | pyzkaccess --format=csv connect 192.168.1.201 table User upsert\n$ cat users2.csv | pyzkaccess --format=csv connect 192.168.1.201 table User delete\n$ pyzkaccess connect 192.168.1.201 table User --card=16268812 delete_all\n```\n\nSwitching relays and awaiting device events:\n\n```console\n$ pyzkaccess connect 192.168.1.201 relays switch_on\n$ pyzkaccess connect 192.168.1.201 events --event_type=23 poll\n           card door     entry_exit     event_type  pin                     time    verify_mode\n       16268813    1              0             23    3      2020-05-09 22:35:55              0\n```\n\nGetting and setting parameters:\n\n```console\n$ pyzkaccess connect 192.168.1.201 parameters --names=ip_address,serial_number,datetime\n+---------------------+---------------+---------------------+\n| datetime            | ip_address    | serial_number       |\n+---------------------+---------------+---------------------+\n| 2020-05-09 22:42:31 | 192.168.1.201 | DGD9190010050345332 |\n+---------------------+---------------+---------------------+\n$ pyzkaccess connect 192.168.1.201 parameters set --datetime='2020-05-09 22:42:31' --rs232_baud_rate=57600\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Library and CLI tool for working with ZKTeco ZKAccess C3-100/200/400 controllers",
    "version": "1.1",
    "project_urls": {
        "Documentation": "https://bdragon300.github.io/pyzkaccess/",
        "Homepage": "https://github.com/bdragon300/pyzkaccess",
        "Repository": "https://github.com/bdragon300/pyzkaccess"
    },
    "split_keywords": [
        "zkaccess",
        " zkteco",
        " c3-100",
        " c3-200",
        " c3-400",
        " access control",
        " door controller",
        " zkaccess control"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1efafaa2bf7b920a57f99b51a804eaf203a5d5135bf25abfc29fdf15702ee55d",
                "md5": "303702eebf908ef0199651bd9efd1a86",
                "sha256": "f77cd17cc469248ba21cbe7159a4a8d7345c6e494bea1ccabdeb29e07f9d959b"
            },
            "downloads": -1,
            "filename": "pyzkaccess-1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "303702eebf908ef0199651bd9efd1a86",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 69505,
            "upload_time": "2024-11-09T09:05:44",
            "upload_time_iso_8601": "2024-11-09T09:05:44.898375Z",
            "url": "https://files.pythonhosted.org/packages/1e/fa/faa2bf7b920a57f99b51a804eaf203a5d5135bf25abfc29fdf15702ee55d/pyzkaccess-1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7b4e349639213f93c4d0cbd33e0e009c00ef341c543db8361948f0393a4274a4",
                "md5": "e1818d01be4793f3bcda372ded1ebe79",
                "sha256": "84b465f5ca3bee4cf7409b5f94c693305f2c4946d730827610237bb5a057a876"
            },
            "downloads": -1,
            "filename": "pyzkaccess-1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "e1818d01be4793f3bcda372ded1ebe79",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 64353,
            "upload_time": "2024-11-09T09:05:45",
            "upload_time_iso_8601": "2024-11-09T09:05:45.878327Z",
            "url": "https://files.pythonhosted.org/packages/7b/4e/349639213f93c4d0cbd33e0e009c00ef341c543db8361948f0393a4274a4/pyzkaccess-1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-09 09:05:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bdragon300",
    "github_project": "pyzkaccess",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyzkaccess"
}
        
Elapsed time: 0.36281s