semvec/pypi-packages huggingface dataset:
labtasker-plugin-task-recency 0.1.1
A Labtasker plugin that groups tasks according to recency.
License: MIT
Requires Python: <4.0,>=3.9

# labtasker-plugin-task-recency

A Labtasker plugin for retrieving tasks grouped by time chunks.

## Overview

This plugin extends Labtasker's functionality by allowing you to retrieve tasks that occurred within specific time
chunks. It groups tasks based on time intervals between consecutive tasks, making it easy to analyze and process tasks
that were submitted in bursts.

## Installation

```bash
pip install labtasker-plugin-task-recency
```

## Usage

```bash
labtasker task recent [OPTIONS]
```

### Options

| Option           | Default      | Description                                                                                                   |
|------------------|--------------|---------------------------------------------------------------------------------------------------------------|
| `--by`           | `created_at` | The timestamp field to group tasks by. Options: `created_at`, `start_time`, `last_heartbeat`, `last_modified` |
| `--interval, -i` | `5s`         | Time interval to define chunks. Accepts duration strings like `1h`, `1h30m`, `50s`                            |
| `--k, -k`        | `1`          | Which chunk to retrieve (1 is most recent, 2 is second most recent, etc.)                                     |
| `--order`        | `desc`       | Sort order within each chunk. Options: `desc` (newest first), `asc` (oldest first)                            |

### Examples

1. Get the most recent batch of tasks (tasks submitted with less than 5 seconds between them):
   ```bash
   labtasker task recent
   ```

2. Get the second most recent batch of tasks:
   ```bash
   labtasker task recent --k 2
   ```

3. Get tasks grouped by a 1-hour interval:
   ```bash
   labtasker task recent --interval 1h
   ```

4. Get tasks grouped by their start time instead of creation time:
   ```bash
   labtasker task recent --by start_time
   ```

5. Get the oldest batch of tasks:
   ```bash
   labtasker task recent --k 1 --order asc
   ```

## How It Works

The plugin groups tasks into "chunks" based on the time gaps between consecutive tasks. If two tasks are submitted with
a gap smaller than the specified interval, they belong to the same chunk. When the time gap exceeds the interval, a new
chunk begins.

This approach is useful for identifying batches of tasks that were submitted together, allowing for easier management
and analysis of task patterns.

## Use Cases

- Batch delete / update of most recently submitted tasks
   ```bash
  labtasker task recent | labtasker task delete -y
   ```
pyvelociraptor 0.1.11
PyVelociraptor is the python binding for the Velociraptor API
License: MIT

# The Velociraptor Python bindings.

Velociraptor is an open source DFIR tool. Read more about it at
https://docs.velociraptor.app/

Velociraptor has an API which allows an external program to interface
with it. The API presents a simple GRPC connection with the following endpoints:


1. Query: Allows running arbitrary VQL queries - this can be used to
   automate Velociraptor's collection, analysis and receive JSON
   encoded results.

   Example script: client_example.py

2. VFSGetBuffer: This API allows to read arbitrary buffers from the
   Velociraptor file store. This allows a client program to fetch bulk
   collected data.

   Example script: fetch.py

You can use these API endpoint to:

* Control collection from Velociraptor: Start hunts, collections,
  trigger exports etc.. All with VQL queries over the Query() API
  endpoint.

* Perform administive tasks: Spawn new orgs, add users, adjust
  permissions, create periodic tasks etc.

* Read results from collected data using the VFSGetBuffer() endpoint.

and much more!

To read more about the Velociraptor API see
https://docs.velociraptor.app/docs/server_automation/server_api/

# Licensing

Note that Velociraptor itself is licensed under the AGPL, however use
of the API is permitted and does not fall under the `derived work`
definition. Therefore, using the `.proto` file in this repository
falls under the MIT license which covers this repository, including
sample programs in python.

Since GRPC protobuf is a portable API definition language you can use
the `.proto` file to generate interfaces in many other languages. We
use python here as an example to demonstrate the use of the API but
any language will work.

You can even use shell scripting as the Velociraptor binary itself can
use the API to call into the server. For details, see
https://docs.velociraptor.app/docs/server_automation/server_api/#using-the-shell-for-automation