aioptdevices
Easily fetch your PTDevice information from the PTDevices servers with the aioptdevices package.
Table of Contents
About This Project
This package allows polling the PTDevices servers for device data via the token API. See Token API Docs. It was developed for use in the PTDevices Home Assistant Integration but can be used for other projects. It offers both a command line tool and a library.
Getting Started
Prerequisites
- Have Python 3.12 or later installed.
- Have a PTDevices account and an API token. You can request a free API token by creating a support ticket at https://support.paremtech.com/portal/en/newticket. To help streamline the process, be sure to include the email address associated with your PTDevices account.
Installation
PyPi
python3 -m pip install aioptdevices
Manual Setup
-
Clone the repository.
git clone https://github.com/ParemTech-Inc/aioptdevices.git
-
Install Python Packages and setup the environment.
Linux venv Setup
bash ./setup.sh source venv/bin/activate
Windows venv Setup
.\setup.ps1 .\venv\Scripts\activate
Installing Globally
Linux and Windows
python3 -m pip install .
Usage
As a Command Line Tool
Make sure to set up and activate the venv or install the package globally before trying to use it, refer to Manual setup step 2. If you installed the package from PyPi, you can go straight to Command usage.
Command usage
usage: aioptdevices [-h] [-U URL] [-D] deviceID authToken
positional arguments:
deviceID
authToken
options:
-h, --help show this help message and exit
-U URL, --url URL
-D, --debug
As a Library
See the examples folder for usage as a library.
Contributing
If you have an idea to improve this package, please fork the repo and create a pull request. Or, you can simply open an issue.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Create ./tests/secret.py with
"""Secret Parameters."""
TOKEN: str = "Your API Token"
DEVICE_ID: str = "Your Device ID"
- Run pytest and verify that all tests pass
- Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the GNU GPL-3.0 License. See LICENSE for more information.
Contact
Matthew Gibson - @frogman85978 - matthew.gibzon@gmail.com
ParemTech Inc. - @ParemTech-Inc - info@paremtech.com
Project Link: https://github.com/ParemTech-Inc/aioptdevices
Acknowledgments
- Othneil Drew (@othneildrew) creator of the Best-README-Template
- Robert Svensson (@Kane610) creator of the aiounifi package
Metadata
Release files for aioptdevices 2026.7.1
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 |
|---|---|---|---|---|
| aioptdevices-2026.7.1.tar.gz | 26.6 kB | With provenance | Details for aioptdevices-2026.7.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aioptdevices-2026.7.1-py3-none-any.whl | Python 3 | none | any | Details for aioptdevices-2026.7.1-py3-none-any.whl |
Total release size: 48.2 kB
Release files / aioptdevices-2026.7.1.tar.gz
| Download URL | aioptdevices-2026.7.1.tar.gz |
|---|---|
| Size | 26.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed67c115cb1b3ef239979213fd179848000485a257e8f3355a38b14623daefab
|
|
BLAKE2b-256 checksum How to use checksums |
fe48497130d123173e6a9a60ff0a77e0705c4a2d8405098682b02e767df8b3e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / aioptdevices-2026.7.1-py3-none-any.whl
| Download URL | aioptdevices-2026.7.1-py3-none-any.whl |
|---|---|
| Size | 21.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a0aa5eb59b1cb5f12481ee51f2c85898815a50bfa378829efa929ce6da8add42
|
|
BLAKE2b-256 checksum How to use checksums |
0db8d88f1c2b71cbb43d39a67af0eb17f44b9418a915ab04a9736d537316a3a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logSecurity for aioptdevices 2026.7.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for aioptdevices-2026.7.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logA 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.