semvec/pypi-packages huggingface dataset:
pydevlpr 0.3.1
Frontend for connecting to devlprd and processing data from a FANTM DEVLPR
License: MIT
Requires Python: >=3.7,<3.11

# pydevlpr

## Overview

Enables simple muscle to application connections. 
Pydevlpr is the front-end for `devlprd <https://github.com/FANTM/devlprd>`_, and the third piece of the muscle-to-app pipeline.

## Getting Started

After installing pydevlpr, integrating it into a project is straightforward.
First launch the `devlprd daemon <https://github.com/FANTM/devlprd>`_, and then use the ``add_callback(...)`` function to attach a handler to the incoming data.
The callback you attach will get the incoming payload as its only parameter, and then the data is yours to handle.

## Supported Topics

This list will expand as the package matures, but when adding/removing callbacks use a data topic from this list as it maps directly to the daemon.

* DataTopic.RAW_DATA_TOPIC - Data straight off the DEVLPR Arduino Shield. Range: 0-1023.
* DataTopic.FLEX_TOPIC - 1 when there has been a flex, 0 when muscle is relaxed.

## API

*def stop() -> None:*

> Stops listening to the server.

*def add_callback(topic: str, pin: int, fn: Callable[[str], None], ws: websocket.server.WebSocketServerProtocol = None) -> None:*

> Attaches a function to be called whenever a message is received at a particular topic and relating to a particular DEVLPR (as specified by the *pin* parameter).

> - topic: str - Specifies the data stream, differentiating filtered vs. raw data.
- pin: int - Connects the callback to a physical board. Each DEVLPR is connection to the Arduino via an analog pin, and the message from the daemon relates which pin this is.
- fn: Callable[[str], None] - Function to be called when a message is received that is both the specified topic and pin. It expects to receive the payload of the incoming message.
- ws: websocket.server.WebSocketServerProtocol - Websocket connection, by default set to None and uses pydevlprs global connection.
Pass a connection in if it is going to be used in another context, or for testing.

*def remove_callback(topic: str, pin: int, fn: Callable[[str], None]) -> None:*

> Stops a function from being called whenever a new qualified packet is received.

> - topic: str - The data stream the existing callback is attached to.
- pin: int - The DEVLPR the callback is attached to.
- fn: Callable[[str], None] - Function to remove from the callback list.
devlprd 0.4.2
Daemon for managing integrations with the FATNM DEVLPR
License: MIT
Requires Python: >=3.7,<3.11

# devlprd
[![Python application](https://github.com/FANTM/devlprd/actions/workflows/python-app.yml/badge.svg)](https://github.com/FANTM/devlprd/actions/workflows/python-app.yml)

## Overview
The FANTM DEVLPR daemon for managing and publishing data streams. It serves as a middleware between the hardware itself, and whatever integration you want to make. 
It exists to both abstract away data processing from the end application, and to allow for language agnostic integrations. Right now there is only a [python endpoint](https://github.com/FANTM/pydevlpr), but there are plans for JS and more in the near future. 
In effect, first an Arduino is flashed with the provided firmware, then the daemon is launched, and then the application that you're using the data with. 

## Getting Started
The first thing that needs to be done is formatting the Arduino. In the `arduino_firmware` folder there are scripts that format the data in such a way that the daemon can package, process, and send it out easily. 
So [flash an arduino](https://www.arduino.cc/en/Guide) with one of those scripts and make sure it is connected to the computer you will be running the daemon from.

This project uses [Poetry](https://python-poetry.org/) for dependency management, and while it's not required to get started it's a useful tool. All of the dependencies are in `pyproject.toml`,
so just run `poetry install`. Then just run `poetry run python src/main.py` and the daemon should start.

## Development
### Adding a data transformer
To add support for a new data transformer, edit the `self.callbacks: Dict[str, Callable[[int], Union[int, bool]]]` dictionary in the `__init__` function of DaemonState (in `DaemonState.py`).
You will need to add a new entry with a data topic, using one of the supported topics defined in `protocol.py` and a function. 
The function is a callback that takes a single int as an arguement representing the pin the data is coming from on the Arduino.
The function should be inside of DaemonState, but it can be wrapper for a function living in another file (`filtering.py` is usually a good choice). 

Now whenever a client subscribes to your topic, the callback will be called and you'll see your data stream.

### Adding a new data topic
Add a new line to the DataTopic class in `protocol.py` with an ALL_CAPS_NAME and a unique two letter identifier. 
Then go to the [`protocol.py`](https://github.com/FANTM/pydevlpr/blob/main/src/pydevlpr/protocol.py) in the `pydevlpr` repository and add it there as well so others can use the topic. 

### Adding support for different types of messages
Add a new line in the PacketType class in `protocol.py` with an ALL_CAPS_NAME and a unique one letter identifier. 
Then go to `daemon.py` and add an `elif command == PacketType.ALL_CAPS_NAME` with the handler for your custom packet type to the `receive(...)` function.
git-revise 0.7.0
Efficiently update, split, and rearrange git commits
License: MIT
Requires Python: >=3.8
Keywords: git revise rebase amend fixup

# git revise
[![Build Status](https://travis-ci.org/mystor/git-revise.svg?branch=master)](https://travis-ci.org/mystor/git-revise)
[![PyPi](https://img.shields.io/pypi/v/git-revise.svg)](https://pypi.org/project/git-revise)
[![Documentation Status](https://readthedocs.org/projects/git-revise/badge/?version=latest)](https://git-revise.readthedocs.io/en/latest/?badge=latest)


`git revise` is a `git` subcommand to efficiently update, split, and rearrange
commits. It is heavily inspired by `git rebase`, however it tries to be more
efficient and ergonomic for patch-stack oriented workflows.

By default, `git revise` will apply staged changes to a target commit, then
update `HEAD` to point at the revised history. It also supports splitting
commits and rewording commit messages.

Unlike `git rebase`, `git revise` avoids modifying the working directory or
the index state, performing all merges in-memory and only writing them when
necessary. This allows it to be significantly faster on large codebases and
avoids unnecessarily invalidating builds.

## Install

```sh
$ pip install --user git-revise
```

Various people have also packaged `git revise` for platform-specific package
managers (Thanks!)

#### macOS Homebrew

```sh
$ brew install git-revise
```

#### Fedora

```sh
$ dnf install git-revise
```

## Documentation

Documentation, including usage and examples, is hosted on [Read the Docs].

[Read the Docs]: https://git-revise.readthedocs.io/en/latest
pyfixfmt 0.9.2
Run several python fixers over a python file, to provide simple, deterministic code formatting.
License: MIT
Requires Python: >=3.6,<4.0

# PyFixFmt

Your all-in-one python formatter. Able to be called on files or strings to format and standarize a Python file.

Removes unused imports (with [autoflake](https://github.com/myint/autoflake)), sorts imports (with [isort](https://github.com/PyCQA/isort)), and then formats the code (with [black](https://black.readthedocs.io/en/stable/)). It will respect your project's `pyproject.toml` configuration for those tools.

Meant to make formatting of python code as deterministic as sanely possible.


### Instructions

To install:

`pip install pyfixfmt`

To run:

```
# file-glob can be either a single file name or a normal unix glob.
python -m pyfixfmt --file-glob <your file glob here> --verbose
```

Configuration:

```
# in pyproject.toml
[tool.formatters.python]
# Do not change anything about imports in these files
ignore_import_changes = []
# Do not remove imports that are unused in these files
do_not_remove_imports = []
```


### Developing

Develop with [Poetry](https://python-poetry.org/).

Build with `poetry build`, and publish with `poetry publish`.