The official asynchronous Python client for the Olarm Public API.
Project description
OlarmFlowClient
About Olarm
Olarm is a smart security company that transforms existing alarm systems into connected, app-controlled security solutions. Their products work with major alarm panels (Paradox, DSC, Texecom, IDS, Honeywell and more) to provide remote control, real-time alerts, and comprehensive security management from anywhere.
Python Client
This is the official asynchronous Python client for interacting with the Olarm Public API. For more information about our Olarm Public API, please see our official API documentation on our platform.
Features
- Fetch your devices information and state
- Send commands to devices (arm, disarm, stay, sleep, bypass zones, control PGM etc..).
- Subscribe to real-time state changes and events using MQTT
Quick Start
- Sign up at https://login.olarm.com
- Go to API section, generate token
pip install olarmflowclient- Copy this code:
import asyncio
from olarmflowclient import OlarmFlowClient
async def main():
async with OlarmFlowClient("your-token-here") as client:
devices = await client.get_devices()
print(f"You have {len(devices['data'])} devices")
# For non-async code:
import asyncio
result = asyncio.run(main())
Please check the examples for more uses!
Examples
The repository includes example scripts that demonstrate how to use the library:
# Run the fetch devices example
python examples/fetch_devices.py --api-token YOUR_API_TOKEN
# Run the fetch devices example
python examples/fetch_device.py --api-token YOUR_API_TOKEN --device-id DEVICE_ID
# Run the MQTT events listener example
python examples/subscribe_device_mqtt.py --api-token YOUR_API_TOKEN --user-id YOUR_USER_ID
NOTE: you can find your User ID in the Olarm user portal
This library provides asynchronous access using aiohttp for API calls and paho-mqtt for real-time event handling via MQTT.
Development
- Clone the repository.
- Setup venv if necessary
python3 -m venv venv source venv/bin/activate # other shells might be different
- Install dependencies:
pip3 install -r requirements.txt
- Format code and check for linting errors using Ruff:
# Check for issues python3 -m ruff check . # Fix issues and format code python3 -m ruff check . --fix python3 -m ruff format .
Running Tests
The project uses pytest and pytest-asyncio for testing. To run the tests:
-
Make sure you have the testing dependencies installed:
pip install -r requirements.txt
-
Run the tests with pytest:
python -m pytest
Issues / Feature Requests
Please log issues and feature requests in Github issues 👆
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file olarmflowclient-1.0.8.tar.gz.
File metadata
- Download URL: olarmflowclient-1.0.8.tar.gz
- Upload date:
- Size: 20.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f699c5ff38ae533fdc53a9f186f127263f29f6320c61338b3e022980a150447
|
|
| MD5 |
6ff1a9e6dbaf48796bc70eb76f599f76
|
|
| BLAKE2b-256 |
7cf4867ba866023fa99c6c56d2c490f90f89275bd627aabca7ac598a061d9a02
|
File details
Details for the file olarmflowclient-1.0.8-py3-none-any.whl.
File metadata
- Download URL: olarmflowclient-1.0.8-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f418779258d37521ea1ba3f7c0730d34b9731b1ba1eb5a8d673b21c62e3052f8
|
|
| MD5 |
4b7b1c415d4514e1821b472d65a45b78
|
|
| BLAKE2b-256 |
08a4509dd38d6785791e3aca632c99f19d2c3e677f680a5e9cdb20f00650f2ab
|