semvec/pypi-packages huggingface dataset:
TrboDataSvc 0.0.8
A collection of libraries to handle communication and interpretation of MotoTRBO Data Services (ARS, TMS, LRRP, Job Tickets, etc)
Requires Python: >=3.6

# trbo-data-svc

This is a collection of multiple different libraries and programs that interface with MotoTRBO digital radios.

Currently supported:

- ARS
- TMS
- LRRP (50%)

In the works:

- Job Tickets
- Impres OTA Battery Management (low priority, weird format)

## Basic Layout

Most of the basic data services can be set up as such:

    from TrboDataSvc import ars
    def callback(rid, data):
        print("Got a message from radio id {}".format(rid))
        return True
    listener = ars.ARS()
    listener.register_callback(callback)
    listener.listen()

That's all you need!

## Further Documentation

### The callbacks

The callback function definition should be in the following format:

    def callback_name(rid, data)

Obviously the name can be whatever you want, but the arguments must be rid and data, in that order. The type of `data` and what it passes will differ between the different functions. It can be either an int, string, or dictionary.

Additionally, the callback must return True on successful processing and False on unsuccessful processing. Returning true means an ACK gets sent to the radio when necessary. Examples of failed processing might be an exception, upstream server offline, etc.

### Listen function

The listen function creates a separate process to process the incoming data. This creates a new Process for each listener. This shouldn't be a huge deal but on embedded systems it might be something to consider as a new Process creates an entirely new memory space.

## Other tools

The `util` class offers a few utilities such as `id2ip` and `ip2id` that convert the OTA IP to a radio ID. In case you are not familiar, the DMR radio ID gets mapped to an IP address for data transmission over the air. These functions let you easily convert between OTA IPs and RIDs.
myproj 0.0.1
A small example package
Requires Python: >=3.6

# The Kmeans unsupervised clustering package

# Contents
The package will automatically download the iris data collected from UCI. The dataset contains three classes of flowers, and the clustering algorithm is to 

# FAQ

## How do I install and use a package in Development Mode?

[Development Mode](https://packaging.python.org/distributing/#working-in-development-mode) installs the package in "editable" mode so that you can change the source for your package in the actual source directory and consuming Python scripts/applications will see your edits the next time they run. To install your package in Development Mode run `install-package-devmode.sh`.
Note that this script also runs `pip show boopackage` to confirm that the package `boopackage` is installed.

## How do I Package/Bundle/Zip/Prepare my source code into a distributable package that I can distribute to others to use in their own Python apps?

Run `build-package.sh` to prepare your package source code for distribution. This will deploy a distributable Python package into `package-project/src/dist/boopackage-1.0.tar.gz`.

## How do other users install the package once it's built?

Other users can run `pip install boopackage-1.0.tar.gz` to install your package. See `install-built-package.sh` as an example. To use the package once it's installed see `test-consume-package.sh` which simply runs the Python script/app in `package-consumer-project/consumepackage.py` that uses the package `boopackage`.

Alternatively, you can [upload your built package to PyPI](https://packaging.python.org/distributing/#uploading-your-project-to-pypi) and then they can install it by running `pip install boopackage`.

## What are the differences between "Python Packages" and eggs?

I've been trying to figure that out myself. I can tell you that eggs appear to [essentially be deprecated](https://packaging.python.org/discussions/wheel-vs-egg/) and as noted on the previously linked python.org site _Wheel is currently considered the standard for built and binary packaging for Python._ Therefore I no longer maintain an example of building eggs, but some docs you might find interesting are as follows: "Python Packages" are documented at https://packaging.python.org/distributing/ and Eggs are documented at http://peak.telecommunity.com/DevCenter/PythonEggs

# Troubleshooting

## After installing the package I still see the error 'ImportError: No module named <mypackage>' when trying to use it in a script/app.

It is important that the `setup.py` is in the **parent** of the actual root package folder. If you don't do this you won't get any errors, and pip will show you're package as installed (e.g. with `pip show <mypackage>`) but consuming scripts of the package won't ever find the package and will always get the `ImportError`.

So this also implies that the "package" isn't what you specify as the name of your package in `setup.py`. Although `pip` uses the name in `setup.py` to determine whether it is installed, Python itself only cares about the directory that contains the `__init__.py` file.