semvec/pypi-packages huggingface dataset:
pymotego 0.1.5
`python` binding for `cogmoteGO`
Requires Python: >=3.13

## pymoteGO

`python` binding for `cogmoteGO`

## Installation

```sh
pip install pymotego
```

or

```sh
uv add pymotego
```

## Usage
### Data broadcast

```python
from pymotego.broadcast import Broadcast
from datetime import datetime, timedelta
from time import sleep
import random

broadcast = Broadcast()

results = ["correct", "incorrect", "timeout"]

for i in range(10):
    start_time = datetime.now() - timedelta(seconds=random.randint(1, 60))
    
    duration = random.randint(1, 5)
    stop_time = start_time + timedelta(seconds=duration)
    
    result = random.choice(results)
    
    correct_rate = 1.0 if result == "correct" else 0.0
    
    data = {
        "trial_id": i + 1,
        "trial_start_time": start_time.isoformat(),
        "trial_stop_time": stop_time.isoformat(),
        "result": result,
        "correct_rate": correct_rate
    }
    
    future = broadcast.send(data)
    print(future.result())

    sleep(duration)
```
dworshak-prompt 0.2.20
Multiplexed user input via console, GUI, and web, depending on availability.
Requires Python: >=3.9
Keywords: credentials, prompt, input, configuration, config

'# dworshak-prompt

A Python utility that ensures you can always get user input by falling back through multiple interfaces.

### How it works

It captures input by cycling through modes based on environment availability:

1. **Console** (CLI)
2. **GUI** (Tkinter)
3. **Web** (Local Browser Server)

Automatically skips incompatible modes (e.g., GUI on WSL) via `pyhabitat`.


### Usage

### Leverage dworshak-config, dworshak-config, and dworshak-env to handle values

```python
from dworshak_prompt import DworshakObtain

DworshakObtain.config("")
DworshakObtain.secret("")
DworshakObtain.env("")

```

###H Handle values yourself

```python
from dworshak_prompt import DworshakPrompt, PromptMode

# Basic
val = DworshakPrompt().ask("Enter value")

# Options
val = DworshakPrompt().ask(
    message = "Secure Key",
    hide_input=True,
    priority = [PromptMode.CONSOLE, PromptMode.GUI]
    avoid = {PromptMode.WEB}

)

```

Another example, for handling CI:

```python
from dworshak_prompt import DworshakPrompt, PromptMode

# If this runs in GitHub Actions, it returns "staging" immediately.
# If it runs on a laptop, it pops up a GUI or Console prompt.
val = DworshakPrompt().ask(
    message = "Target Environment",
    suggestion="production",  # What the human sees
    default="staging"         # What the CI/Headless system uses
)
```

Leveraging `dworshak-prompt` for calling and adding configured values.

```python
from dworshak_prompt import DworshakConfig

# Custom path for a specific project
eds_config = DworshakConfig("~/.pipeline-eds/config.json")
api_key = eds_config.get("api_key", message="Enter EDS API Key")
```

The default config file path is "~/.dworshak/config.json".

---

## Install as CLI (for demo purposes)

```bash
pipx install "dworshak-prompt[typer]"
dworshak-prompt --version
dworshak-prompt --help
dworshak-prompt ask --message "Please state name" --mode web
```

---

## Add dworshak-prompt to Python project
When using `uv` for dependency management.
```
uv add dworshak-prompt --extra typer
```

Or, when using raw `pip` for dependency management.
```
pip install "dworshak-prompt[typer]"
``` 

Including the `typer` optional dependency group ensures that Typer and Rich are included as a dependencies. 
Without this, the CLI and console_prompt functionality are still stable, due to Python standard library fallbacks. 

---

## More Information

- [User Stories](https://github.com/City-of-Memphis-Wastewater/dworshak-prompt/blob/main/docs/USERS.md)