semvec/pypi-packages huggingface dataset:
ragapi 1.0.2
A rag api for extending your application 
Requires Python: >=3.8

# The RAG API
Query your documents powered by AI

## Requirements
Have the following tools installed on your computer
- Git
- Docker
## Usage
1. Start by cloning the project.  
```sh
    git clone -b java-to-python-rag-app --single-branch <repo_url>
```
2. Open the project with an IDE or a text editor
3. In the project root directory, rename the **.env.example** file to **.env** and fill in the values
    > **Note:** Make sure that the container_name of the qdrant service in the docker-compose.yaml file matches the QDRANT_HOST in the .env file
4. Open a terminal and run: 
``` sh 
    docker-compose up --build
```
5. Once the download is complete and the applicaiton has been started, go the [http://localhost:8000/docs](http://localhost:8000/docs) to use the api.

## Use the api as a module

If you want to use the api to extend your application capabilities with rag support already made, please follow these steps:
1. Clone the repository.
2. Move the module into the root directory of your project 
>**Note:** Rename the module to **ragapi**
3. Open a terminal and run the following commands 
```sh
    cd ragapi
    pip install -e .
```
>**Note:** When creating a new instance of **FastAPI** in your main.py file, use another variable name instead of **app** to avoid conflicts.
actions-python 0.7.5
A simple Python packaging for managing event-like actions and validating handlers argument types.
Requires Python: >=3.8

# Actions-python

## Overview
Actions-python is a Python package designed to manage actions with event-driven behavior. 
It provides a flexible way to connect handlers (callbacks) to actions, ensuring that handler argument types are 
validated before invocation. This helps maintain strict type consistency while enabling dynamic behavior 
in event-driven systems.

## Features
- **Event-driven architecture**: Connect handlers to actions and invoke them when the action is triggered.
- **Type validation**: Ensures that handler argument types match the expected types defined when the action is initialized.
- **Dynamic handling**: Allows flexible addition of handlers at runtime, each with its own argument type validation.
- **Supports multiple argument types**: Can handle multiple types of arguments for a single action.

## Installation

To install the project you can use pip:

```bash
pip install https://github.com/Allorak/actions-python
```

Or install from PyPI index:
```bash
pip install actions_python
```

## Core ideas
- Actions: An action is an event that can have one or more handlers (callbacks) connected to it. 
When the action is triggered, all handlers are invoked with the specified arguments.
- Handlers: Callbacks that are connected to actions. 
Each handler should expect arguments of a specific type, 
which are validated at both the connection stage and the invocation stage.
- Type validation: When a handler is connected, the types of its arguments are validated to ensure they match the
expected types. Similarly, when invoking the action, arguments are validated against the expected types.

## Usage
For creating an action initialize a variable of `Action` type and specify types of action's params
```python
from actions import Action

class Test:
    def __init__(self):
        self.example_action = Action(int, str)

    def fire(self):
        self.example_action.invoke(0, "test")

def print_callback(number: int, text: str):
    print(f"Number: {number} | Text: {text}")

test = Test()
test.example_action.connect(print_callback)
test.fire()
```

## Example
Usage examples can be found in `examples/` folder