semvec/pypi-packages huggingface dataset:
at-common-tasks 1.0.9
A Python package providing common asynchronous task definitions and utilities for workflow operations.
Requires Python: >=3.11

# AT Common Tasks

A Python package providing common asynchronous task definitions and utilities for workflow operations.

## Installation
```bash
pip install at_common_tasks
```

## Usage
```python
from at_common_workflow import Context
from at_common_tasks import echo, reverse, add_integers
async def main():
    context = Context()
    # Echo example
    context["in_msg"] = "Hello, World!"
    await echo(context)
    print(context["out_msg"]) # Outputs: Hello, World!
    
    # Add integers example
    context["num1"] = 5
    context["num2"] = 3
    await add_integers(context)
    print(context["result"]) # Outputs: 8
```

## Development

1. Clone the repository
2. Create a virtual environment: `python -m venv venv`
3. Activate the virtual environment
4. Install development dependencies: `pip install -e ".[dev]"`
5. Run tests: `pytest`

## License

This project is licensed under the MIT License - see the LICENSE file for details.
atomic-counter 0.1.4
Atomic Counters
Requires Python: >=3.8

# Atomic Counter

[![Build Status](https://github.com/timkpaine/atomic-counter/workflows/Build%20Status/badge.svg?branch=main)](https://github.com/timkpaine/atomic-counter/actions?query=workflow%3A%22Build+Status%22)
[![Coverage](https://codecov.io/gh/timkpaine/atomic-counter/branch/main/graph/badge.svg)](https://codecov.io/gh/timkpaine/atomic-counter)
[![License](https://img.shields.io/github/license/timkpaine/atomic-counter.svg)](https://pypi.python.org/pypi/atomic-counter)
[![PyPI](https://img.shields.io/pypi/v/atomic-counter.svg)](https://pypi.python.org/pypi/atomic-counter)

## Overview
`atomic-counter` is a rust library for generating a monotonically increasing sequence of integers. Depending on the particular configuration of the counter, the generated sequence will be produce unique numbers down to the nanosecond, regardless of memory state.
E.g. if you quit the process and recreate a new counter `>1ns` later, your sequence is guaranteed to still be monotonically increasing (but with a gap).

## Usage

```python
from atomic_counter import Counter

c = Counter(base_in_nanos)

c.next()  # generate next number in sequence
```

To create e.g. a daily counter, pass in `base=today in nanos`. As this is a common occurrence for sequences that reset daily, a convenience function `def daily() -> Counter:` is provided.


There is also a `TimeCounter` class provided. A 64 bit unsigned integer is created that is monotonically increasing, and allows for converting to microseconds to serve as a timestamp (up to the year 2112). Will break if more than 4096 calls to "next" are called within a single microsecond (which is almost assuredly never going to be physically possible, every call makes a system call to get the current time).

```python
from atomic_counter import TimeCounter
from datetime import datetime, timezone

c = TimeCounter()

x = c.next()  # generate id
x_time = TimeCounter.to_datetime(x)  # generates the datetime where the value was called.
now = datetime.now(timezone.utc)
assert x_time <= now
```
prompt-evaluator 0.1.8
A package to evaluate prompts using OpenAI and google models
Requires Python: >=3.7

# Prompt Evaluator

`prompt-evaluator` is a Python package that evaluates prompts using OpenAI and google models based on criteria like clarity, specificity, relevance, and more.

It can do below tasks.

1) prompt evaluation 

```bash
from prompt-evaluator import PromptEvaluator
evaluator = PromptEvaluator(openai_api_key="your_api_key",model="model_name")
evaluator.evaluate_prompt(model="model_name",prompt=prompt)
```

2) Finding the number of tokens in prompt.

```bash
from prompt-evaluator import PromptEvaluator
evaluator = PromptEvaluator(openai_api_key="your_api_key",model="model_name")
evaluator.token_length(prompt,model="model_name")
```

3) Prompt enhancement as per the use-case - In dev.
4) Prompt token reducer to lower the prompt tokens - In dev.

## Installation

```bash
pip install prompt-evaluator