Kisi


NameKisi JSON
Version 1.3 PyPI version JSON
download
home_pageNone
SummaryA python package for Kisi API
upload_time2024-06-17 04:20:14
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords kisi kisi door kisi kisi lock getkisi kisi modern access control kisi python library
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Kisi

KISI: The go-to access control app.

This Python library provides convenient access to the Kisi API, allowing you to manage groups, calendars, and cameras programmatically.
Kisi is an easy to use cloud based software to manage access to your doors. For physical access use your smartphone's mobile App or secure badges to unlock and open door.


[Kisi Shop](https://www.getkisi.com/pricing)<br>
[About Kisi](https://www.getkisi.com/about)

Request Feature/Suggestion: https://forms.gle/efGD5DuTpWsX96GG7

[![Downloads](https://static.pepy.tech/badge/kisi)](https://pepy.tech/project/kisi)
## Installation
```console
pip install kisi
```
Kisi supports Python 3+.

## Usage
#### Default
```python
import kisi
```

#### Authentication

Before making requests, you need to authenticate using your Kisi API key. Initialize the `Connect` class with your API key:

```python
from kisi import Connect

api_key = 'your_kisi_api_key'
ks = Connect(api_key)
```
OR
```python
import kisi 

api_key = 'your_kisi_api_key'
ks = kisi.Connect(api_key)
```
Generate Key from [Kisi API](https://web.kisi.io/user/api)

### Users
#### Fetch Users
```python
# Fetch users with optional parameters
users = ks.fetch_users(confirmed=True, group_id=1, limit=20, offset=0)
print(users)
```

#### Create User
```python
# Create a new user
new_user = ks.create_user(name='John Doe', email='john@example.com', password='securepassword')
print(new_user)
```
#### Fetch User
```python
# Fetch a specific user by user_id
user = ks.fetch_user(user_id=123)
print(user)
```
#### Update User
```python
# Update user details
updated_user = ks.update_user(user_id=123, name='John Doe Jr.')
print(updated_user)
```
#### Delete User
```python
# Delete a user by user_id
ks.delete_user(user_id=123)
```

#### Fetch Current User
```python
# Fetch details of the current authenticated user
current_user = ks.fetch_current_user()
print(current_user)
```

#### Update Current User
```python
# Update details of the current authenticated user
updated_current_user = ks.update_current_user(name='Jane Doe')
print(updated_current_user)
```

#### Delete Current User
```python
# Delete the current authenticated user
ks.delete_current_user()
```

#### Register User
```python
# Register a new user
register_user = ks.register_user(name='Jane Doe', email='jane@example.com', password='securepassword', terms_and_conditions=True)
print(register_user)
```
### Groups

#### Fetch Groups
```python
# Fetch groups with optional parameters
groups = ks.fetch_groups(limit=10, offset=0)
print(groups)
```

#### Create Group
```python
# Create a new group
new_group = ks.create_group(name='Engineering Team')
print(new_group)
```

#### Fetch Group
```python
# Fetch a specific group by group_id
group = ks.fetch_group(group_id=1)
print(group)
```

#### Update Group
```python
# Update group details
updated_group = ks.update_group(group_id=1, name='DevOps Team')
print(updated_group)
```

#### Delete Group
```python
# Delete a group by group_id
ks.delete_group(group_id=1)
```


### Cards

Fetch Cards
```python
# Fetch cards with optional parameters
cards = ks.fetch_cards(limit=10, offset=0)
print(cards)
```
#### Create Card
```python
# Create a new card
new_card = ks.create_card(token='token_value', card_type='rfid')
print(new_card)
```
#### Fetch Card
```python
# Fetch a specific card by card_id
card = ks.fetch_card(cardIdentifier='card_id_value')
print(card)
```
#### Update Card
```python
# Update card details
updated_card = ks.update_card(card_id='card_id_value', two_factor_pin='1234')
print(updated_card)
```
#### Delete Card
```python
# Delete a card by card_id
ks.delete_card(card_id='card_id_value')
```
### Locks

#### Fetch Locks
```python
# Fetch locks with optional parameters
locks = ks.fetch_locks(limit=10, offset=0)
print(locks)
```
#### Create Lock
```python
# Create a new lock
new_lock = ks.create_lock(name='Main Entrance', place_id=1)
print(new_lock)
```
#### Fetch Lock
```python
# Fetch a specific lock by lock_id
lock = ks.fetch_lock(lock_id=1)
print(lock)
```
#### Update Lock
```python
# Update lock details
updated_lock = ks.update_lock(lock_id=1, name='Back Door')
print(updated_lock)
```
#### Delete Lock
```python
# Delete a lock by lock_id
ks.delete_lock(lock_id=1)
```
### Cameras

#### Fetch Cameras
```python
# Fetch cameras with optional parameters
cameras = ks.fetch_cameras(limit=10, place_id=1)
print(cameras)
```
#### Create Camera
```python
# Create a new camera
new_camera = ks.create_camera(lock_id=1, remote_id='camera_001', name='Main Lobby Camera')
print(new_camera)
```
#### Fetch Camera
```python
# Fetch a specific camera by camera_id
camera = ks.fetch_camera(camera_id=1)
print(camera)
```
#### Update Camera
```python
# Update camera details
updated_camera = ks.update_camera(camera_id=1, name='Main Lobby Camera New')
print(updated_camera)
```
#### Delete Camera
```python
# Delete a camera by camera_id
ks.delete_camera(camera_id=1)
```
### Calendars

#### Fetch Summary
```python
# Fetch calendar summary with required parameters
summary = ks.fetch_summary(around='2024-06-17', consequence='consequence_value')
print(summary)### Groups
```

#### Fetching Groups
```python
groups = ks.group.fetch_groups()
print(groups)
```

#### Creating a Group

```python
new_group = ks.group.create_group(name='Engineering Team', description='Access to engineering floors')
print(new_group)
```

#### Fetching a Group

```python
group_info = ks.group.fetch_group(group_id=123)
print(group_info)
```

#### Updating a Group

```python
update_result = ks.group.update_group(group_id=123, name='New Name', description='New Description')
print(update_result)
```

#### Deleting a Group

```python
delete_result = ks.group.delete_group(group_id=123)
print(delete_result)
```

### Calendars

#### Fetching Calendar Summary

```python
summary = ks.calendar.fetch_summary(around='2024-06-14', consequence='upcoming')
print(summary)
```

### Cameras

#### Fetching Cameras

```python
cameras = ks.camera.fetch_cameras()
print(cameras)
```

#### Creating a Camera

```python
new_camera = ks.camera.create_camera(lock_id=456, remote_id='abc123', name='Office Camera')
print(new_camera)
```

#### Fetching a Camera

```python
camera_info = ks.camera.fetch_camera(camera_id=789)
print(camera_info)
```

#### Updating a Camera

```python
update_status = ks.camera.update_camera(camera_id=789, name='Updated Camera')
print(update_status)
```

#### Deleting a Camera

```python
delete_status = ks.camera.delete_camera(camera_id=789)
print(delete_status)
```

## License

This project is licensed under the MIT License - see the LICENSE file for details.
```

This `README.md` provides a structured guide to using your library, including installation instructions, usage examples for each API action (groups, calendars, cameras), and licensing information. Adjust the examples as needed to match the specifics of your API client implementation and usage scenarios.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "Kisi",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "Kisi, KISI door, KISI, Kisi lock, getkisi, Kisi modern access control, Kisi python library",
    "author": null,
    "author_email": "Ankush Kumar <ankush1611996@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/40/23/e1ac5018c5a86d4dbb1788cc759dc9fc7e4ce4c4a4f8468f33f265d14063/kisi-1.3.tar.gz",
    "platform": null,
    "description": "# Kisi\n\nKISI: The go-to access control app.\n\nThis Python library provides convenient access to the Kisi API, allowing you to manage groups, calendars, and cameras programmatically.\nKisi is an easy to use cloud based software to manage access to your doors. For physical access use your smartphone's mobile App or secure badges to unlock and open door.\n\n\n[Kisi Shop](https://www.getkisi.com/pricing)<br>\n[About Kisi](https://www.getkisi.com/about)\n\nRequest Feature/Suggestion: https://forms.gle/efGD5DuTpWsX96GG7\n\n[![Downloads](https://static.pepy.tech/badge/kisi)](https://pepy.tech/project/kisi)\n## Installation\n```console\npip install kisi\n```\nKisi supports Python 3+.\n\n## Usage\n#### Default\n```python\nimport kisi\n```\n\n#### Authentication\n\nBefore making requests, you need to authenticate using your Kisi API key. Initialize the `Connect` class with your API key:\n\n```python\nfrom kisi import Connect\n\napi_key = 'your_kisi_api_key'\nks = Connect(api_key)\n```\nOR\n```python\nimport kisi \n\napi_key = 'your_kisi_api_key'\nks = kisi.Connect(api_key)\n```\nGenerate Key from [Kisi API](https://web.kisi.io/user/api)\n\n### Users\n#### Fetch Users\n```python\n# Fetch users with optional parameters\nusers = ks.fetch_users(confirmed=True, group_id=1, limit=20, offset=0)\nprint(users)\n```\n\n#### Create User\n```python\n# Create a new user\nnew_user = ks.create_user(name='John Doe', email='john@example.com', password='securepassword')\nprint(new_user)\n```\n#### Fetch User\n```python\n# Fetch a specific user by user_id\nuser = ks.fetch_user(user_id=123)\nprint(user)\n```\n#### Update User\n```python\n# Update user details\nupdated_user = ks.update_user(user_id=123, name='John Doe Jr.')\nprint(updated_user)\n```\n#### Delete User\n```python\n# Delete a user by user_id\nks.delete_user(user_id=123)\n```\n\n#### Fetch Current User\n```python\n# Fetch details of the current authenticated user\ncurrent_user = ks.fetch_current_user()\nprint(current_user)\n```\n\n#### Update Current User\n```python\n# Update details of the current authenticated user\nupdated_current_user = ks.update_current_user(name='Jane Doe')\nprint(updated_current_user)\n```\n\n#### Delete Current User\n```python\n# Delete the current authenticated user\nks.delete_current_user()\n```\n\n#### Register User\n```python\n# Register a new user\nregister_user = ks.register_user(name='Jane Doe', email='jane@example.com', password='securepassword', terms_and_conditions=True)\nprint(register_user)\n```\n### Groups\n\n#### Fetch Groups\n```python\n# Fetch groups with optional parameters\ngroups = ks.fetch_groups(limit=10, offset=0)\nprint(groups)\n```\n\n#### Create Group\n```python\n# Create a new group\nnew_group = ks.create_group(name='Engineering Team')\nprint(new_group)\n```\n\n#### Fetch Group\n```python\n# Fetch a specific group by group_id\ngroup = ks.fetch_group(group_id=1)\nprint(group)\n```\n\n#### Update Group\n```python\n# Update group details\nupdated_group = ks.update_group(group_id=1, name='DevOps Team')\nprint(updated_group)\n```\n\n#### Delete Group\n```python\n# Delete a group by group_id\nks.delete_group(group_id=1)\n```\n\n\n### Cards\n\nFetch Cards\n```python\n# Fetch cards with optional parameters\ncards = ks.fetch_cards(limit=10, offset=0)\nprint(cards)\n```\n#### Create Card\n```python\n# Create a new card\nnew_card = ks.create_card(token='token_value', card_type='rfid')\nprint(new_card)\n```\n#### Fetch Card\n```python\n# Fetch a specific card by card_id\ncard = ks.fetch_card(cardIdentifier='card_id_value')\nprint(card)\n```\n#### Update Card\n```python\n# Update card details\nupdated_card = ks.update_card(card_id='card_id_value', two_factor_pin='1234')\nprint(updated_card)\n```\n#### Delete Card\n```python\n# Delete a card by card_id\nks.delete_card(card_id='card_id_value')\n```\n### Locks\n\n#### Fetch Locks\n```python\n# Fetch locks with optional parameters\nlocks = ks.fetch_locks(limit=10, offset=0)\nprint(locks)\n```\n#### Create Lock\n```python\n# Create a new lock\nnew_lock = ks.create_lock(name='Main Entrance', place_id=1)\nprint(new_lock)\n```\n#### Fetch Lock\n```python\n# Fetch a specific lock by lock_id\nlock = ks.fetch_lock(lock_id=1)\nprint(lock)\n```\n#### Update Lock\n```python\n# Update lock details\nupdated_lock = ks.update_lock(lock_id=1, name='Back Door')\nprint(updated_lock)\n```\n#### Delete Lock\n```python\n# Delete a lock by lock_id\nks.delete_lock(lock_id=1)\n```\n### Cameras\n\n#### Fetch Cameras\n```python\n# Fetch cameras with optional parameters\ncameras = ks.fetch_cameras(limit=10, place_id=1)\nprint(cameras)\n```\n#### Create Camera\n```python\n# Create a new camera\nnew_camera = ks.create_camera(lock_id=1, remote_id='camera_001', name='Main Lobby Camera')\nprint(new_camera)\n```\n#### Fetch Camera\n```python\n# Fetch a specific camera by camera_id\ncamera = ks.fetch_camera(camera_id=1)\nprint(camera)\n```\n#### Update Camera\n```python\n# Update camera details\nupdated_camera = ks.update_camera(camera_id=1, name='Main Lobby Camera New')\nprint(updated_camera)\n```\n#### Delete Camera\n```python\n# Delete a camera by camera_id\nks.delete_camera(camera_id=1)\n```\n### Calendars\n\n#### Fetch Summary\n```python\n# Fetch calendar summary with required parameters\nsummary = ks.fetch_summary(around='2024-06-17', consequence='consequence_value')\nprint(summary)### Groups\n```\n\n#### Fetching Groups\n```python\ngroups = ks.group.fetch_groups()\nprint(groups)\n```\n\n#### Creating a Group\n\n```python\nnew_group = ks.group.create_group(name='Engineering Team', description='Access to engineering floors')\nprint(new_group)\n```\n\n#### Fetching a Group\n\n```python\ngroup_info = ks.group.fetch_group(group_id=123)\nprint(group_info)\n```\n\n#### Updating a Group\n\n```python\nupdate_result = ks.group.update_group(group_id=123, name='New Name', description='New Description')\nprint(update_result)\n```\n\n#### Deleting a Group\n\n```python\ndelete_result = ks.group.delete_group(group_id=123)\nprint(delete_result)\n```\n\n### Calendars\n\n#### Fetching Calendar Summary\n\n```python\nsummary = ks.calendar.fetch_summary(around='2024-06-14', consequence='upcoming')\nprint(summary)\n```\n\n### Cameras\n\n#### Fetching Cameras\n\n```python\ncameras = ks.camera.fetch_cameras()\nprint(cameras)\n```\n\n#### Creating a Camera\n\n```python\nnew_camera = ks.camera.create_camera(lock_id=456, remote_id='abc123', name='Office Camera')\nprint(new_camera)\n```\n\n#### Fetching a Camera\n\n```python\ncamera_info = ks.camera.fetch_camera(camera_id=789)\nprint(camera_info)\n```\n\n#### Updating a Camera\n\n```python\nupdate_status = ks.camera.update_camera(camera_id=789, name='Updated Camera')\nprint(update_status)\n```\n\n#### Deleting a Camera\n\n```python\ndelete_status = ks.camera.delete_camera(camera_id=789)\nprint(delete_status)\n```\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n```\n\nThis `README.md` provides a structured guide to using your library, including installation instructions, usage examples for each API action (groups, calendars, cameras), and licensing information. Adjust the examples as needed to match the specifics of your API client implementation and usage scenarios.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A python package for Kisi API",
    "version": "1.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/AnkushRozra/Kisi/issues",
        "Homepage": "https://github.com/AnkushRozra/Kisi"
    },
    "split_keywords": [
        "kisi",
        " kisi door",
        " kisi",
        " kisi lock",
        " getkisi",
        " kisi modern access control",
        " kisi python library"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7779563de0641d271edb514eefc834a97f53cf336fa90efc5073b13b5cc908ba",
                "md5": "52b6d8ed93d98dcf7293ee013cf745e2",
                "sha256": "0b140d65017b43121fe20ac9d787e4fa895ccad5229b1d00170ea73d57c73f2d"
            },
            "downloads": -1,
            "filename": "Kisi-1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "52b6d8ed93d98dcf7293ee013cf745e2",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7540,
            "upload_time": "2024-06-17T04:20:12",
            "upload_time_iso_8601": "2024-06-17T04:20:12.482779Z",
            "url": "https://files.pythonhosted.org/packages/77/79/563de0641d271edb514eefc834a97f53cf336fa90efc5073b13b5cc908ba/Kisi-1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4023e1ac5018c5a86d4dbb1788cc759dc9fc7e4ce4c4a4f8468f33f265d14063",
                "md5": "bcce5691f3164f027170f25422029a45",
                "sha256": "01cc6a3036a11436018d438908ce025fae2ad82a06accb16c6db204ff77b25d4"
            },
            "downloads": -1,
            "filename": "kisi-1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "bcce5691f3164f027170f25422029a45",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 8160,
            "upload_time": "2024-06-17T04:20:14",
            "upload_time_iso_8601": "2024-06-17T04:20:14.289083Z",
            "url": "https://files.pythonhosted.org/packages/40/23/e1ac5018c5a86d4dbb1788cc759dc9fc7e4ce4c4a4f8468f33f265d14063/kisi-1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-17 04:20:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "AnkushRozra",
    "github_project": "Kisi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "kisi"
}
        
Elapsed time: 0.43285s