semvec/pypi-packages huggingface dataset:
micropython-simple-keypad 1.0.3
MicroPython library for interfacing with a keypad matrix
License: MIT
Keywords: keypad,esp32,esp8266,micropython

MicroPython Simple Keypad
=========================

|MicroPython| |License|

MicroPython library for interfacing with a keypad matrix

Feature
-------

-  Supports any keypad matrix configuration.
-  Easily customizable for different keypad layouts.
-  Provides exception handling for error management.

Example Usage
-------------

Example for 4x4 keypad metrix on MicroPython esp32.

.. code:: python

   from machine import Pin
   from keypad import Keypad
   from time import sleep

   # Define GPIO pins for rows
   row_pins = [Pin(25),Pin(26),Pin(27),Pin(14)]

   # Define GPIO pins for columns
   column_pins = [Pin(23),Pin(22),Pin(19),Pin(18)]

   # Define keypad layout
   keys = [
       ['1', '2', '3', 'A'],
       ['4', '5', '6', 'B'],
       ['7', '8', '9', 'C'],
       ['*', '0', '#', 'D']]

   keypad = Keypad(row_pins, column_pins, keys)

   while True:
       key_pressed = keypad.read_keypad()
       if key_pressed:
           print("Key pressed:", key_pressed)
       sleep(0.1)  # debounce and delay

.. |MicroPython| image:: https://img.shields.io/badge/MicroPython-Ready-brightgreen.svg
.. |License| image:: https://img.shields.io/badge/License-MIT-blue.svg
   :target: https://opensource.org/licenses/MIT
localstack-s3-pyspark 0.12.6
A CLI to configure pyspark for use with s3 on localstack
License: MIT
Requires Python: ~=3.8

# localstack-s3-pyspark

[![test-distribute](https://github.com/enorganic/localstack-s3-pyspark/actions/workflows/test-distribute.yml/badge.svg)](https://github.com/enorganic/localstack-s3-pyspark/actions/workflows/test-distribute.yml)

This package provides a CLI for configuring pyspark to use
[localstack](https://github.com/localstack/localstack) for the S3 file system.
This is intended for testing packages locally (or in your CI/CD pipeline)
which you intend to deploy on an Amazon EMR cluster.

## Installation

Execute the following command, replacing **pip3** with the executable
appropriate for the environment where you want to configure **pyspark** to use
**localstack**:

```shell
pip3 install localstack-s3-pyspark
```

## Configure Spark's Defaults

If you've installed **localstack-s3-pyspark** in a Dockerfile or virtual
environment, just run the following command:

```shell
localstack-s3-pyspark configure-defaults
```

If you've installed **localstack-s3-pyspark** in an environment with multiple
python 3.x versions, you may instead want to run an appropriate variation of
the following command (replacing `python3` with the command used to access the
python executable for which you want to configure pyspark):

```shell
python3 -m localstack_s3_pyspark configure-defaults
```

### Tox

Please note that if you are testing your packages with **tox** (highly
recommended), you will need to:

- Include "localstack-s3-pyspark" in your tox **deps**
- Include `localstack-s3-pyspark configure-defaults` in your tox
  **commands_pre** (or by other means execute this command prior to your tests)

Here is an example **tox.ini** which starts up localstack using the localstack
CLI (you could also use `docker-compose` or just `docker run`, if you need
 greater control or fewer python dependencies, see the the localstack
documentation
["Getting Started" page](https://docs.localstack.cloud/get-started)
for details):

```ini
[tox]
envlist = pytest

[testenv:pytest]
deps =
  localstack-s3-pyspark
  localstack
commands_pre =
    localstack-s3-pyspark configure-defaults
    localstack start -d
    sleep 20
commands =
    py.test
commands_post =
    localstack stop
```

## Patch *boto3*

If your tests interact with S3 using **boto3**, you can patch boto3 from within
your unit tests as follows:

```python3
from localstack_s3_pyspark.boto3 import use_localstack
use_localstack()
```