Library Documentation
Simple API that provides "easy" access to INIM web services
Usage
python3 -m venv venv
source venv/bin/activate.fish
python3 -m pip install aiohttp==3.9.5
# python3 -m pip install python-dotenv==1.0.1
# deprecated:
#python3 -m pip install --index-url https://test.pypi.org/simple/ pyinim-nidble==0.0.x
# python3 -m pip uninstall pyinim-nidble
python3 -m pip install pyinim==0.0.x
python3 -m pip uninstall pyinim
Development
Environment preparation
python3 -m pip install pipenv
pipenv install --dev #this generate Pipfile.lock
Running
export PYTHONPATH="${PYTHONPATH}:$PWD" # or set --export PYTHONPATH ./src
pipenv run python src/pyinim/examples/poc.py
Adding new lib
pipenv install python-dotenv
Building the package
Environment preparation
pip3 install --upgrade setuptools
# NO:
pip install --upgrade build
# Yes:
python3 -m pip install build # see https://stackoverflow.com/questions/73987135/python3-m-build-gives-modulenotfounderror-no-module-named-pathlib2
Publishing Pipenv way
pipenv run pip install --upgrade build
pipenv run python -m build --wheel
Publishing Classical way
pip install --upgrade build
python -m build --wheel # for only wheel (this not produce tarball)
python3 -m build # for wheel and tarball
Publishing
python3 -m pip install --upgrade twine
python3 -m twine upload --repository testpypi dist/*
Publishing & Publishing
rm -rf ./dist && python3 -m build && python3 -m twine upload --repository testpypi dist/*
Some useful resources
Disclaimer
Pyinim is an unofficial module for achieving interoperability with Inim RESTful API.
Author is in no way affiliated with Inim.
All the api requests used within the library are available and published on the internet (examples linked above) and this module is purely just a wrapper around those https requests.
Author does not guarantee functionality of this library and is not responsible for any damage.
All product names, trademarks and registered trademarks in this repository, are property of their respective owners.
Inim CLI
You can use this small script to interact with your InimAlarm and list various components.
Install the CLI
git clone https://github.com/nidble/pyinim
cd pyinim
python3 -m pip install pipenv
pipenv install --dev
export PYTHONPATH="${PYTHONPATH}:$PWD/src" # or set --export PYTHONPATH ./src
pipenv run python tools/inim_cli.py
Read the Help for the usage:
❯ pipenv run python tools/inim_cli.py --help
usage: inim_cli.py [-h] [--username USERNAME] [--password PASSWORD] [--client_id CLIENT_ID] --list {deviceid,areas,scenarios} [--deviceid DEVICEID] [--dump filename]
options:
-h, --help show this help message and exit
--username USERNAME Inim User Name
--password PASSWORD Inim Password
--client_id CLIENT_ID
Inim Client ID
--list {deviceid,areas,scenarios}
Specify whether to list 'deviceid', 'areas', or 'scenarios'
--deviceid DEVICEID Optional device ID to filter results for 'areas' and 'scenarios'
--dump filename Dump the raw JSON response to the specified file
Discover your devices ID
pipenv run python tools/inim_cli.py --username <YOUR_INIM_USERNAME> --password <YOUR_INIM_PASSWORD> --list deviceid
Discover your Areas ID
pipenv run python tools/inim_cli.py --username <YOUR_INIM_USERNAME> --password <YOUR_INIM_PASSWORD> --list areas
Discover your Scenarios ID
pipenv run python tools/inim_cli.py --username <YOUR_INIM_USERNAME> --password <YOUR_INIM_PASSWORD> --list scenarios
TroubleShooting Info and Debug
To debug your Alarm you can dump the status via --dump
pipenv run python tools/inim_cli.py --username <YOUR_INIM_USERNAME> --password <YOUR_INIM_PASSWORD> --dump=debug.json
Metadata
Release files for pyinim 0.0.20
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 |
|---|---|---|---|---|
| pyinim-0.0.20.tar.gz | 21.4 kB | Without provenance | Details for pyinim-0.0.20.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyinim-0.0.20-py3-none-any.whl | Python 3 | none | any | Details for pyinim-0.0.20-py3-none-any.whl |
Total release size: 42.6 kB
Release files / pyinim-0.0.20.tar.gz
| Download URL | pyinim-0.0.20.tar.gz |
|---|---|
| Size | 21.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27f5c3aef7ed94dbfca6b619145d17b00bd97885cd1b616aeae8fb3182a11fe6
|
|
BLAKE2b-256 checksum How to use checksums |
5599c317934a783a1043a26445b9180a4c14fa9f87533ce9fec7b34c01b6a986
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / pyinim-0.0.20-py3-none-any.whl
| Download URL | pyinim-0.0.20-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
87d315e8ca3898134f78787b62ad5246e21bd917bdfeca127c6e438a22085097
|
|
BLAKE2b-256 checksum How to use checksums |
a4ad4e8babb963d9705cc1aa8e06657b3951558d6a8db0921d5519a0f7cd990b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for pyinim 0.0.20
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.