semvec/pypi-packages huggingface dataset:
rcode-tddschn 0.5.2
rcode Improved
License: MIT
Requires Python: >=3.11,<3.12
Keywords: vscode

# rcode-tddschn

rcode Improved.

Fork of https://github.com/yihong0618/rcode .

- [rcode-tddschn](#rcode-tddschn)
  - [Improvements](#improvements)
  - [Usage](#usage)
  - [Note](#note)
  - [Installation](#installation)
    - [pipx](#pipx)
    - [pip](#pip)
  - [Develop](#develop)


## Improvements

1. Supports specifying VSCode release channel (stable, insiders, etc.) via `-r` flag.
2. Deleting and listing `shortcut`s.
3. Detailed help messages.
4. Grammar fixes.
5. Uses pyproject.toml instead of setup.py.

## Usage

```
$ rcode --help

usage: rcode [-h] [-r {stable,insiders}] [-l] [-s SHORTCUT_NAME] [-o OPEN_SHORTCUT] [-L] [-d DELETE_SHORTCUT] [-D] [dir] [host]

A command line tool to open directories in VSCode remotely or locally.

positional arguments:
  dir                   The local directory path to open in VSCode or the remote directory path when used with a host.
  host                  The SSH hostname as specified in your .ssh/config to open a remote directory in VSCode.

options:
  -h, --help            show this help message and exit
  -r {stable,insiders}, --release {stable,insiders}
                        VS Code release channel to use (stable or insiders)
  -l, --latest          Open the most recently used remote directory.
  -s SHORTCUT_NAME, -sn SHORTCUT_NAME, --shortcut_name SHORTCUT_NAME
                        rcode host dir -s <shortcut_name> | Add a shortcut name for the remote directory to quickly access it later. | Saved to
                        /Users/tscp/.rcode-tddschn.csv
  -o OPEN_SHORTCUT, -os OPEN_SHORTCUT, --open_shortcut OPEN_SHORTCUT
                        Open a remote directory quickly using the previously saved shortcut name.
  -L, --list            List all configured shortcuts
  -d DELETE_SHORTCUT, --delete DELETE_SHORTCUT
                        Delete a shortcut by name
  -D, --delete-all      Delete all shortcuts after confirmation

```

## Note

This project depends on `distutils` which was removed in Python 3.12.

## Installation

### pipx

This is the recommended installation method.

```
$ pipx install rcode-tddschn
# pipx install --python "$(which python3.11)" rcode-tddschn
```

### [pip](https://pypi.org/project/rcode-tddschn/)

```
$ pip install rcode-tddschn
# python3.11 -m pip install rcode-tddschn
```


## Develop

```
$ git clone https://github.com/tddschn/rcode-tddschn.git
$ cd rcode-tddschn
# poetry env use "$(which python3.11)"
$ poetry install
```
task-flows 0.3.3
Python task management, scheduling, alerts.
License: MIT


## Python task management, scheduling, alerts.

Admin commands are accessed via the `tasks` command line tool. See `tasks --help` for complete usage.  

### Setup
`pip install task-flows`   

Task execution metadata is stored in Postgresql. Set environment variable `TASK_FLOWS_DB` to the URL of the Postgresql instance you would like to use.

### Create a scheduled Task
```python
from task_flows import ScheduledTask, OnCalendar

task = ScheduledTask(
    task_name="my-task",
    command="my-command",
    timer=OnCalendar("Sun 17:00 America/New_York"),
)
task.create()
```

### Create Tasks
Turn any function (optionally async) into a task that logs metadata to the database and sends alerts, allows retries, etc..
```python
alerts=[
    Alerts(
        send_to=[   
            Slack(
                bot_token=os.getenv("SLACK_BOT_TOKEN"),
                app_token=os.getenv("SLACK_APP_TOKEN"),
                channel="critical_alerts"
            ),
            Email(
                addr="sender@gmail.com", 
                password=os.getenv("EMAIL_PWD"),
                receiver_addr=["someone@gmail.com", "someone@yahoo.com"]
            )
        ],
        send_on=["start", "error", "finish"]
    )
]
@task(
    name='some-task',
    required=True,
    retries=1,
    timeout=30,
    alerts=alerts
)
async def hello():
    print("Hi.")
```

### Review Task Status/Results
Tasks can send alerts via Slack and/or Email, as shown in the above example. Task start/finish times, status, retry count, return values can be found in the `task_runs` table. Any errors that occurred during the execution of a task can be found in the `task_errors` table.