semvec/pypi-packages huggingface dataset:
busytag 0.1.5
A library and CLI tool to control Busy Tag devices.
Requires Python: >=3.11

# busytag_tool

[![PyPI version](https://img.shields.io/pypi/v/busytag)](https://pypi.org/project/busytag/)
![License](https://img.shields.io/pypi/l/busytag)

Python library and CLI to interact with [Busy Tag](https://www.busy-tag.com/) devices using
the [USB CDC interface](https://luxafor.helpscoutdocs.com/article/47-busy-tag-usb-cdc-command-reference-guide).

## Installation

```shell
$ pip install busytag
```

## CLI usage

If you have multiple devices connected to your machine, you should specify the port with the
`--device` flag. If only one device is connected, the tool will automatically use it.

```shell
$ busytag-tool

	USAGE: busytag-tool [flags] <command> [<args>]

Available commands:
  help: Prints this message
  list_devices: Lists available devices
  info: Displays device information
  list_pictures: Lists pictures in device
  list_files: Lists files in device
  get_picture: Gets the filename of the picture being shown
  set_picture <filename>: Sets the picture shown in the device
  put <filename>: Uploads <filename>
  get <filename>: Copies <filename> from the device to the working directory
  rm <filename>: Deletes <filename>
  set_led_solid_color <6 hex RGB colour>: Sets the LEDs colour
  apply_led_preset <preset name>: Sets the LEDs colour according to a preset
  get_brightness: Gets current display brightness
  set_brightness <brightness>: Sets current display brightness (int between 1 and 100, inclusive

$ busytag-tool set_picture coding.png
```

### Config

A config file is created at `~/.busytag.toml`. You can add "led preset" entries there,
which can then be used with the `apply_led_preset` to change the device's LED colours. For example, here are two
entries, one that applies the same colour to all LEDs, and another that alternates colours:

```toml
[[led_presets.red]]
pins = 127
color = 'FF0000'

[[led_presets.rb]]
pins = 85
color = 'FF0000'

[[led_presets.rb]]
pins = 42
color = '0000FF'
```

The BusyTag device has seven LEDs (with the first one, 0, at the bottom left of the device), identified in this tool by
powers of two. The `pins` entry in the config is the sum of which pins we want to apply the colour (so `127` applies
to all, while `85` applies to pins 0, 2, 4 and 6).

## API usage

```python
from busytag import Device, LedConfig, LedPin

bt = Device('/dev/fooBar')
bt.set_active_picture('coding.gif')
bt.set_led_solid_color(LedConfig(LedPin.ALL, 'FF0000'))
```
toolz-stubs 0.3.1
Type stubs for toolz
Requires Python: >=3.12
Keywords: cytoolz, functional, stubs, tlz, toolz, type hints, typing

# toolz-stubs

[![CI](https://github.com/mgrinshpon/toolz-stubs/actions/workflows/ci.yml/badge.svg)](https://github.com/mgrinshpon/toolz-stubs/actions/workflows/ci.yml)

Type stubs for [toolz](https://github.com/pytoolz/toolz) and [tlz](https://github.com/pytoolz/toolz/tree/main/tlz) - Python functional programming libraries.

Type hinting for [cytoolz](https://github.com/pytoolz/cytoolz) is available via [tlz](https://github.com/pytoolz/toolz/tree/main/tlz).

## Installation

```bash
pip install toolz-stubs
```

This installs type stubs for both `toolz` and `tlz`.

## Usage

Once installed, type checkers like mypy, pyright, or basedpyright will automatically use these stubs:

```python
import toolz
from toolz import curry, compose, pipe

@curry
def add(x: int, y: int) -> int:
    return x + y

# Type checkers will understand these operations
add_five = add(5)  # Correctly typed as partial function
result = add_five(3)  # Type checked as int
```

The same types work with `tlz`:

```python
import tlz
from tlz import curry, compose, pipe

# Identical API, same type hints
result = tlz.pipe(data, transform1, transform2)
```

## What's Included

This package provides type stubs (`.pyi` files) for:

- **toolz**: The pure Python functional programming library
- **tlz**: The auto-selecting wrapper that uses cytoolz (if available) or falls back to toolz

Modules covered:
- `toolz.functoolz` / `tlz.functoolz` - Function manipulation (curry, compose, pipe, etc.)
- `toolz.itertoolz` / `tlz.itertoolz` - Iterator utilities (groupby, partition, sliding_window, etc.)
- `toolz.dicttoolz` / `tlz.dicttoolz` - Dictionary operations (merge, valmap, keyfilter, etc.)
- `toolz.curried` / `tlz.curried` - Pre-curried versions of all functions
- `toolz.recipes` / `tlz.recipes` - Common recipes (countby, partitionby)
- `toolz.sandbox` / `tlz.sandbox` - Experimental utilities

## Development

```bash
make sync    # Install dependencies
make check   # Run type checker
make test    # Run tests
make lint    # Run linter
make format  # Check formatting
make build   # Build wheel
```

If manually running commands, be sure to specify `--no-editable` or hatchling will mispackage toolz & tlz packages.

### Tests

The tests in `tests/` serve a few purposes:
- they verify runtime behavior with pytest.
- they verify that these stubs geninely improve the developer experience in an IDE.
- they are type-checked by basedpyright. This ensures the stubs match actual library behavior.

## Contributing

Contributions are welcome! Areas that could use improvement:

1. More precise generic types
2. Additional overloads for functions with variable signatures
3. Improved curry and composition typing
4. Protocol types for duck-typed parameters

## License

BSD 3-Clause (same as toolz)