semvec/pypi-packages huggingface dataset:
reflex-swipe 1.1.2
Provides swipe gestures detections for reflex apps.
License: MIT
Requires Python: >=3.10
Keywords: reflex, reflex-custom-components

# Reflex Swipe

Detects swipes on the page. Wraps `react-swipeable`.

```python
from reflex_swipe import swipeable

def index():
    return swipeable(
        "Swipe Here",
        on_swiped_left=rx.console_log("Swiped Left"),
        height="100px",
        width="100px",
    )
```

## Supported Props

| Prop Name               | Prop Type | Description                                 |
|-------------------------|-----------|---------------------------------------------|
| delta                   | float     | The min distance(px) before a swipe starts. |
| prevent_scroll_on_swipe | bool      | Prevents scroll during swipe.               |
| track_touch             | bool      | Track touch input.                          |
| track_mouse             | bool      | Track mouse input.                          |
| rotation_angle          | float     | Set a rotation angle.                       |
| swipe_duration          | float     | Allowable duration of a swipe (ms).         |

## Supported Events

| Event Name                   | Event Type          |
|------------------------------|---------------------|
| on_swiped                    | (SwipeEvent) -> Any |
| on_swiped_left               | (SwipeEvent) -> Any |
| on_swiped_right              | (SwipeEvent) -> Any |
| on_swiped_up                 | (SwipeEvent) -> Any |
| on_swiped_down               | (SwipeEvent) -> Any |
| on_swiped_start              | (SwipeEvent) -> Any |
| on_swiping                   | (SwipeEvent) -> Any |
| on_tap                       | () -> Any           |
| on_touch_start_or_mouse_down | () -> Any           |
| on_touch_end_or_mouse_up     | () -> Any           |

`SwipeEvent` is the following:

```python
class SwipeEvent(TypedDict):
    """A swipe event."""

    # direction of swipe
    dir: Literal["Left", "Right", "Up", "Down"]
    # initial swipe [x,y]
    initial: Tuple[float, float]
    # true for the first event of a tracked swipe
    first: bool
    # x offset (current.x - initial.x)
    delta_x: float
    # y offset (current.y - initial.y)
    delta_y: float
    # absolute delta_x
    abs_x: float
    # absolute delta_y
    abs_y: float
    # √(absX^2 + absY^2) / time - "absolute velocity" (speed)
    velocity: float
    # [ deltaX/time, deltaY/time] - velocity per axis
    vxvy: Tuple[float, float]
```
reflex-global-hotkey 1.2.3
Global Hotkey Watcher for Reflex
License: MIT
Requires Python: >=3.10
Keywords: reflex, reflex-custom-components

# Reflex Global Hotkey Watcher

Listens to hotkeys in the global scope and calls event handler as necessary.

```python
from reflex_global_hotkey import global_hotkey_watcher

class State(rx.State):
    last_key_pressed: str = ""

    def on_key(self, keyname: str):
        self.last_key_pressed = keyname

def index():
    return rx.fragment(
        State.last_key_pressed,
        global_hotkey_watcher(
            on_key_down=State.on_key
        )
    )
```

You can special case on the event key:

```python
global_hotkey_watcher(
    on_key_down=lambda key_name: rx.cond(
        rx.Var.create(
            ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"]
        ).contains(key_name),
        State.on_key(key_name),
        rx.console_log("Invalid key!"),
    )
)
```

You can also special case on the second parameter:

```python
from reflex_global_hotkey import global_hotkey_watcher
from reflex.event import KeyInputInfo

class State(rx.State):
    last_key_pressed: str = ""

    def on_key(self, keyname: str, keyinfo: KeyInputInfo):
        if not keyinfo["alt_key"]:
            self.last_key_pressed = keyname

def index():
    return rx.fragment(
        State.last_key_pressed,
        global_hotkey_watcher(
            on_key_down=State.on_key
        )
    )
```

The fields are defined in `reflex.event`:

```python
class KeyInputInfo(TypedDict):
    """Information about a key input event."""

    alt_key: bool
    ctrl_key: bool
    meta_key: bool
    shift_key: bool
```
triggersms 0.1.3
TriggerSMS is a Python package for sending data to the TriggerSMS API.
License: MIT
Requires Python: >=2.6.6

# TriggerSMS

A Python package for sending data to the TriggerSMS API.

## Installation

```bash
pip install triggersms
```

## Usage

```python
import triggersms

# Your API usage code here
```

## License

MIT License