Skip to main content

No project description provided

Project description

ZK Soap Python Library

A Python Library For Manage Data From Fingerprint Machine with SOAP Protocol

Features

  • Get Attendance Log with DateRange
  • Get User Information

Requirements

  • Python version 3.6 or higher
  • Fingerprint Machine Support ZK Web Service

Easy Installation

Install with pip

To install with pip, simply require the latest version of this package.

python -m pip install zksoap

Quick Start

Just pass your IP, Port and Comkey :

  • Get Attendance
# reference the ZK Soap PHP namespace
from zksoap import Fingerprint

# initial
machine = Fingerprint('192.168.1.175', '80', '123456')

# get machine status
print("Machine Status : "+machine.getStatus()) # connected | disconnected

# get all log data
print(machine.getAttendance()) # return List of Attendance Log

# get all log data with date
print(machine.getAttendance('all', '2022-05-01')) # return List of Attendance Log

# get all log data with date range
print(machine.getAttendance('all', '2022-05-01', '2022-05-10')) # return List of Attendance Log

# get specific pin log data
print(machine.getAttendance('1')) # return List of Attendance Log
# OR List
print(machine.getAttendance(['1', '2'])) # return List of Attendance Log

# get exported json format
user_attendance_data = machine.getAttendance()
json_data = json.dumps(user_attendance_data, cls=UserAttendanceEncoder, indent=4)
file_path = 'user_attendance2.json'
with open(file_path, 'w') as file:
    file.write(json_data)

print(f"JSON data for user attendance saved to {file_path}")
  • Get User Information
# reference the ZK Soap PHP namespace
from zksoap import Fingerprint

# initial
machine = Fingerprint('192.168.1.175', '80', '123456')

# get machine status
print("Machine Status : "+machine.getStatus()) # connected | disconnected

# get all user data
print(machine.getUserInfo()) # return List of User Info Data

# get specific pin user data
print(machine.getUserInfo('1')) # return List of User Info Data
# OR List
print(machine.getUserInfo(['1', '2'])) # return List of User Info Data

# get exported json format
decoded_data = machine.getUserInfo()
data_dict = {"data": decoded_data}
json_data = json.dumps(data_dict, indent=4, cls=UserInfoEncoder)
file_path = 'user_info2.json'
with open(file_path, 'w') as file:
    file.write(json_data)

print(f"JSON data saved to {file_path}")

Changelog

  • Uploading to pypi

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zksoap-0.0.5.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zksoap-0.0.5-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file zksoap-0.0.5.tar.gz.

File metadata

  • Download URL: zksoap-0.0.5.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for zksoap-0.0.5.tar.gz
Algorithm Hash digest
SHA256 ca20e18bcbedd4960013461084ef6f2732d60da15307a556c3c4120c2f559372
MD5 4046747082a5a442e7b64a7a44f171d5
BLAKE2b-256 248ca201353cf52514f09007e1bc3e5e013181ebf4ce96619bfe90d70ce021fe

See more details on using hashes here.

File details

Details for the file zksoap-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: zksoap-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.18

File hashes

Hashes for zksoap-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c52aad034d6c66923d5106599e2931d9e7d698d3dabcc9f3e69081ee96c388ae
MD5 1c39d591b7e33c530da11be69bfb7711
BLAKE2b-256 9f597eb4fc3140b5de5093b787a66d99fb4d4039c28a78d553e9850fd09059c2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page