Metadata-Version: 2.3
Name: simpyx
Version: 1.1.0
Summary: Simulate neopixels in the terminal.
Project-URL: Homepage, https://github.com/jtompkin/simpyx
Author-email: Josh Tompkin <jtompkin-dev@pm.me>
License: MIT License
        
        Copyright (c) 2024 Josh Tompkin
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: led,neopixel,simulate,terminal
Classifier: Environment :: Console
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# simpyx

Simulate RGB pixel control in a terminal.

## Installation

Install with pip

```bash
pip install simpyx
```

## Modules

- `pixels`: Create and show RGB pixel arrays.
- `shows`: Collection of programs to show off the simpyx library.
- `screen`: Manipulate a file (usually standard out) as a screen.

## Usage

`pixels.PixelDrawer` object is the primary interface for displaying an array of
pixels.

Can index and iterate as a normal python array. Intended to work (kinda)
similarly to
[adafruit-circuitpython-neopixel](https://pypi.org/project/adafruit-circuitpython-neopixel).

```python
with pixels.PixelDrawer(100) as pix_drawer:
    for p in pix_drawer:
        p.set_rgb(255, 0, 100)
    pix_drawer[30] = pixels.Pixel(0, 0, 0)
    pix_drawer.show()
```

### Typical Python usage

```python
import time
from simpyx import pixels
with pixels.PixelDrawer(100) as pix:
    delta = 255 / len(pix)
    while True:
        for i, p in enumerate(pix):
            p.set_rgb(100, 0, round((i + i) * delta)
            pix.show()
            time.sleep(0.05)
        pix.fill(0, 0, 0)
        pix.show()
```

## License
Licensed under the MIT license. See LICENSE file.
