IDSecure Python SDK & CLI
A Python client and CLI tool for interacting with the IDSecure API. This project provides a simple and intuitive interface to manage users, devices, and view logs within your IDSecure instance.
Installation
Install via pip:
pip install idsecure-cli
Or install from source:
git clone https://github.com/tsuriu/idsecure-cli.git
cd idsecure-cli
pip install .
CLI Usage
The package includes a command-line interface idsecure-cli.
Configuration
You can provide credentials via flags or environment variables:
--url/IDSECURE_BASE_URL--user/IDSECURE_USERNAME--password/IDSECURE_PASSWORD
Commands
# List all users
idsecure-cli list-users
# List all devices
idsecure-cli list-devices
# Get details for a specific user
idsecure-cli get-user --id 123
# Delete a user
idsecure-cli delete-user --id 123
Visitor Management
# List all visitors
idsecure-cli list-visitors
# Create a new visitor
idsecure-cli create-visitor --name "John Doe" --date "01/01/2026"
# Delete a visitor
idsecure-cli delete-visitor --id 456
Group & Department Management
# List all groups
idsecure-cli list-groups
# List all departments
idsecure-cli list-departments
# Create a new group
idsecure-cli create-group --name "Engineering" --user-id 123 --user-id 456
# Create a new department
idsecure-cli create-department --name "R&D"
# Update a group
idsecure-cli update-group --id 789 --name "Hardware Engineering"
# Delete a group
idsecure-cli delete-group --id 789
SSL Verification
If you are using a local instance with a self-signed certificate, you can disable SSL verification using the --no-verify flag:
idsecure-cli --no-verify list-users
SDK Usage
You can also use the IDSecureClient directly in your Python scripts.
Initialization
import asyncio
from idsecure_cli import IDSecureClient
async def main():
# Initialize the client
client = IDSecureClient(
base_url="https://your-idsecure-instance.com",
username="your-username",
password="your-password"
)
# All client methods are asynchronous
async with client:
users = await client.list_users()
print(f"Total users: {users.get('recordsTotal')}")
if __name__ == "__main__":
asyncio.run(main())
SSL Verification (SDK)
To disable SSL verification in the SDK:
client = IDSecureClient(..., verify=False)
Examples
Check the examples/ directory for more usage examples:
example_usage.py: Demonstrates listing users, devices, logs, and departments.
To run the example script with self-signed certificates:
IDSECURE_VERIFY=false python3 examples/example_usage.py
Requirements
- Python 3.8+
httpxclickloguru
License
This project is licensed under the MIT License.
Metadata
Release files for idsecure-cli 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| idsecure_cli-0.1.9.tar.gz | 10.5 kB | Without provenance | Details for idsecure_cli-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| idsecure_cli-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for idsecure_cli-0.1.9-py3-none-any.whl |
Total release size: 20.6 kB
Release files / idsecure_cli-0.1.9.tar.gz
| Download URL | idsecure_cli-0.1.9.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
90f5f68a724412ea423589efc91c84edac6388792e726c990d30532ae4e4aca3
|
|
BLAKE2b-256 checksum How to use checksums |
9e9cc24d545fe73f4d732be3f3398404e920319e8b838f6dad02fdae016b1ab3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Release files / idsecure_cli-0.1.9-py3-none-any.whl
| Download URL | idsecure_cli-0.1.9-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5e540e9b853b6db9f40d084933ec842a49c58e2329a4a3f24bf64a77079fb286
|
|
BLAKE2b-256 checksum How to use checksums |
d0352e5558632b56b3a029032fb6c3cfadc7dcf43f9304dcc8d415d2245e848e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.2
|
Security for idsecure-cli 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.