Library for communicating with Rajant Breadcrumb devices using the BCAPI implemented in Python3
Project description
rajant-api
A Python library that provides an interface for developers to communicate with Rajant Breadcrumb radios. The rajant-api library allows users to retrieve the state and configuration of these radios and to make changes to the configuration.
Installation
The library can be installed via pip:
pip install rajant-api
Usage
Here's a basic example of using the library to connect to a radio, authenticate and retrieve its state:
from rajant_api import Breadcrumb
bc = Breadcrumb(host="192.168.0.20",
port=2300,
role="VIEW",
password="view-password")
if bc.authenticate():
print(bc.get_state())
Breadcrumb class
The main class exposed by this library is Breadcrumb. It holds the state and functionality for connecting, authenticating, and interacting with a host via a specific role. Here are the available methods:
reachable()
Checks if the host associated with this Breadcrumb instance is reachable.
get_message()
Retrieves and parses a message from the host associated with this Breadcrumb instance.
build_message()
Constructs a new BCMessage object with a sequence number.
send_message()
Sends a message to the host associated with this Breadcrumb instance.
setup_connection_socket()
Sets up a secure socket connection to the host associated with this Breadcrumb instance.
prepare_login_message()
Prepares a login message to authenticate with the host.
authenticate()
Authenticates with the host associated with this Breadcrumb instance.
get_state()
Retrieves the state from the host associated with this Breadcrumb instance.
get_state_filter()
Retrieves the state from the host associated with this Breadcrumb instance, filtered by the provided filters.
Contributing
Contributions are welcome! Please open an issue if you encounter any problems or have suggestions for improvements.
License
Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0)
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
File details
Details for the file rajant_api-0.1.1.tar.gz
.
File metadata
- Download URL: rajant_api-0.1.1.tar.gz
- Upload date:
- Size: 39.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f4c79ed336697e714ae8353302b08ecadee64402d06a6d7ea12425c0f752224 |
|
MD5 | cd82abbc95cdd277d1a0f56d81b27533 |
|
BLAKE2b-256 | 90e2b1b4903a444dd4ee6c13d24446ffcdc64770ee2dded83eec286c79f8ed1c |
File details
Details for the file rajant_api-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: rajant_api-0.1.1-py3-none-any.whl
- Upload date:
- Size: 53.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c28d8cbf9242ef12fccecdeea7909b4a70da980cf374c7c1eef7343694c7e666 |
|
MD5 | 9c5a20577623c4472c3b336a142cba54 |
|
BLAKE2b-256 | 03b5010974052910f656908ad956f0c6e9772fdbcd95dbfc8cfb4c58f52daaee |